SDL/src/video
Misa 3bf7994fe2 Add and use SDL_FALLTHROUGH for fallthroughs
Case fallthrough warnings can be suppressed using the __fallthrough__
compiler attribute. Unfortunately, not all compilers have this
attribute, or even have __has_attribute to check if they have the
__fallthrough__ attribute. [[fallthrough]] is also available in C++17
and the next C2x, but not everyone uses C++17 or C2x.

So define the SDL_FALLTHROUGH macro to deal with those problems - if we
are using C++17 or C2x, it expands to [[fallthrough]]; else if the
compiler has __has_attribute and has the __fallthrough__ attribute, then
it expands to __attribute__((__fallthrough__)); else it expands to an
empty statement, with a /* fallthrough */ comment (it's a do {} while
(0) statement, because users of this macro need to use a semicolon,
because [[fallthrough]] and __attribute__((__fallthrough__)) require a
semicolon).

Clang before Clang 10 and GCC before GCC 7 have problems with using
__attribute__ as a sole statement and warn about a "declaration not
declaring anything", so fall back to using the /* fallthrough */ comment
if we are using those older compiler versions.

Applications using SDL are also free to use this macro (because it is
defined in begin_code.h).

All existing /* fallthrough */ comments have been replaced with this
macro. Some of them were unnecessary because they were the last case in
a switch; using SDL_FALLTHROUGH in those cases would result in a compile
error on compilers that support __fallthrough__, for having a
__attribute__((__fallthrough__)) statement that didn't immediately
precede a case label.
2021-11-12 07:26:14 +03:00
..
android Work around hang in AAudioStream_write() during extended shared object loading while running in a debugger. Observed on a OnePlus 8T (KB2005) running Oxygen OS 11.0.10.10.KB05AA. 2021-10-13 09:33:51 -07:00
arm
cocoa Added SDL_GetWindowMouseRect() 2021-11-08 21:34:48 -08:00
directfb Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
dummy video/dummy: Don't zero out the fake display mode before adding it. 2021-06-17 22:11:10 -04:00
emscripten emscripten: Decrease vertical scroll speed by using deltaMode 2021-11-07 20:50:07 -05:00
haiku SDL: Updated patches for HAIKU 2021-03-13 18:36:01 -08:00
khronos Update SDL's copy of the EGL headers from Khronos 2021-08-25 10:50:21 -10:00
kmsdrm kmsdrm: Use SDL_PremultiplySurfaceAlphaToARGB8888() for cursor surface 2021-10-22 05:50:00 -07:00
nacl configuration updates for dlopen: 2021-08-10 12:07:32 -07:00
offscreen
os2 SDL_os2video.c: missed replacing a use of libc function 2021-10-18 14:10:56 +03:00
pandora
psp
qnx
raspberry
riscos riscos: Disable the mouse pointer for now 2021-10-30 21:25:01 -07:00
uikit Only lock the pointer for mouse relative mode, there isn't really a concept of grab and confinement on iOS 2021-11-11 07:51:34 -08:00
vita Vita: fix IME input languages 2021-10-26 08:29:56 -07:00
vivante
wayland wayland: QTWAYLAND_CONTENT_ORIENTATION can support multiple values as bitmasks 2021-11-11 13:16:34 -05:00
windows Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
winrt winrt: Fixed incorrect code in a Windows Phone #ifdef. 2021-08-04 02:30:47 -04:00
x11 Make sure the X event is an Xkb event before checking the Xkb event type 2021-11-10 12:48:09 -08:00
yuv2rgb Fixed bug #4841 - Out of bounds read (by 1 byte) in yuvnv12_rgb24_sseu 2021-10-17 22:02:19 +02:00
SDL_blit.c
SDL_blit.h Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
SDL_blit_0.c
SDL_blit_1.c
SDL_blit_A.c Add a fast path for ARGB888->(A)BGR888 blending with pixel alpha 2021-09-28 11:27:56 -07:00
SDL_blit_auto.c Update SDL_blit_auto.c 2021-03-04 14:36:33 +01:00
SDL_blit_auto.h
SDL_blit_copy.c Fixed building on Windows with cmake, ninja, and clang 2021-08-06 12:28:24 -07:00
SDL_blit_copy.h
SDL_blit_N.c Fixed bug 3727 - Blit from RGB555 to ARGB1555 2021-03-11 20:06:09 +01:00
SDL_blit_slow.c
SDL_blit_slow.h
SDL_bmp.c Fixed compiler warning on Visual Studio 2021-06-17 11:23:47 -07:00
SDL_clipboard.c
SDL_egl.c egl: Don't fail to create a context if KHR_create_context_no_error is unsupported 2021-09-27 13:53:16 -04:00
SDL_egl_c.h egl: Group data fields before function pointers in SDL_EGL_VideoData. 2021-09-23 00:03:26 -04:00
SDL_fillrect.c Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
SDL_pixels.c Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
SDL_pixels_c.h video: Add SDL_PremultiplySurfaceAlphaToARGB8888() 2021-10-22 05:50:00 -07:00
SDL_rect.c
SDL_rect_c.h
SDL_RLEaccel.c Error missing 'flags' initialization (see bug #2881) 2021-04-28 23:40:26 +02:00
SDL_RLEaccel_c.h
SDL_shape.c
SDL_shape_internals.h
SDL_stretch.c
SDL_surface.c SDL_ConvertSurface: add an intermediate variable to remove static analysis false positive (see bug #4600) 2021-08-27 14:09:47 +02:00
SDL_sysvideo.h Update the orientation and display modes when the display settings change on Windows 2021-11-10 08:47:39 -08:00
SDL_video.c Don't clobber the error in SDL_ShowMessageBox() if one has been set at 2021-11-10 11:04:51 -08:00
SDL_vulkan_internal.h
SDL_vulkan_utils.c Fixed bug #4337 - compilation of 'SDL_vulkan_utils' fails with 'VK_ERROR_INCOMPATIBLE_VERSION_KHR' undeclared 2021-04-29 22:25:00 +02:00
SDL_yuv.c
SDL_yuv_c.h
sdlgenblit.pl