sdl2-compat: updated SDL2 headers to latest revisions.

From aeb6c79435f0082a07872239f45f750c5122af6a Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 9 Mar 2023 20:56:24 +0300
Subject: [PATCH] updated SDL2 headers to latest revisions.

---
 include/SDL2/SDL.h                   |  2 +-
 include/SDL2/SDL_assert.h            | 14 ++---
 include/SDL2/SDL_atomic.h            |  5 +-
 include/SDL2/SDL_audio.h             |  2 +-
 include/SDL2/SDL_bits.h              |  2 +-
 include/SDL2/SDL_blendmode.h         |  2 +-
 include/SDL2/SDL_clipboard.h         |  2 +-
 include/SDL2/SDL_config.h            |  2 +-
 include/SDL2/SDL_config.h.cmake      |  8 ++-
 include/SDL2/SDL_config.h.in         |  5 +-
 include/SDL2/SDL_config_android.h    |  2 +-
 include/SDL2/SDL_config_emscripten.h |  2 +-
 include/SDL2/SDL_config_iphoneos.h   |  2 +-
 include/SDL2/SDL_config_macosx.h     |  2 +-
 include/SDL2/SDL_config_minimal.h    |  4 +-
 include/SDL2/SDL_config_ngage.h      |  2 +-
 include/SDL2/SDL_config_os2.h        |  2 +-
 include/SDL2/SDL_config_pandora.h    |  2 +-
 include/SDL2/SDL_config_windows.h    |  4 +-
 include/SDL2/SDL_config_wingdk.h     |  2 +-
 include/SDL2/SDL_config_winrt.h      |  2 +-
 include/SDL2/SDL_config_xbox.h       | 19 +++---
 include/SDL2/SDL_copying.h           |  2 +-
 include/SDL2/SDL_cpuinfo.h           |  2 +-
 include/SDL2/SDL_egl.h               |  2 +-
 include/SDL2/SDL_endian.h            |  2 +-
 include/SDL2/SDL_error.h             |  2 +-
 include/SDL2/SDL_events.h            |  2 +-
 include/SDL2/SDL_filesystem.h        |  2 +-
 include/SDL2/SDL_gamecontroller.h    | 10 ++--
 include/SDL2/SDL_gesture.h           |  2 +-
 include/SDL2/SDL_guid.h              |  2 +-
 include/SDL2/SDL_haptic.h            |  2 +-
 include/SDL2/SDL_hidapi.h            |  2 +-
 include/SDL2/SDL_hints.h             | 24 +++++++-
 include/SDL2/SDL_joystick.h          | 15 +++--
 include/SDL2/SDL_keyboard.h          |  2 +-
 include/SDL2/SDL_keycode.h           |  2 +-
 include/SDL2/SDL_loadso.h            |  2 +-
 include/SDL2/SDL_locale.h            |  2 +-
 include/SDL2/SDL_log.h               |  2 +-
 include/SDL2/SDL_main.h              |  9 ++-
 include/SDL2/SDL_messagebox.h        |  2 +-
 include/SDL2/SDL_metal.h             |  2 +-
 include/SDL2/SDL_misc.h              |  2 +-
 include/SDL2/SDL_mouse.h             | 15 +++--
 include/SDL2/SDL_mutex.h             | 86 ++++++++++++++++++++++++++--
 include/SDL2/SDL_name.h              |  2 +-
 include/SDL2/SDL_opengl.h            |  2 +-
 include/SDL2/SDL_opengl_glext.h      |  6 +-
 include/SDL2/SDL_opengles.h          |  2 +-
 include/SDL2/SDL_opengles2.h         |  2 +-
 include/SDL2/SDL_pixels.h            |  2 +-
 include/SDL2/SDL_platform.h          |  2 +-
 include/SDL2/SDL_power.h             | 17 +++---
 include/SDL2/SDL_quit.h              |  2 +-
 include/SDL2/SDL_rect.h              |  2 +-
 include/SDL2/SDL_render.h            |  7 ++-
 include/SDL2/SDL_rwops.h             |  2 +-
 include/SDL2/SDL_scancode.h          |  2 +-
 include/SDL2/SDL_sensor.h            |  2 +-
 include/SDL2/SDL_shape.h             |  2 +-
 include/SDL2/SDL_stdinc.h            |  6 +-
 include/SDL2/SDL_surface.h           |  2 +-
 include/SDL2/SDL_system.h            |  2 +-
 include/SDL2/SDL_syswm.h             |  2 +-
 include/SDL2/SDL_test.h              |  2 +-
 include/SDL2/SDL_test_assert.h       |  2 +-
 include/SDL2/SDL_test_common.h       |  2 +-
 include/SDL2/SDL_test_compare.h      |  2 +-
 include/SDL2/SDL_test_crc32.h        |  2 +-
 include/SDL2/SDL_test_font.h         |  2 +-
 include/SDL2/SDL_test_fuzzer.h       |  2 +-
 include/SDL2/SDL_test_harness.h      |  2 +-
 include/SDL2/SDL_test_images.h       |  2 +-
 include/SDL2/SDL_test_log.h          |  2 +-
 include/SDL2/SDL_test_md5.h          |  2 +-
 include/SDL2/SDL_test_memory.h       |  2 +-
 include/SDL2/SDL_test_random.h       |  2 +-
 include/SDL2/SDL_thread.h            |  6 +-
 include/SDL2/SDL_timer.h             |  2 +-
 include/SDL2/SDL_touch.h             |  2 +-
 include/SDL2/SDL_types.h             |  2 +-
 include/SDL2/SDL_version.h           |  2 +-
 include/SDL2/SDL_video.h             |  5 +-
 include/SDL2/begin_code.h            | 16 +++---
 include/SDL2/close_code.h            |  6 +-
 87 files changed, 270 insertions(+), 149 deletions(-)

