SDL: Update for SDL3 coding style (#6717)

From 5750bcb174300011b91d1de20edb288fcca70f8c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 30 Nov 2022 12:51:59 -0800
Subject: [PATCH] Update for SDL3 coding style (#6717)

I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.

In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.

The script I ran for the src directory is added as build-scripts/clang-format-src.sh

This fixes:
#6592
#6593
#6594
---
 .clang-format                                 |   11 +-
 build-scripts/clang-format-src.sh             |   32 +
 src/SDL.c                                     |   57 +-
 src/SDL_assert.c                              |  106 +-
 src/SDL_dataqueue.c                           |   64 +-
 src/SDL_dataqueue.h                           |    1 -
 src/SDL_error.c                               |   16 +-
 src/SDL_guid.c                                |   10 +-
 src/SDL_hints.c                               |   24 +-
 src/SDL_internal.h                            |   64 +-
 src/SDL_list.c                                |   16 +-
 src/SDL_list.h                                |    1 -
 src/SDL_log.c                                 |  145 +-
 src/atomic/SDL_atomic.c                       |   70 +-
 src/atomic/SDL_spinlock.c                     |   47 +-
 src/audio/SDL_audio.c                         |  415 +-
 src/audio/SDL_audio_c.h                       |    8 +-
 src/audio/SDL_audio_channel_converters.h      |  579 +-
 src/audio/SDL_audio_resampler_filter.h        |    7 +-
 src/audio/SDL_audiocvt.c                      |  566 +-
 src/audio/SDL_audiodev.c                      |   22 +-
 src/audio/SDL_audiodev_c.h                    |    6 +-
 src/audio/SDL_audiotypecvt.c                  |  884 +--
 src/audio/SDL_mixer.c                         |  430 +-
 src/audio/SDL_sysaudio.h                      |   41 +-
 src/audio/SDL_wave.c                          |  259 +-
 src/audio/SDL_wave.h                          |   46 +-
 src/audio/aaudio/SDL_aaudio.c                 |   87 +-
 src/audio/aaudio/SDL_aaudio.h                 |    5 +-
 src/audio/aaudio/SDL_aaudiofuncs.h            |  111 +-
 src/audio/alsa/SDL_alsa_audio.c               |  354 +-
 src/audio/alsa/SDL_alsa_audio.h               |    2 +-
 src/audio/android/SDL_androidaudio.c          |   40 +-
 src/audio/android/SDL_androidaudio.h          |    2 +-
 src/audio/coreaudio/SDL_coreaudio.h           |    2 +-
 src/audio/coreaudio/SDL_coreaudio.m           |  269 +-
 src/audio/directsound/SDL_directsound.c       |  136 +-
 src/audio/directsound/SDL_directsound.h       |    2 +-
 src/audio/disk/SDL_diskaudio.c                |   62 +-
 src/audio/disk/SDL_diskaudio.h                |    2 +-
 src/audio/dsp/SDL_dspaudio.c                  |   51 +-
 src/audio/dsp/SDL_dspaudio.h                  |    4 +-
 src/audio/dummy/SDL_dummyaudio.c              |   16 +-
 src/audio/dummy/SDL_dummyaudio.h              |    2 +-
 src/audio/emscripten/SDL_emscriptenaudio.c    |   57 +-
 src/audio/emscripten/SDL_emscriptenaudio.h    |    2 +-
 src/audio/haiku/SDL_haikuaudio.cc             |   21 +-
 src/audio/haiku/SDL_haikuaudio.h              |    2 +-
 src/audio/jack/SDL_jackaudio.c                |  146 +-
 src/audio/n3ds/SDL_n3dsaudio.c                |   61 +-
 src/audio/netbsd/SDL_netbsdaudio.c            |   49 +-
 src/audio/netbsd/SDL_netbsdaudio.h            |    4 +-
 src/audio/openslES/SDL_openslES.c             |  112 +-
 src/audio/openslES/SDL_openslES.h             |   10 +-
 src/audio/pipewire/SDL_pipewire.c             |  291 +-
 src/audio/pipewire/SDL_pipewire.h             |    8 +-
 src/audio/ps2/SDL_ps2audio.c                  |   40 +-
 src/audio/ps2/SDL_ps2audio.h                  |   18 +-
 src/audio/psp/SDL_pspaudio.c                  |   16 +-
 src/audio/psp/SDL_pspaudio.h                  |   13 +-
 src/audio/pulseaudio/SDL_pulseaudio.c         |  290 +-
 src/audio/pulseaudio/SDL_pulseaudio.h         |    2 +-
 src/audio/sndio/SDL_sndioaudio.c              |   83 +-
 src/audio/sndio/SDL_sndioaudio.h              |    2 +-
 src/audio/vita/SDL_vitaaudio.c                |   25 +-
 src/audio/vita/SDL_vitaaudio.h                |   13 +-
 src/audio/wasapi/SDL_wasapi.c                 |  160 +-
 src/audio/wasapi/SDL_wasapi_win32.c           |   43 +-
 src/audio/wasapi/SDL_wasapi_winrt.cpp         |  125 +-
 src/core/android/SDL_android.c                |  608 +-
 src/core/android/SDL_android.h                |   28 +-
 .../freebsd/SDL_evdev_kbd_default_keyaccmap.h |    2 +
 src/core/freebsd/SDL_evdev_kbd_freebsd.c      |   77 +-
 src/core/gdk/SDL_gdk.cpp                      |   23 +-
 src/core/linux/SDL_dbus.c                     |   91 +-
 src/core/linux/SDL_dbus.h                     |   14 +-
 src/core/linux/SDL_evdev.c                    |  133 +-
 src/core/linux/SDL_evdev.h                    |    1 -
 src/core/linux/SDL_evdev_capabilities.c       |   10 +-
 src/core/linux/SDL_evdev_capabilities.h       |   22 +-
 src/core/linux/SDL_evdev_kbd.c                |   92 +-
 src/core/linux/SDL_evdev_kbd_default_keymap.h |    6 +-
 src/core/linux/SDL_fcitx.c                    |   77 +-
 src/core/linux/SDL_fcitx.h                    |    1 -
 src/core/linux/SDL_ibus.c                     |  194 +-
 src/core/linux/SDL_ibus.h                     |    4 +-
 src/core/linux/SDL_ime.c                      |   18 +-
 src/core/linux/SDL_ime.h                      |    1 -
 src/core/linux/SDL_sandbox.c                  |    4 +-
 src/core/linux/SDL_threadprio.c               |   42 +-
 src/core/linux/SDL_udev.c                     |   76 +-
 src/core/linux/SDL_udev.h                     |   13 +-
 src/core/openbsd/SDL_wscons.h                 |    2 -
 src/core/openbsd/SDL_wscons_kbd.c             |  839 +--
 src/core/openbsd/SDL_wscons_mouse.c           |  106 +-
 src/core/unix/SDL_poll.c                      |    9 +-
 src/core/unix/SDL_poll.h                      |    7 +-
 src/core/windows/SDL_directx.h                |   33 +-
 src/core/windows/SDL_hid.c                    |   10 +-
 src/core/windows/SDL_hid.h                    |  237 +-
 src/core/windows/SDL_immdevice.c              |   79 +-
 src/core/windows/SDL_immdevice.h              |    1 -
 src/core/windows/SDL_windows.c                |  113 +-
 src/core/windows/SDL_windows.h                |   32 +-
 src/core/windows/SDL_xinput.c                 |   21 +-
 src/core/windows/SDL_xinput.h                 |   73 +-
 src/core/winrt/SDL_winrtapp_common.cpp        |    7 +-
 src/core/winrt/SDL_winrtapp_direct3d.cpp      |  288 +-
 src/core/winrt/SDL_winrtapp_direct3d.h        |   75 +-
 src/core/winrt/SDL_winrtapp_xaml.cpp          |   41 +-
 src/core/winrt/SDL_winrtapp_xaml.h            |    3 +-
 src/cpuinfo/SDL_cpuinfo.c                     |  472 +-
 src/dynapi/SDL_dynapi.c                       |  318 +-
 src/dynapi/SDL_dynapi.h                       |   18 +-
 src/events/SDL_clipboardevents.c              |    4 +-
 src/events/SDL_displayevents.c                |    4 +-
 src/events/SDL_dropevents.c                   |   16 +-
 src/events/SDL_events.c                       |  655 +-
 src/events/SDL_events_c.h                     |    2 +-
 src/events/SDL_gesture.c                      |  235 +-
 src/events/SDL_gesture_c.h                    |    2 +-
 src/events/SDL_keyboard.c                     |  117 +-
 src/events/SDL_keyboard_c.h                   |    7 +-
 src/events/SDL_keysym_to_scancode_c.h         |    1 -
 src/events/SDL_mouse.c                        |  128 +-
 src/events/SDL_mouse_c.h                      |   36 +-
 src/events/SDL_quit.c                         |   70 +-
 src/events/SDL_touch.c                        |   68 +-
 src/events/SDL_touch_c.h                      |    7 +-
 src/events/SDL_windowevents.c                 |   26 +-
 src/events/SDL_windowevents_c.h               |    2 +-
 src/events/blank_cursor.h                     |    8 +-
 src/events/scancodes_ascii.h                  |  257 +-
 src/file/SDL_rwops.c                          |  203 +-
 src/file/cocoa/SDL_rwopsbundlesupport.h       |    2 +-
 src/file/cocoa/SDL_rwopsbundlesupport.m       |   45 +-
 src/filesystem/android/SDL_sysfilesystem.c    |    4 +-
 src/filesystem/cocoa/SDL_sysfilesystem.m      |  154 +-
 src/filesystem/dummy/SDL_sysfilesystem.c      |    1 -
 src/filesystem/emscripten/SDL_sysfilesystem.c |    7 +-
 src/filesystem/n3ds/SDL_sysfilesystem.c       |    1 -
 src/filesystem/ps2/SDL_sysfilesystem.c        |  122 +-
 src/filesystem/psp/SDL_sysfilesystem.c        |    5 +-
 src/filesystem/riscos/SDL_sysfilesystem.c     |   14 +-
 src/filesystem/unix/SDL_sysfilesystem.c       |   52 +-
 src/filesystem/vita/SDL_sysfilesystem.c       |    5 +-
 src/filesystem/windows/SDL_sysfilesystem.c    |   16 +-
 src/filesystem/winrt/SDL_sysfilesystem.cpp    |   90 +-
 src/haptic/SDL_haptic.c                       |  146 +-
 src/haptic/SDL_syshaptic.h                    |   65 +-
 src/haptic/android/SDL_syshaptic.c            |  133 +-
 src/haptic/darwin/SDL_syshaptic.c             |  295 +-
 src/haptic/darwin/SDL_syshaptic_c.h           |    5 +-
 src/haptic/dummy/SDL_syshaptic.c              |   90 +-
 src/haptic/linux/SDL_syshaptic.c              |  292 +-
 src/haptic/windows/SDL_dinputhaptic.c         |  309 +-
 src/haptic/windows/SDL_dinputhaptic_c.h       |   30 +-
 src/haptic/windows/SDL_windowshaptic.c        |   92 +-
 src/haptic/windows/SDL_windowshaptic_c.h      |   16 +-
 src/haptic/windows/SDL_xinputhaptic.c         |  141 +-
 src/haptic/windows/SDL_xinputhaptic_c.h       |   30 +-
 src/hidapi/SDL_hidapi.c                       |  471 +-
 src/joystick/SDL_gamecontroller.c             |  395 +-
 src/joystick/SDL_gamecontrollerdb.h           |    6 +-
 src/joystick/SDL_joystick.c                   |  464 +-
 src/joystick/SDL_sysjoystick.h                |   69 +-
 src/joystick/android/SDL_sysjoystick.c        |  351 +-
 src/joystick/android/SDL_sysjoystick_c.h      |    4 +-
 src/joystick/apple/SDL_mfijoystick.m          |  318 +-
 src/joystick/apple/SDL_mfijoystick_c.h        |    1 -
 src/joystick/bsd/SDL_bsdjoystick.c            |  273 +-
 src/joystick/darwin/SDL_iokitjoystick.c       |  356 +-
 src/joystick/darwin/SDL_iokitjoystick_c.h     |   34 +-
 src/joystick/dummy/SDL_sysjoystick.c          |   64 +-
 src/joystick/emscripten/SDL_sysjoystick.c     |  105 +-
 src/joystick/emscripten/SDL_sysjoystick_c.h   |   27 +-
 src/joystick/hidapi/SDL_hidapi_combined.c     |   55 +-
 src/joystick/hidapi/SDL_hidapi_gamecube.c     |  157 +-
 src/joystick/hidapi/SDL_hidapi_luna.c         |   79 +-
 src/joystick/hidapi/SDL_hidapi_nintendo.h     |   34 +-
 src/joystick/hidapi/SDL_hidapi_ps3.c          |  131 +-
 src/joystick/hidapi/SDL_hidapi_ps4.c          |  130 +-
 src/joystick/hidapi/SDL_hidapi_ps5.c          |  319 +-
 src/joystick/hidapi/SDL_hidapi_rumble.c       |   11 +-
 src/joystick/hidapi/SDL_hidapi_shield.c       |  208 +-
 src/joystick/hidapi/SDL_hidapi_stadia.c       |   67 +-
 src/joystick/hidapi/SDL_hidapi_steam.c        |  706 +--
 src/joystick/hidapi/SDL_hidapi_switch.c       |  350 +-
 src/joystick/hidapi/SDL_hidapi_wii.c          |  548 +-
 src/joystick/hidapi/SDL_hidapi_xbox360.c      |   74 +-
 src/joystick/hidapi/SDL_hidapi_xbox360w.c     |   76 +-
 src/joystick/hidapi/SDL_hidapi_xboxone.c      |  203 +-
 src/joystick/hidapi/SDL_hidapijoystick.c      |  166 +-
 src/joystick/hidapi/SDL_hidapijoystick_c.h    |   13 +-
 src/joystick/linux/SDL_sysjoystick.c          |  332 +-
 src/joystick/linux/SDL_sysjoystick_c.h        |    6 +-
 src/joystick/n3ds/SDL_sysjoystick.c           |   62 +-
 src/joystick/ps2/SDL_sysjoystick.c            |   72 +-
 src/joystick/psp/SDL_sysjoystick.c            |   47 +-
 src/joystick/steam/SDL_steamcontroller.c      |    1 -
 src/joystick/usb_ids.h                        |  188 +-
 src/joystick/virtual/SDL_virtualjoystick.c    |  118 +-
 src/joystick/virtual/SDL_virtualjoystick_c.h  |   11 +-
 src/joystick/vita/SDL_sysjoystick.c           |   92 +-
 src/joystick/windows/SDL_dinputjoystick.c     |  193 +-
 src/joystick/windows/SDL_dinputjoystick_c.h   |   10 +-
 src/joystick/windows/SDL_rawinputjoystick.c   |  326 +-
 src/joystick/windows/SDL_rawinputjoystick_c.h |    1 -
 .../windows/SDL_windows_gaming_input.c        |  119 +-
 src/joystick/windows/SDL_windowsjoystick.c    |  169 +-
 src/joystick/windows/SDL_windowsjoystick_c.h  |    6 +-
 src/joystick/windows/SDL_xinputjoystick.c     |   81 +-
 src/joystick/windows/SDL_xinputjoystick_c.h   |   10 +-
 src/loadso/dlopen/SDL_sysloadso.c             |    8 +-
 src/loadso/dummy/SDL_sysloadso.c              |    4 +-
 src/loadso/windows/SDL_sysloadso.c            |   12 +-
 src/locale/SDL_locale.c                       |   32 +-
 src/locale/SDL_syslocale.h                    |    1 -
 src/locale/android/SDL_syslocale.c            |    4 +-
 src/locale/dummy/SDL_syslocale.c              |    4 +-
 src/locale/emscripten/SDL_syslocale.c         |    6 +-
 src/locale/macos/SDL_syslocale.m              |   82 +-
 src/locale/n3ds/SDL_syslocale.c               |    3 +-
 src/locale/unix/SDL_syslocale.c               |   16 +-
 src/locale/vita/SDL_syslocale.c               |    4 +-
 src/locale/windows/SDL_syslocale.c            |   41 +-
 src/locale/winrt/SDL_syslocale.c              |   16 +-
 src/main/dummy/SDL_dummy_main.c               |    6 +-
 src/main/gdk/SDL_gdk_main.c                   |    2 +-
 src/main/haiku/SDL_BApp.h                     |  197 +-
 src/main/haiku/SDL_BeApp.cc                   |    3 +-
 src/main/n3ds/SDL_n3ds_main.c                 |    3 +-
 src/main/ngage/SDL_ngage_main.cpp             |   23 +-
 src/main/ps2/SDL_ps2_main.c                   |   20 +-
 src/main/psp/SDL_psp_main.c                   |    6 +-
 src/main/uikit/SDL_uikit_main.c               |    3 +-
 src/main/windows/SDL_windows_main.c           |   23 +-
 src/main/winrt/SDL3-WinRTResources.rc         |    3 +-
 src/main/winrt/SDL_winrt_main_NonXAML.cpp     |    2 +-
 src/misc/SDL_url.c                            |    3 +-
 src/misc/android/SDL_sysurl.c                 |    4 +-
 src/misc/dummy/SDL_sysurl.c                   |    4 +-
 src/misc/emscripten/SDL_sysurl.c              |    7 +-
 src/misc/ios/SDL_sysurl.m                     |   16 +-
 src/misc/macos/SDL_sysurl.m                   |   16 +-
 src/misc/riscos/SDL_sysurl.c                  |    4 +-
 src/misc/unix/SDL_sysurl.c                    |   24 +-
 src/misc/vita/SDL_sysurl.c                    |    4 +-
 src/misc/windows/SDL_sysurl.c                 |   11 +-
 src/misc/winrt/SDL_sysurl.cpp                 |    6 +-
 src/power/SDL_power.c                         |   30 +-
 src/power/SDL_syspower.h                      |    1 -
 src/power/android/SDL_syspower.c              |    2 +-
 src/power/emscripten/SDL_syspower.c           |    1 -
 src/power/haiku/SDL_syspower.c                |   37 +-
 src/power/linux/SDL_syspower.c                |  195 +-
 src/power/macos/SDL_syspower.c                |   41 +-
 src/power/n3ds/SDL_syspower.c                 |    3 +-
 src/power/psp/SDL_syspower.c                  |   14 +-
 src/power/uikit/SDL_syspower.h                |    3 +-
 src/power/uikit/SDL_syspower.m                |   14 +-
 src/power/vita/SDL_syspower.c                 |   14 +-
 src/power/windows/SDL_syspower.c              |   19 +-
 src/power/winrt/SDL_syspower.cpp              |    6 +-
 src/render/SDL_d3dmath.c                      |    1 -
 src/render/SDL_d3dmath.h                      |    7 +-
 src/render/SDL_render.c                       |  938 ++-
 src/render/SDL_sysrender.h                    |  145 +-
 src/render/SDL_yuv_sw.c                       |  233 +-
 src/render/SDL_yuv_sw_c.h                     |   21 +-
 src/render/direct3d/SDL_render_d3d.c          |  484 +-
 src/render/direct3d/SDL_shaders_d3d.c         |    2 -
 src/render/direct3d/SDL_shaders_d3d.h         |    3 +-
 src/render/direct3d11/SDL_render_d3d11.c      | 1010 ++-
 src/render/direct3d11/SDL_render_winrt.cpp    |    6 +-
 src/render/direct3d11/SDL_render_winrt.h      |    3 +-
 src/render/direct3d11/SDL_shaders_d3d11.c     |   36 +-
 src/render/direct3d11/SDL_shaders_d3d11.h     |    3 +-
 src/render/direct3d12/SDL_render_d3d12.c      | 1280 ++--
 src/render/direct3d12/SDL_shaders_d3d12.c     |  111 +-
 src/render/direct3d12/SDL_shaders_d3d12.h     |    8 +-
 src/render/metal/SDL_render_metal.m           | 1832 +++---
 src/render/opengl/SDL_glfuncs.h               |  284 +-
 src/render/opengl/SDL_render_gl.c             |  773 ++-
 src/render/opengl/SDL_shaders_gl.c            |   66 +-
 src/render/opengl/SDL_shaders_gl.h            |    5 +-
 src/render/opengles/SDL_glesfuncs.h           |    4 +-
 src/render/opengles/SDL_render_gles.c         |  480 +-
 src/render/opengles2/SDL_gles2funcs.h         |    6 +-
 src/render/opengles2/SDL_render_gles2.c       |  790 ++-
 src/render/opengles2/SDL_shaders_gles2.c      |    4 +-
 src/render/ps2/SDL_render_ps2.c               |  393 +-
 src/render/psp/SDL_render_psp.c               |  793 ++-
 src/render/software/SDL_blendfillrect.c       |   43 +-
 src/render/software/SDL_blendfillrect.h       |    5 +-
 src/render/software/SDL_blendline.c           |   81 +-
 src/render/software/SDL_blendline.h           |    5 +-
 src/render/software/SDL_blendpoint.c          |   41 +-
 src/render/software/SDL_blendpoint.h          |    5 +-
 src/render/software/SDL_draw.h                |  704 ++-
 src/render/software/SDL_drawline.c            |   49 +-
 src/render/software/SDL_drawline.h            |    5 +-
 src/render/software/SDL_drawpoint.c           |    9 +-
 src/render/software/SDL_drawpoint.h           |    5 +-
 src/render/software/SDL_render_sw.c           |  662 +-
 src/render/software/SDL_render_sw_c.h         |    2 +-
 src/render/software/SDL_rotate.c              |  189 +-
 src/render/software/SDL_rotate.h              |    6 +-
 src/render/software/SDL_triangle.c            |  193 +-
 src/render/software/SDL_triangle.h            |   14 +-
 src/render/vitagxm/SDL_render_vita_gxm.c      |  588 +-
 .../vitagxm/SDL_render_vita_gxm_memory.c      |   25 +-
 .../vitagxm/SDL_render_vita_gxm_memory.h      |    4 +-
 .../vitagxm/SDL_render_vita_gxm_shaders.h     |   16 +-
 .../vitagxm/SDL_render_vita_gxm_tools.c       |  322 +-
 .../vitagxm/SDL_render_vita_gxm_tools.h       |    3 +-
 .../vitagxm/SDL_render_vita_gxm_types.h       |   58 +-
 src/sensor/SDL_sensor.c                       |   62 +-
 src/sensor/SDL_syssensor.h                    |   24 +-
 src/sensor/android/SDL_androidsensor.c        |   48 +-
 src/sensor/android/SDL_androidsensor.h        |    1 -
 src/sensor/coremotion/SDL_coremotionsensor.h  |    1 -
 src/sensor/coremotion/SDL_coremotionsensor.m  |   97 +-
 src/sensor/dummy/SDL_dummysensor.c            |   38 +-
 src/sensor/n3ds/SDL_n3dssensor.c              |   47 +-
 src/sensor/vita/SDL_vitasensor.c              |   85 +-
 src/sensor/windows/SDL_windowssensor.c        |   60 +-
 src/stdlib/SDL_crc16.c                        |    6 +-
 src/stdlib/SDL_crc32.c                        |    6 +-
 src/stdlib/SDL_getenv.c                       |   47 +-
 src/stdlib/SDL_iconv.c                        |  773 ++-
 src/stdlib/SDL_mslibc.c                       |   60 +-
 src/stdlib/SDL_stdlib.c                       |  143 +-
 src/stdlib/SDL_string.c                       |  328 +-
 src/stdlib/SDL_vacopy.h                       |    6 +-
 src/test/SDL_test_assert.c                    |    2 +-
 src/test/SDL_test_common.c                    |  377 +-
 src/test/SDL_test_compare.c                   |  147 +-
 src/test/SDL_test_crc32.c                     |  181 +-
 src/test/SDL_test_font.c                      | 4165 ++++++------
 src/test/SDL_test_fuzzer.c                    |  230 +-
 src/test/SDL_test_harness.c                   |  175 +-
 src/test/SDL_test_imageBlit.c                 | 3102 ++++-----
 src/test/SDL_test_imageBlitBlend.c            | 5623 +++++++++--------
 src/test/SDL_test_imageFace.c                 |  408 +-
 src/test/SDL_test_imagePrimitives.c           |  956 +--
 src/test/SDL_test_imagePrimitivesBlend.c      | 1311 ++--
 src/test/SDL_test_log.c                       |    4 +-
 src/test/SDL_test_md5.c                       |  434 +-
 src/test/SDL_test_memory.c                    |   22 +-
 src/test/SDL_test_random.c                    |  100 +-
 src/thread/SDL_systhread.h                    |   10 +-
 src/thread/SDL_thread.c                       |   85 +-
 src/thread/SDL_thread_c.h                     |   17 +-
 src/thread/generic/SDL_syscond.c              |   18 +-
 src/thread/generic/SDL_syscond_c.h            |   15 +-
 src/thread/generic/SDL_sysmutex.c             |   15 +-
 src/thread/generic/SDL_syssem.c               |   39 +-
 src/thread/generic/SDL_systhread.c            |   22 +-
 src/thread/generic/SDL_systls.c               |    4 +-
 src/thread/n3ds/SDL_syscond.c                 |   19 +-
 src/thread/n3ds/SDL_sysmutex.c                |   14 +-
 src/thread/n3ds/SDL_sysmutex_c.h              |    1 -
 src/thread/n3ds/SDL_syssem.c                  |   18 +-
 src/thread/n3ds/SDL_systhread.c               |   24 +-
 src/thread/ngage/SDL_sysmutex.cpp             |   17 +-
 src/thread/ngage/SDL_syssem.cpp               |   40 +-
 src/thread/ngage/SDL_systhread.cpp            |   32 +-
 src/thread/ps2/SDL_syssem.c                   |   15 +-
 src/thread/ps2/SDL_systhread.c                |   30 +-
 src/thread/psp/SDL_syscond.c                  |   18 +-
 src/thread/psp/SDL_sysmutex.c                 |   36 +-
 src/thread/psp/SDL_syssem.c                   |   27 +-
 src/thread/psp/SDL_systhread.c                |   12 +-
 src/thread/pthread/SDL_syscond.c              |   19 +-
 src/thread/pthread/SDL_sysmutex.c             |   15 +-
 src/thread/pthread/SDL_syssem.c               |   28 +-
 src/thread/pthread/SDL_systhread.c            |   90 +-
 src/thread/pthread/SDL_systls.c               |    4 +-
 src/thread/stdcpp/SDL_syscond.cpp             |   40 +-
 src/thread/stdcpp/SDL_sysmutex.cpp            |   28 +-
 src/thread/stdcpp/SDL_systhread.cpp           |   47 +-
 src/thread/stdcpp/SDL_systhread_c.h           |    2 +-
 src/thread/vita/SDL_syscond.c                 |   18 +-
 src/thread/vita/SDL_sysmutex.c                |   36 +-
 src/thread/vita/SDL_syssem.c                  |   11 +-
 src/thread/vita/SDL_systhread.c               |   57 +-
 src/thread/windows/SDL_syscond_cv.c           |   90 +-
 src/thread/windows/SDL_sysmutex.c             |   76 +-
 src/thread/windows/SDL_sysmutex_c.h           |   20 +-
 src/thread/windows/SDL_syssem.c               |  109 +-
 src/thread/windows/SDL_systhread.c            |   93 +-
 src/thread/windows/SDL_systls.c               |    5 +-
 src/timer/SDL_timer.c                         |   39 +-
 src/timer/SDL_timer_c.h                       |    2 +-
 src/timer/dummy/SDL_systimer.c                |   10 +-
 src/timer/haiku/SDL_systimer.c                |   12 +-
 src/timer/n3ds/SDL_systimer.c                 |    9 +-
 src/timer/ngage/SDL_systimer.cpp              |   20 +-
 src/timer/ps2/SDL_systimer.c                  |   12 +-
 src/timer/psp/SDL_systimer.c                  |    6 +-
 src/timer/unix/SDL_systimer.c                 |   13 +-
 src/timer/vita/SDL_systimer.c                 |    8 +-
 src/timer/windows/SDL_systimer.c              |   63 +-
 src/video/SDL_RLEaccel.c                      | 1104 ++--
 src/video/SDL_RLEaccel_c.h                    |    4 +-
 src/video/SDL_blit.c                          |   35 +-
 src/video/SDL_blit.h                          |  867 +--
 src/video/SDL_blit_0.c                        |   83 +-
 src/video/SDL_blit_1.c                        |   94 +-
 src/video/SDL_blit_A.c                        |  345 +-
 src/video/SDL_blit_N.c                        |  845 ++-
 src/video/SDL_blit_copy.c                     |   68 +-
 src/video/SDL_blit_copy.h                     |    2 +-
 src/video/SDL_blit_slow.c                     |   18 +-
 src/video/SDL_blit_slow.h                     |    2 +-
 src/video/SDL_bmp.c                           |  164 +-
 src/video/SDL_clipboard.c                     |    7 +-
 src/video/SDL_egl.c                           |  334 +-
 src/video/SDL_egl_c.h                         |  152 +-
 src/video/SDL_fillrect.c                      |  163 +-
 src/video/SDL_pixels.c                        |  208 +-
 src/video/SDL_pixels_c.h                      |   12 +-
 src/video/SDL_rect.c                          |   39 +-
 src/video/SDL_rect_c.h                        |    2 +-
 src/video/SDL_rect_impl.h                     |   54 +-
 src/video/SDL_shape.c                         |  203 +-
 src/video/SDL_shape_internals.h               |   28 +-
 src/video/SDL_stretch.c                       |  405 +-
 src/video/SDL_surface.c                       |  191 +-
 src/video/SDL_sysvideo.h                      |  238 +-
 src/video/SDL_video.c                         |  807 +--
 src/video/SDL_vulkan_internal.h               |    6 +-
 src/video/SDL_vulkan_utils.c                  |  196 +-
 src/video/SDL_yuv.c                           |  781 ++-
 src/video/SDL_yuv_c.h                         |    1 -
 src/video/android/SDL_androidclipboard.c      |    3 +-
 src/video/android/SDL_androidevents.c         |   44 +-
 src/video/android/SDL_androidgl.c             |   20 +-
 src/video/android/SDL_androidgl.h             |    7 +-
 src/video/android/SDL_androidkeyboard.c       |  578 +-
 src/video/android/SDL_androidkeyboard.h       |    2 +-
 src/video/android/SDL_androidmessagebox.c     |    3 +-
 src/video/android/SDL_androidmouse.c          |  116 +-
 src/video/android/SDL_androidtouch.c          |   36 +-
 src/video/android/SDL_androidvideo.c          |   96 +-
 src/video/android/SDL_androidvideo.h          |    6 +-
 src/video/android/SDL_androidvulkan.c         |   29 +-
 src/video/android/SDL_androidvulkan.h         |   12 +-
 src/video/android/SDL_androidwindow.c         |   28 +-
 src/video/android/SDL_androidwindow.h         |    4 +-
 src/video/cocoa/SDL_cocoaclipboard.h          |    2 +-
 src/video/cocoa/SDL_cocoaclipboard.m          |  101 +-
 src/video/cocoa/SDL_cocoaevents.h             |    2 +-
 src/video/cocoa/SDL_cocoaevents.m             |  297 +-
 src/video/cocoa/SDL_cocoakeyboard.h           |    4 +-
 src/video/cocoa/SDL_cocoakeyboard.m           |  189 +-
 src/video/cocoa/SDL_cocoamessagebox.m         |   59 +-
 src/video/cocoa/SDL_cocoametalview.h          |   12 +-
 src/video/cocoa/SDL_cocoametalview.m          |  116 +-
 src/video/cocoa/SDL_cocoamodes.h              |   10 +-
 src/video/cocoa/SDL_cocoamodes.m              |  387 +-
 src/video/cocoa/SDL_cocoamouse.h              |    7 +-
 src/video/cocoa/SDL_cocoamouse.m              |  322 +-
 src/video/cocoa/SDL_cocoaopengl.h             |   25 +-
 src/video/cocoa/SDL_cocoaopengl.m             |  472 +-
 src/video/cocoa/SDL_cocoaopengles.h           |   20 +-
 src/video/cocoa/SDL_cocoaopengles.m           |  180 +-
 src/video/cocoa/SDL_cocoashape.h              |   10 +-
 src/video/cocoa/SDL_cocoashape.m              |  153 +-
 src/video/cocoa/SDL_cocoavideo.h              |   18 +-
 src/video/cocoa/SDL_cocoavideo.m              |  317 +-
 src/video/cocoa/SDL_cocoavulkan.h             |   13 +-
 src/video/cocoa/SDL_cocoavulkan.m             |   81 +-
 src/video/cocoa/SDL_cocoawindow.h             |  179 +-
 src/video/cocoa/SDL_cocoawindow.m             | 1626 +++--
 src/video/dummy/SDL_nullevents.c              |    3 +-
 src/video/dummy/SDL_nullframebuffer.c         |   13 +-
 src/video/dummy/SDL_nullframebuffer_c.h       |    6 +-
 src/video/dummy/SDL_nullvideo.c               |   46 +-
 src/video/emscripten/SDL_emscriptenevents.c   |  879 ++-
 src/video/emscripten/SDL_emscriptenevents.h   |    2 -
 .../emscripten/SDL_emscriptenframebuffer.c    |   15 +-
 .../emscripten/SDL_emscriptenframebuffer.h    |    6 +-
 src/video/emscripten/SDL_emscriptenmouse.c    |  140 +-
 src/video/emscripten/SDL_emscriptenmouse.h    |    2 -
 src/video/emscripten/SDL_emscriptenopengles.c |   37 +-
 src/video/emscripten/SDL_emscriptenopengles.h |    8 +-
 src/video/emscripten/SDL_emscriptenvideo.c    |   80 +-
 src/video/haiku/SDL_BApp.h                    |  197 +-
 src/video/haiku/SDL_BWin.h                    |  389 +-
 src/video/haiku/SDL_bframebuffer.h            |   12 +-
 src/video/haiku/SDL_bmodes.h                  |    4 +-
 src/video/haiku/SDL_bopengl.h                 |   19 +-
 src/video/haiku/SDL_bvideo.cc                 |   18 +-
 src/video/haiku/SDL_bvideo.h                  |    1 -
 src/video/haiku/SDL_bwindow.h                 |   38 +-
 src/video/kmsdrm/SDL_kmsdrmdyn.c              |   44 +-
 src/video/kmsdrm/SDL_kmsdrmdyn.h              |    6 +-
 src/video/kmsdrm/SDL_kmsdrmevents.c           |    2 -
 src/video/kmsdrm/SDL_kmsdrmmouse.c            |  132 +-
 src/video/kmsdrm/SDL_kmsdrmmouse.h            |    6 +-
 src/video/kmsdrm/SDL_kmsdrmopengles.c         |   33 +-
 src/video/kmsdrm/SDL_kmsdrmopengles.h         |   12 +-
 src/video/kmsdrm/SDL_kmsdrmvideo.c            |  288 +-
 src/video/kmsdrm/SDL_kmsdrmvideo.h            |   56 +-
 src/video/kmsdrm/SDL_kmsdrmvulkan.c           |   87 +-
 src/video/kmsdrm/SDL_kmsdrmvulkan.h           |   12 +-
 src/video/n3ds/SDL_n3dsevents.c               |    3 +-
 src/video/n3ds/SDL_n3dsframebuffer.c          |   23 +-
 src/video/n3ds/SDL_n3dsswkb.c                 |   15 +-
 src/video/n3ds/SDL_n3dstouch.c                |    9 +-
 src/video/n3ds/SDL_n3dsvideo.c                |   32 +-
 src/video/ngage/SDL_ngageevents.cpp           |  225 +-
 src/video/ngage/SDL_ngageframebuffer.cpp      |  246 +-
 src/video/ngage/SDL_ngageframebuffer_c.h      |   10 +-
 src/video/ngage/SDL_ngagevideo.cpp            |   51 +-
 src/video/ngage/SDL_ngagevideo.h              |   38 +-
 src/video/ngage/SDL_ngagewindow.cpp           |   32 +-
 src/video/ngage/SDL_ngagewindow.h             |   11 +-
 src/video/offscreen/SDL_offscreenevents.c     |    3 +-
 .../offscreen/SDL_offscreenframebuffer.c      |   13 +-
 .../offscreen/SDL_offscreenframebuffer_c.h    |    6 +-
 src/video/offscreen/SDL_offscreenopengles.c   |   17 +-
 src/video/offscreen/SDL_offscreenopengles.h   |    1 -
 src/video/offscreen/SDL_offscreenvideo.c      |   20 +-
 src/video/offscreen/SDL_offscreenwindow.c     |    8 +-
 src/video/offscreen/SDL_offscreenwindow.h     |    7 +-
 src/video/ps2/SDL_ps2video.c                  |   13 +-
 src/video/psp/SDL_pspevents.c                 |   61 +-
 src/video/psp/SDL_pspevents_c.h               |    1 -
 src/video/psp/SDL_pspgl.c                     |  152 +-
 src/video/psp/SDL_pspgl_c.h                   |   22 +-
 src/video/psp/SDL_pspmouse.c                  |    4 +-
 src/video/psp/SDL_pspvideo.c                  |   92 +-
 src/video/psp/SDL_pspvideo.h                  |   49 +-
 src/video/raspberry/SDL_rpievents.c           |    2 -
 src/video/raspberry/SDL_rpimouse.c            |  142 +-
 src/video/raspberry/SDL_rpimouse.h            |   10 +-
 src/video/raspberry/SDL_rpiopengles.c         |   19 +-
 src/video/raspberry/SDL_rpiopengles.h         |   14 +-
 src/video/raspberry/SDL_rpivideo.c            |  155 +-
 src/video/raspberry/SDL_rpivideo.h            |   47 +-
 src/video/riscos/SDL_riscosdefs.h             |    6 +-
 src/video/riscos/SDL_riscosevents.c           |   24 +-
 src/video/riscos/SDL_riscosframebuffer.c      |   20 +-
 sr

(Patch may be truncated, please check the link at the top of this post.)