diff --git a/include/SDL2/SDL.h b/include/SDL2/SDL.h
index 12e7f31..9ba8f68 100644
--- a/include/SDL2/SDL.h
+++ b/include/SDL2/SDL.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_assert.h b/include/SDL2/SDL_assert.h
index e71cf97..87d5c1b 100644
--- a/include/SDL2/SDL_assert.h
+++ b/include/SDL2/SDL_assert.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -125,12 +125,10 @@ typedef struct SDL_AssertData
     const struct SDL_AssertData *next;
 } SDL_AssertData;
 
-#if (SDL_ASSERT_LEVEL > 0)
-
 /* Never call this directly. Use the SDL_assert* macros. */
 extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
-                                                             const char *,
-                                                             const char *, int)
+                                                            const char *,
+                                                            const char *, int)
 #if defined(__clang__)
 #if __has_feature(attribute_analyzer_noreturn)
 /* this tells Clang's static analysis that we're a custom assert function,
@@ -151,9 +149,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
 #define SDL_enabled_assert(condition) \
     do { \
         while ( !(condition) ) { \
-            static struct SDL_AssertData sdl_assert_data = { \
-                0, 0, #condition, 0, 0, 0, 0 \
-            }; \
+            static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
             const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
             if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
                 continue; /* go again. */ \
@@ -164,8 +160,6 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
         } \
     } while (SDL_NULL_WHILE_LOOP_CONDITION)
 
-#endif  /* enabled assertions support code */
-
 /* Enable various levels of assertions. */
 #if SDL_ASSERT_LEVEL == 0   /* assertions disabled */
 #   define SDL_assert(condition) SDL_disabled_assert(condition)
diff --git a/include/SDL2/SDL_atomic.h b/include/SDL2/SDL_atomic.h
index f0c05f4..8273287 100644
--- a/include/SDL2/SDL_atomic.h
+++ b/include/SDL2/SDL_atomic.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
 #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
     #define SDL_CPUPauseInstruction() __yield()
 #elif defined(__WATCOMC__) && defined(__386__)
-    /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes.  */
     extern __inline void SDL_CPUPauseInstruction(void);
-    #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h"
+    #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
 #else
     #define SDL_CPUPauseInstruction()
 #endif
diff --git a/include/SDL2/SDL_audio.h b/include/SDL2/SDL_audio.h
index c42de3e..2c0f211 100644
--- a/include/SDL2/SDL_audio.h
+++ b/include/SDL2/SDL_audio.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_bits.h b/include/SDL2/SDL_bits.h
index 22cb853..81161ae 100644
--- a/include/SDL2/SDL_bits.h
+++ b/include/SDL2/SDL_bits.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_blendmode.h b/include/SDL2/SDL_blendmode.h
index 08c9f9d..b862116 100644
--- a/include/SDL2/SDL_blendmode.h
+++ b/include/SDL2/SDL_blendmode.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_clipboard.h b/include/SDL2/SDL_clipboard.h
index 783c7c2..7c351fb 100644
--- a/include/SDL2/SDL_clipboard.h
+++ b/include/SDL2/SDL_clipboard.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config.h b/include/SDL2/SDL_config.h
index f91cb47..fd2fe88 100644
--- a/include/SDL2/SDL_config.h
+++ b/include/SDL2/SDL_config.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config.h.cmake b/include/SDL2/SDL_config.h.cmake
index 8fcb63d..7512bb1 100644
--- a/include/SDL2/SDL_config.h.cmake
+++ b/include/SDL2/SDL_config.h.cmake
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -332,6 +332,7 @@
 #cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
 #cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
 #cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@
+#cmakedefine SDL_INPUT_WSCONS @SDL_INPUT_WSCONS@
 #cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
 #cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
 #cmakedefine SDL_JOYSTICK_WGI @SDL_JOYSTICK_WGI@
@@ -359,6 +360,7 @@
 #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
 #cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
 #cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
+#cmakedefine SDL_UDEV_DYNAMIC @SDL_UDEV_DYNAMIC@
 
 /* Enable various sensor drivers */
 #cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
@@ -539,7 +541,9 @@
 #cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@
 #cmakedefine SDL_VIDEO_VITA_PVR_OGL @SDL_VIDEO_VITA_PVR_OGL@
 
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#cmakedefine SDL_HAVE_LIBDECOR_GET_MIN_MAX @SDL_HAVE_LIBDECOR_GET_MIN_MAX@
+
+#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
 /* Most everything except Visual Studio 2008 and earlier has stdint.h now */
 #if defined(_MSC_VER) && (_MSC_VER < 1600)
 typedef signed __int8 int8_t;
diff --git a/include/SDL2/SDL_config.h.in b/include/SDL2/SDL_config.h.in
index 7b8d848..d6460b7 100644
--- a/include/SDL2/SDL_config.h.in
+++ b/include/SDL2/SDL_config.h.in
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -491,4 +491,7 @@
 /* Enable dynamic libsamplerate support */
 #undef SDL_LIBSAMPLERATE_DYNAMIC
 
+/* Libdecor get min/max content size functions */
+#undef SDL_HAVE_LIBDECOR_GET_MIN_MAX
+
 #endif /* SDL_config_h_ */
diff --git a/include/SDL2/SDL_config_android.h b/include/SDL2/SDL_config_android.h
index 64918ae..d88c026 100644
--- a/include/SDL2/SDL_config_android.h
+++ b/include/SDL2/SDL_config_android.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_emscripten.h b/include/SDL2/SDL_config_emscripten.h
index 989e124..68660a1 100644
--- a/include/SDL2/SDL_config_emscripten.h
+++ b/include/SDL2/SDL_config_emscripten.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_iphoneos.h b/include/SDL2/SDL_config_iphoneos.h
index 6db16eb..02011c4 100644
--- a/include/SDL2/SDL_config_iphoneos.h
+++ b/include/SDL2/SDL_config_iphoneos.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_macosx.h b/include/SDL2/SDL_config_macosx.h
index e7189f3..d7ad6cc 100644
--- a/include/SDL2/SDL_config_macosx.h
+++ b/include/SDL2/SDL_config_macosx.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_minimal.h b/include/SDL2/SDL_config_minimal.h
index 2f2559e..d6dee64 100644
--- a/include/SDL2/SDL_config_minimal.h
+++ b/include/SDL2/SDL_config_minimal.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -34,7 +34,7 @@
 #define HAVE_STDARG_H   1
 #define HAVE_STDDEF_H   1
 
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
 /* Most everything except Visual Studio 2008 and earlier has stdint.h now */
 #if defined(_MSC_VER) && (_MSC_VER < 1600)
 typedef signed __int8 int8_t;
diff --git a/include/SDL2/SDL_config_ngage.h b/include/SDL2/SDL_config_ngage.h
index a9d2d37..25453b3 100644
--- a/include/SDL2/SDL_config_ngage.h
+++ b/include/SDL2/SDL_config_ngage.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_os2.h b/include/SDL2/SDL_config_os2.h
index c86769d..2effe1a 100644
--- a/include/SDL2/SDL_config_os2.h
+++ b/include/SDL2/SDL_config_os2.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_pandora.h b/include/SDL2/SDL_config_pandora.h
index 01bbf49..c74fa0c 100644
--- a/include/SDL2/SDL_config_pandora.h
+++ b/include/SDL2/SDL_config_pandora.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_windows.h b/include/SDL2/SDL_config_windows.h
index 58e0b7e..01322c1 100644
--- a/include/SDL2/SDL_config_windows.h
+++ b/include/SDL2/SDL_config_windows.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -52,7 +52,7 @@
 
 /* This is a set of defines to configure the SDL features */
 
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
 /* Most everything except Visual Studio 2008 and earlier has stdint.h now */
 #if defined(_MSC_VER) && (_MSC_VER < 1600)
 typedef signed __int8 int8_t;
diff --git a/include/SDL2/SDL_config_wingdk.h b/include/SDL2/SDL_config_wingdk.h
index 6f793d2..f9d3ff4 100644
--- a/include/SDL2/SDL_config_wingdk.h
+++ b/include/SDL2/SDL_config_wingdk.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_winrt.h b/include/SDL2/SDL_config_winrt.h
index da894c8..8efde90 100644
--- a/include/SDL2/SDL_config_winrt.h
+++ b/include/SDL2/SDL_config_winrt.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_config_xbox.h b/include/SDL2/SDL_config_xbox.h
index 54fa1a4..8baf78e 100644
--- a/include/SDL2/SDL_config_xbox.h
+++ b/include/SDL2/SDL_config_xbox.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -209,16 +209,21 @@
 #define SDL_VIDEO_DRIVER_DUMMY  1
 #define SDL_VIDEO_DRIVER_WINDOWS    1
 
-/* #ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    1
-#endif*/
-#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
-#define SDL_VIDEO_RENDER_D3D11  1
-#endif
 #if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H)
 #define SDL_VIDEO_RENDER_D3D12  1
 #endif
 
+/* Enable OpenGL support */
+#ifndef SDL_VIDEO_OPENGL
+#define SDL_VIDEO_OPENGL    1
+#endif
+#ifndef SDL_VIDEO_OPENGL_WGL
+#define SDL_VIDEO_OPENGL_WGL    1
+#endif
+#ifndef SDL_VIDEO_RENDER_OGL
+#define SDL_VIDEO_RENDER_OGL    1
+#endif
+
 /* Enable system power support */
 /*#define SDL_POWER_WINDOWS 1*/
 #define SDL_POWER_HARDWIRED 1
diff --git a/include/SDL2/SDL_copying.h b/include/SDL2/SDL_copying.h
index 49e3f9d..b6028ba 100644
--- a/include/SDL2/SDL_copying.h
+++ b/include/SDL2/SDL_copying.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_cpuinfo.h b/include/SDL2/SDL_cpuinfo.h
index b5ad0fc..ed5e979 100644
--- a/include/SDL2/SDL_cpuinfo.h
+++ b/include/SDL2/SDL_cpuinfo.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_egl.h b/include/SDL2/SDL_egl.h
index e8bd657..6f51c08 100644
--- a/include/SDL2/SDL_egl.h
+++ b/include/SDL2/SDL_egl.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_endian.h b/include/SDL2/SDL_endian.h
index c3f8431..582c3a8 100644
--- a/include/SDL2/SDL_endian.h
+++ b/include/SDL2/SDL_endian.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_error.h b/include/SDL2/SDL_error.h
index 5c961e4..31c2261 100644
--- a/include/SDL2/SDL_error.h
+++ b/include/SDL2/SDL_error.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_events.h b/include/SDL2/SDL_events.h
index 55a343e..9d09703 100644
--- a/include/SDL2/SDL_events.h
+++ b/include/SDL2/SDL_events.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_filesystem.h b/include/SDL2/SDL_filesystem.h
index 1914f81..4cad657 100644
--- a/include/SDL2/SDL_filesystem.h
+++ b/include/SDL2/SDL_filesystem.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_gamecontroller.h b/include/SDL2/SDL_gamecontroller.h
index 4703b63..140054d 100644
--- a/include/SDL2/SDL_gamecontroller.h
+++ b/include/SDL2/SDL_gamecontroller.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -724,10 +724,10 @@ typedef enum
     SDL_CONTROLLER_BUTTON_DPAD_LEFT,
     SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
     SDL_CONTROLLER_BUTTON_MISC1,    /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
-    SDL_CONTROLLER_BUTTON_PADDLE1,  /* Xbox Elite paddle P1 */
-    SDL_CONTROLLER_BUTTON_PADDLE2,  /* Xbox Elite paddle P3 */
-    SDL_CONTROLLER_BUTTON_PADDLE3,  /* Xbox Elite paddle P2 */
-    SDL_CONTROLLER_BUTTON_PADDLE4,  /* Xbox Elite paddle P4 */
+    SDL_CONTROLLER_BUTTON_PADDLE1,  /* Xbox Elite paddle P1 (upper left, facing the back) */
+    SDL_CONTROLLER_BUTTON_PADDLE2,  /* Xbox Elite paddle P3 (upper right, facing the back) */
+    SDL_CONTROLLER_BUTTON_PADDLE3,  /* Xbox Elite paddle P2 (lower left, facing the back) */
+    SDL_CONTROLLER_BUTTON_PADDLE4,  /* Xbox Elite paddle P4 (lower right, facing the back) */
     SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
     SDL_CONTROLLER_BUTTON_MAX
 } SDL_GameControllerButton;
diff --git a/include/SDL2/SDL_gesture.h b/include/SDL2/SDL_gesture.h
index e2caea2..db70b4d 100644
--- a/include/SDL2/SDL_gesture.h
+++ b/include/SDL2/SDL_gesture.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_guid.h b/include/SDL2/SDL_guid.h
index b971636..d964223 100644
--- a/include/SDL2/SDL_guid.h
+++ b/include/SDL2/SDL_guid.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_haptic.h b/include/SDL2/SDL_haptic.h
index f240ae9..2462a1e 100644
--- a/include/SDL2/SDL_haptic.h
+++ b/include/SDL2/SDL_haptic.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_hidapi.h b/include/SDL2/SDL_hidapi.h
index 354af5c..0575100 100644
--- a/include/SDL2/SDL_hidapi.h
+++ b/include/SDL2/SDL_hidapi.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_hints.h b/include/SDL2/SDL_hints.h
index 76a74f0..825de4b 100644
--- a/include/SDL2/SDL_hints.h
+++ b/include/SDL2/SDL_hints.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -1954,6 +1954,28 @@ extern "C" {
  */
 #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
 
+/**
+ *  \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic).
+ *
+ *  If the mnemonics are enabled, then menus can be opened by pressing the Alt
+ *  key and the corresponding mnemonic (for example, Alt+F opens the File menu).
+ *  However, in case an invalid mnemonic is pressed, Windows makes an audible
+ *  beep to convey that nothing happened. This is true even if the window has
+ *  no menu at all!
+ *
+ *  Because most SDL applications don't have menus, and some want to use the Alt
+ *  key for other purposes, SDL disables mnemonics (and the beeping) by default.
+ *
+ *  Note: This also affects keyboard events: with mnemonics enabled, when a
+ *  menu is opened from the keyboard, you will not receive a KEYUP event for
+ *  the mnemonic key, and *might* not receive one for Alt.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Alt+mnemonic does nothing, no beeping. (default)
+ *    "1"       - Alt+mnemonic opens menus, invalid mnemonics produce a beep.
+ */
+#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
+
 /**
  *  \brief  A variable controlling whether the windows message loop is processed by SDL 
  *
diff --git a/include/SDL2/SDL_joystick.h b/include/SDL2/SDL_joystick.h
index 72c6604..b9b4f62 100644
--- a/include/SDL2/SDL_joystick.h
+++ b/include/SDL2/SDL_joystick.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -44,6 +44,7 @@
 #include "SDL_stdinc.h"
 #include "SDL_error.h"
 #include "SDL_guid.h"
+#include "SDL_mutex.h"
 
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
@@ -66,6 +67,9 @@ extern "C" {
 /**
  * The joystick structure used to identify an SDL joystick
  */
+#ifdef SDL_THREAD_SAFETY_ANALYSIS
+extern SDL_mutex *SDL_joystick_lock;
+#endif
 struct _SDL_Joystick;
 typedef struct _SDL_Joystick SDL_Joystick;
 
@@ -131,7 +135,7 @@ typedef enum
  *
  * \since This function is available since SDL 2.0.7.
  */
-extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
+extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock);
 
 
 /**
@@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
  *
  * \since This function is available since SDL 2.0.7.
  */
-extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
+extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock);
 
 /**
  * Count the number of joysticks attached to the system.
@@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in
 /**
  * Get the instance ID of a joystick.
  *
- * This can be called before any joysticks are opened. If the index is out of
- * range, this function will return -1.
+ * This can be called before any joysticks are opened.
  *
  * \param device_index the index of the joystick to query (the N'th joystick
  *                     on the system
  * \returns the instance id of the selected joystick. If called on an invalid
- *          index, this function returns zero
+ *          index, this function returns -1.
  *
  * \since This function is available since SDL 2.0.6.
  */
diff --git a/include/SDL2/SDL_keyboard.h b/include/SDL2/SDL_keyboard.h
index e7663fb..86a37ad 100644
--- a/include/SDL2/SDL_keyboard.h
+++ b/include/SDL2/SDL_keyboard.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/include/SDL2/SDL_keycode

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