Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

56.2 KB
Raw Blame
diff --git a/thirdparty/sdl/SDL.c b/thirdparty/sdl/SDL.c
index 8354bd5de7..d62adb9b1e 100644
--- a/thirdparty/sdl/SDL.c
+++ b/thirdparty/sdl/SDL.c
@@ -30,9 +30,9 @@
 // this checks for HAVE_DBUS_DBUS_H internally.
 #include "core/linux/SDL_dbus.h"
 
-#if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
-#include "core/unix/SDL_gtk.h"
-#endif
+// #if defined(SDL_PLATFORM_UNIX) && !defined(SDL_PLATFORM_ANDROID)
+// #include "core/unix/SDL_gtk.h"
+// #endif
 
 #ifdef SDL_PLATFORM_EMSCRIPTEN
 #include <emscripten.h>
@@ -44,23 +44,25 @@
 #include "SDL_hints_c.h"
 #include "SDL_log_c.h"
 #include "SDL_properties_c.h"
-#include "audio/SDL_sysaudio.h"
-#include "camera/SDL_camera_c.h"
-#include "cpuinfo/SDL_cpuinfo_c.h"
+// #include "audio/SDL_sysaudio.h"
+// #include "camera/SDL_camera_c.h"
+// #include "cpuinfo/SDL_cpuinfo_c.h"
 #include "events/SDL_events_c.h"
 #include "haptic/SDL_haptic_c.h"
 #include "joystick/SDL_gamepad_c.h"
 #include "joystick/SDL_joystick_c.h"
-#include "render/SDL_sysrender.h"
+// #include "render/SDL_sysrender.h"
 #include "sensor/SDL_sensor_c.h"
 #include "stdlib/SDL_getenv_c.h"
 #include "thread/SDL_thread_c.h"
-#include "tray/SDL_tray_utils.h"
-#include "video/SDL_pixels_c.h"
-#include "video/SDL_surface_c.h"
-#include "video/SDL_video_c.h"
+// #include "tray/SDL_tray_utils.h"
+// #include "video/SDL_pixels_c.h"
+// #include "video/SDL_surface_c.h"
+// #include "video/SDL_video_c.h"
+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
 #include "filesystem/SDL_filesystem_c.h"
-#include "io/SDL_asyncio_c.h"
+#endif
+// #include "io/SDL_asyncio_c.h"
 #ifdef SDL_PLATFORM_ANDROID
 #include "core/android/SDL_android.h"
 #endif
@@ -173,7 +175,7 @@ const char *SDL_GetAppMetadataProperty(const char *name)
     }
     if (!value || !*value) {
         if (SDL_strcmp(name, SDL_PROP_APP_METADATA_NAME_STRING) == 0) {
-            value = SDL_GetExeName();
+            // value = SDL_GetExeName();
             if (!value) {
                 value = "SDL Application";
             }
@@ -300,8 +302,10 @@ void SDL_InitMainThread(void)
 
     SDL_InitTLSData();
     SDL_InitEnvironment();
-    SDL_InitTicks();
+	SDL_InitTicks();
+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
     SDL_InitFilesystem();
+#endif
 
     if (!done_info) {
         const char *value;
@@ -320,7 +324,9 @@ void SDL_InitMainThread(void)
 
 static void SDL_QuitMainThread(void)
 {
+#ifndef SDL_FILESYSTEM_DUMMY // Godot change
     SDL_QuitFilesystem();
+#endif
     SDL_QuitTicks();
     SDL_QuitEnvironment();
     SDL_QuitTLSData();
@@ -711,7 +717,7 @@ void SDL_Quit(void)
     SDL_HelperWindowDestroy();
 #endif
     SDL_QuitSubSystem(SDL_ALL_SUBSYSTEM_FLAGS);
-    SDL_CleanupTrays();
+    // SDL_CleanupTrays();
 
 #ifdef SDL_USE_LIBDBUS
     SDL_DBus_Quit();
@@ -722,14 +728,14 @@ void SDL_Quit(void)
 #endif
 
     SDL_QuitTimers();
-    SDL_QuitAsyncIO();
+    // SDL_QuitAsyncIO();
 
     SDL_SetObjectsInvalid();
     SDL_AssertionsQuit();
 
-    SDL_QuitPixelFormatDetails();
+    // SDL_QuitPixelFormatDetails();
 
-    SDL_QuitCPUInfo();
+    // SDL_QuitCPUInfo();
 
     /* Now that every subsystem has been quit, we reset the subsystem refcount
      * and the list of initialized subsystems.
diff --git a/thirdparty/sdl/SDL_assert.c b/thirdparty/sdl/SDL_assert.c
index f1f3da33ec..5b32f08bab 100644
--- a/thirdparty/sdl/SDL_assert.c
+++ b/thirdparty/sdl/SDL_assert.c
@@ -25,7 +25,7 @@
 #endif
 
 #include "SDL_assert_c.h"
-#include "video/SDL_sysvideo.h"
+// #include "video/SDL_sysvideo.h"
 
 #if defined(SDL_PLATFORM_WINDOWS)
 #ifndef WS_OVERLAPPEDWINDOW
@@ -197,16 +197,16 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
     }
 
     // Leave fullscreen mode, if possible (scary!)
-    window = SDL_GetToplevelForKeyboardFocus();
-    if (window) {
-        if (window->fullscreen_exclusive) {
-            SDL_MinimizeWindow(window);
-        } else {
-            // !!! FIXME: ungrab the input if we're not fullscreen?
-            // No need to mess with the window
-            window = NULL;
-        }
-    }
+    // window = SDL_GetToplevelForKeyboardFocus();
+    // if (window) {
+    //     if (window->fullscreen_exclusive) {
+    //         SDL_MinimizeWindow(window);
+    //     } else {
+    //         // !!! FIXME: ungrab the input if we're not fullscreen?
+    //         // No need to mess with the window
+    //         window = NULL;
+    //     }
+    // }
 
     // Show a messagebox if we can, otherwise fall back to stdio
     SDL_zero(messagebox);
@@ -217,7 +217,8 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
     messagebox.numbuttons = SDL_arraysize(buttons);
     messagebox.buttons = buttons;
 
-    if (SDL_ShowMessageBox(&messagebox, &selected)) {
+    // if (SDL_ShowMessageBox(&messagebox, &selected)) {
+    if (false) {
         if (selected == -1) {
             state = SDL_ASSERTION_IGNORE;
         } else {
@@ -298,13 +299,13 @@ static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, v
             }
         }
 #else
-        SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Assertion Failed", message, window);
+        // SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Assertion Failed", message, window);
 #endif // SDL_PLATFORM_PRIVATE_ASSERT
     }
 
     // Re-enter fullscreen mode
     if (window) {
-        SDL_RestoreWindow(window);
+        // SDL_RestoreWindow(window);
     }
 
     if (message != stack_buf) {
diff --git a/thirdparty/sdl/SDL_internal.h b/thirdparty/sdl/SDL_internal.h
index 475009366e..a7d46db8d7 100644
--- a/thirdparty/sdl/SDL_internal.h
+++ b/thirdparty/sdl/SDL_internal.h
@@ -62,7 +62,7 @@
 
 #include "SDL_build_config.h"
 
-#include "dynapi/SDL_dynapi.h"
+// #include "dynapi/SDL_dynapi.h"
 
 #if SDL_DYNAMIC_API
 #include "dynapi/SDL_dynapi_overrides.h"
diff --git a/thirdparty/sdl/SDL_properties.c b/thirdparty/sdl/SDL_properties.c
index 6302de4dcb..b3753451ff 100644
--- a/thirdparty/sdl/SDL_properties.c
+++ b/thirdparty/sdl/SDL_properties.c
@@ -409,7 +409,7 @@ static void SDLCALL CleanupSurface(void *userdata, void *value)
 {
     SDL_Surface *surface = (SDL_Surface *)value;
 
-    SDL_DestroySurface(surface);
+    // SDL_DestroySurface(surface);
 }
 
 bool SDL_SetSurfaceProperty(SDL_PropertiesID props, const char *name, SDL_Surface *surface)
diff --git a/thirdparty/sdl/core/linux/SDL_evdev.c b/thirdparty/sdl/core/linux/SDL_evdev.c
index fa43ee6c57..711fe68881 100644
--- a/thirdparty/sdl/core/linux/SDL_evdev.c
+++ b/thirdparty/sdl/core/linux/SDL_evdev.c
@@ -40,7 +40,7 @@
 #include <linux/input.h>
 
 #include "../../events/SDL_events_c.h"
-#include "../../events/SDL_scancode_tables_c.h"
+// #include "../../events/SDL_scancode_tables_c.h"
 #include "../../core/linux/SDL_evdev_capabilities.h"
 #include "../../core/linux/SDL_udev.h"
 
@@ -222,7 +222,7 @@ bool SDL_EVDEV_Init(void)
         SDL_EVDEV_UpdateKeyboardMute();
     }
 
-    SDL_GetMouse()->SetRelativeMouseMode = SDL_EVDEV_SetRelativeMouseMode;
+    // SDL_GetMouse()->SetRelativeMouseMode = SDL_EVDEV_SetRelativeMouseMode;
 
     _this->ref_count += 1;
 
@@ -325,7 +325,7 @@ void SDL_EVDEV_Poll(void)
 
     SDL_EVDEV_kbd_update(_this->kbd);
 
-    mouse = SDL_GetMouse();
+    mouse = NULL; //SDL_GetMouse();
 
     for (item = _this->first; item; item = item->next) {
         while ((len = read(item->fd, events, sizeof(events))) > 0) {
@@ -350,7 +350,7 @@ void SDL_EVDEV_Poll(void)
                     if (event->code >= BTN_MOUSE && event->code < BTN_MOUSE + SDL_arraysize(EVDEV_MouseButtons)) {
                         Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
                         mouse_button = event->code - BTN_MOUSE;
-                        SDL_SendMouseButton(timestamp, mouse->focus, (SDL_MouseID)item->fd, EVDEV_MouseButtons[mouse_button], (event->value != 0));
+                        // SDL_SendMouseButton(timestamp, mouse->focus, (SDL_MouseID)item->fd, EVDEV_MouseButtons[mouse_button], (event->value != 0));
                         break;
                     }
 
@@ -373,11 +373,11 @@ void SDL_EVDEV_Poll(void)
                     {
                         Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
                         scancode = SDL_EVDEV_translate_keycode(event->code);
-                        if (event->value == 0) {
-                            SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, false);
-                        } else if (event->value == 1 || event->value == 2 /* key repeated */) {
-                            SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, true);
-                        }
+                        // if (event->value == 0) {
+                            // SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, false);
+                        // } else if (event->value == 1 || event->value == 2 /* key repeated */) {
+                            // SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, true);
+                        // }
                         SDL_EVDEV_kbd_keycode(_this->kbd, event->code, event->value);
                     }
                     break;
@@ -492,35 +492,35 @@ void SDL_EVDEV_Poll(void)
                         if (item->relative_mouse) {
                             if (item->mouse_x != 0 || item->mouse_y != 0) {
                                 Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
-                                SDL_SendMouseMotion(timestamp, mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse, (float)item->mouse_x, (float)item->mouse_y);
+                                // SDL_SendMouseMotion(timestamp, mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse, (float)item->mouse_x, (float)item->mouse_y);
                                 item->mouse_x = item->mouse_y = 0;
                             }
                         } else if (item->range_x > 0 && item->range_y > 0) {
                             int screen_w = 0, screen_h = 0;
                             const SDL_DisplayMode *mode = NULL;
 
-                            if (mouse->focus) {
-                                mode = SDL_GetCurrentDisplayMode(SDL_GetDisplayForWindow(mouse->focus));
-                            }
-                            if (!mode) {
-                                mode = SDL_GetCurrentDisplayMode(SDL_GetPrimaryDisplay());
-                            }
+                            // if (mouse->focus) {
+                                // mode = SDL_GetCurrentDisplayMode(SDL_GetDisplayForWindow(mouse->focus));
+                            // }
+                            // if (!mode) {
+                                // mode = SDL_GetCurrentDisplayMode(SDL_GetPrimaryDisplay());
+                            // }
                             if (mode) {
                                 screen_w = mode->w;
                                 screen_h = mode->h;
                             }
-                            SDL_SendMouseMotion(SDL_EVDEV_GetEventTimestamp(event), mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse,
-                                (float)(item->mouse_x - item->min_x) * screen_w / item->range_x,
-                                (float)(item->mouse_y - item->min_y) * screen_h / item->range_y);
+                            // SDL_SendMouseMotion(SDL_EVDEV_GetEventTimestamp(event), mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse,
+                                // (float)(item->mouse_x - item->min_x) * screen_w / item->range_x,
+                                // (float)(item->mouse_y - item->min_y) * screen_h / item->range_y);
                         }
 
                         if (item->mouse_wheel != 0 || item->mouse_hwheel != 0) {
                             Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
-                            SDL_SendMouseWheel(timestamp,
-                                               mouse->focus, (SDL_MouseID)item->fd,
-                                               item->mouse_hwheel / (item->high_res_hwheel ? 120.0f : 1.0f),
-                                               item->mouse_wheel / (item->high_res_wheel ? 120.0f : 1.0f),
-                                               SDL_MOUSEWHEEL_NORMAL);
+                            // SDL_SendMouseWheel(timestamp,
+                            //                    mouse->focus, (SDL_MouseID)item->fd,
+                            //                    item->mouse_hwheel / (item->high_res_hwheel ? 120.0f : 1.0f),
+                            //                    item->mouse_wheel / (item->high_res_wheel ? 120.0f : 1.0f),
+                            //                    SDL_MOUSEWHEEL_NORMAL);
                             item->mouse_wheel = item->mouse_hwheel = 0;
                         }
 
@@ -547,16 +547,16 @@ void SDL_EVDEV_Poll(void)
                              * be window-relative in that case. */
                             switch (item->touchscreen_data->slots[j].delta) {
                             case EVDEV_TOUCH_SLOTDELTA_DOWN:
-                                SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, SDL_EVENT_FINGER_DOWN, norm_x, norm_y, norm_pressure);
+                                // SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, SDL_EVENT_FINGER_DOWN, norm_x, norm_y, norm_pressure);
                                 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
                                 break;
                             case EVDEV_TOUCH_SLOTDELTA_UP:
-                                SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, SDL_EVENT_FINGER_UP, norm_x, norm_y, norm_pressure);
+                                // SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, SDL_EVENT_FINGER_UP, norm_x, norm_y, norm_pressure);
                                 item->touchscreen_data->slots[j].tracking_id = 0;
                                 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
                                 break;
                             case EVDEV_TOUCH_SLOTDELTA_MOVE:
-                                SDL_SendTouchMotion(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, norm_x, norm_y, norm_pressure);
+                                // SDL_SendTouchMotion(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, mouse->focus, norm_x, norm_y, norm_pressure);
                                 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
                                 break;
                             default:
@@ -586,7 +586,7 @@ void SDL_EVDEV_Poll(void)
 
 static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode)
 {
-    SDL_Scancode scancode = SDL_GetScancodeFromTable(SDL_SCANCODE_TABLE_LINUX, keycode);
+    // SDL_Scancode scancode = SDL_GetScancodeFromTable(SDL_SCANCODE_TABLE_LINUX, keycode);
 
 #ifdef DEBUG_SCANCODES
     if (scancode == SDL_SCANCODE_UNKNOWN) {
@@ -603,7 +603,7 @@ static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode)
     }
 #endif // DEBUG_SCANCODES
 
-    return scancode;
+    return 0; // scancode;
 }
 
 static bool SDL_EVDEV_init_keyboard(SDL_evdevlist_item *item, int udev_class)
@@ -613,14 +613,14 @@ static bool SDL_EVDEV_init_keyboard(SDL_evdevlist_item *item, int udev_class)
     name[0] = '\0';
     ioctl(item->fd, EVIOCGNAME(sizeof(name)), name);
 
-    SDL_AddKeyboard((SDL_KeyboardID)item->fd, name);
+    // SDL_AddKeyboard((SDL_KeyboardID)item->fd, name);
 
     return true;
 }
 
 static void SDL_EVDEV_destroy_keyboard(SDL_evdevlist_item *item)
 {
-    SDL_RemoveKeyboard((SDL_KeyboardID)item->fd);
+    // SDL_RemoveKeyboard((SDL_KeyboardID)item->fd);
 }
 
 static bool SDL_EVDEV_init_mouse(SDL_evdevlist_item *item, int udev_class)
@@ -632,7 +632,7 @@ static bool SDL_EVDEV_init_mouse(SDL_evdevlist_item *item, int udev_class)
     name[0] = '\0';
     ioctl(item->fd, EVIOCGNAME(sizeof(name)), name);
 
-    SDL_AddMouse((SDL_MouseID)item->fd, name);
+    // SDL_AddMouse((SDL_MouseID)item->fd, name);
 
     ret = ioctl(item->fd, EVIOCGABS(ABS_X), &abs_info);
     if (ret < 0) {
@@ -657,7 +657,7 @@ static bool SDL_EVDEV_init_mouse(SDL_evdevlist_item *item, int udev_class)
 
 static void SDL_EVDEV_destroy_mouse(SDL_evdevlist_item *item)
 {
-    SDL_RemoveMouse((SDL_MouseID)item->fd);
+    // SDL_RemoveMouse((SDL_MouseID)item->fd);
 }
 
 static bool SDL_EVDEV_init_touchscreen(SDL_evdevlist_item *item, int udev_class)
@@ -749,9 +749,10 @@ static bool SDL_EVDEV_init_touchscreen(SDL_evdevlist_item *item, int udev_class)
         return false;
     }
 
-    ret = SDL_AddTouch(item->fd, // I guess our fd is unique enough
-                       (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT,
-                       item->touchscreen_data->name);
+    // ret = SDL_AddTouch(item->fd, // I guess our fd is unique enough
+                    //    (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT,
+                    //    item->touchscreen_data->name);
+    ret = -1;
     if (ret < 0) {
         SDL_free(item->touchscreen_data->slots);
         SDL_free(item->touchscreen_data->name);
@@ -768,7 +769,7 @@ static void SDL_EVDEV_destroy_touchscreen(SDL_evdevlist_item *item)
         return;
     }
 
-    SDL_DelTouch(item->fd);
+    // SDL_DelTouch(item->fd);
     SDL_free(item->touchscreen_data->slots);
     SDL_free(item->touchscreen_data->name);
     SDL_free(item->touchscreen_data);
diff --git a/thirdparty/sdl/core/unix/SDL_appid.c b/thirdparty/sdl/core/unix/SDL_appid.c
index 95c5dc1a6b..fd0037eb7e 100644
--- a/thirdparty/sdl/core/unix/SDL_appid.c
+++ b/thirdparty/sdl/core/unix/SDL_appid.c
@@ -30,7 +30,7 @@ const char *SDL_GetAppID(void)
 
     if (!id_str) {
         // If the hint isn't set, try to use the application's executable name
-        id_str = SDL_GetExeName();
+        // id_str = SDL_GetExeName();
     }
 
     if (!id_str) {
diff --git a/thirdparty/sdl/core/windows/SDL_windows.c b/thirdparty/sdl/core/windows/SDL_windows.c
index 1e9e6bba97..ed5da3daf3 100644
--- a/thirdparty/sdl/core/windows/SDL_windows.c
+++ b/thirdparty/sdl/core/windows/SDL_windows.c
@@ -24,7 +24,7 @@
 
 #include "SDL_windows.h"
 
-#include "../../video/SDL_surface_c.h"
+// #include "../../video/SDL_surface_c.h"
 
 #include <shellapi.h> // CommandLineToArgvW()
 
@@ -534,7 +534,7 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
     if (ShouldAppsUseDarkModeFunc) {
         value = ShouldAppsUseDarkModeFunc() ? TRUE : FALSE;
     } else {
-        value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
+        // value = (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_DARK) ? TRUE : FALSE;
     }
     FreeLibrary(uxtheme);
     if (!IsWindowsBuildVersionAtLeast(18362)) {
@@ -552,79 +552,79 @@ void WIN_UpdateDarkModeForHWND(HWND hwnd)
 #endif
 }
 
-HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
-{
-#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
-    SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
-    if (!s) {
-        return NULL;
-    }
-
-    /* The dimensions will be needed after s is freed */
-    const int width = s->w;
-    const int height = s->h;
-
-    BITMAPINFO bmpInfo;
-    SDL_zero(bmpInfo);
-    bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    bmpInfo.bmiHeader.biWidth = width;
-    bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
-    bmpInfo.bmiHeader.biPlanes = 1;
-    bmpInfo.bmiHeader.biBitCount = 32;
-    bmpInfo.bmiHeader.biCompression = BI_RGB;
-
-    HDC hdc = GetDC(NULL);
-    void *pBits = NULL;
-    HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
-    if (!hBitmap) {
-        ReleaseDC(NULL, hdc);
-        SDL_DestroySurface(s);
-        return NULL;
-    }
-
-    SDL_memcpy(pBits, s->pixels, width * height * 4);
-
-    SDL_DestroySurface(s);
-
-    HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
-    if (!hMask) {
-        DeleteObject(hBitmap);
-        ReleaseDC(NULL, hdc);
-        return NULL;
-    }
-
-    HDC hdcMem = CreateCompatibleDC(hdc);
-    HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
-
-    for (int y = 0; y < height; y++) {
-        for (int x = 0; x < width; x++) {
-            BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
-            BYTE alpha = pixel[3];
-            COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
-            SetPixel(hdcMem, x, y, maskColor);
-        }
-    }
-
-    ICONINFO iconInfo;
-    iconInfo.fIcon = TRUE;
-    iconInfo.xHotspot = 0;
-    iconInfo.yHotspot = 0;
-    iconInfo.hbmMask = hMask;
-    iconInfo.hbmColor = hBitmap;
-
-    HICON hIcon = CreateIconIndirect(&iconInfo);
-
-    SelectObject(hdcMem, oldBitmap);
-    DeleteDC(hdcMem);
-    DeleteObject(hBitmap);
-    DeleteObject(hMask);
-    ReleaseDC(NULL, hdc);
-
-    return hIcon;
-#else
-    return NULL;
-#endif
-}
+// HICON WIN_CreateIconFromSurface(SDL_Surface *surface)
+// {
+// #if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
+//     SDL_Surface *s = SDL_ConvertSurface(surface, SDL_PIXELFORMAT_ARGB8888);
+//     if (!s) {
+//         return NULL;
+//     }
+
+//     /* The dimensions will be needed after s is freed */
+//     const int width = s->w;
+//     const int height = s->h;
+
+//     BITMAPINFO bmpInfo;
+//     SDL_zero(bmpInfo);
+//     bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+//     bmpInfo.bmiHeader.biWidth = width;
+//     bmpInfo.bmiHeader.biHeight = -height; /* Top-down bitmap */
+//     bmpInfo.bmiHeader.biPlanes = 1;
+//     bmpInfo.bmiHeader.biBitCount = 32;
+//     bmpInfo.bmiHeader.biCompression = BI_RGB;
+
+//     HDC hdc = GetDC(NULL);
+//     void *pBits = NULL;
+//     HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
+//     if (!hBitmap) {
+//         ReleaseDC(NULL, hdc);
+//         SDL_DestroySurface(s);
+//         return NULL;
+//     }
+
+//     SDL_memcpy(pBits, s->pixels, width * height * 4);
+
+//     SDL_DestroySurface(s);
+
+//     HBITMAP hMask = CreateBitmap(width, height, 1, 1, NULL);
+//     if (!hMask) {
+//         DeleteObject(hBitmap);
+//         ReleaseDC(NULL, hdc);
+//         return NULL;
+//     }
+
+//     HDC hdcMem = CreateCompatibleDC(hdc);
+//     HGDIOBJ oldBitmap = SelectObject(hdcMem, hMask);
+
+//    for (int y = 0; y < height; y++) {
+//        for (int x = 0; x < width; x++) {
+//            BYTE* pixel = (BYTE*)pBits + (y * width + x) * 4;
+//            BYTE alpha = pixel[3];
+//            COLORREF maskColor = (alpha == 0) ? RGB(255, 255, 255) : RGB(0, 0, 0);
+//            SetPixel(hdcMem, x, y, maskColor);
+//        }
+//    }
+
+//     ICONINFO iconInfo;
+//     iconInfo.fIcon = TRUE;
+//     iconInfo.xHotspot = 0;
+//     iconInfo.yHotspot = 0;
+//     iconInfo.hbmMask = hMask;
+//     iconInfo.hbmColor = hBitmap;
+
+//     HICON hIcon = CreateIconIndirect(&iconInfo);
+
+//     SelectObject(hdcMem, oldBitmap);
+//     DeleteDC(hdcMem);
+//     DeleteObject(hBitmap);
+//     DeleteObject(hMask);
+//     ReleaseDC(NULL, hdc);
+
+//     return hIcon;
+// #else
+//     return NULL;
+// #endif
+// }
 
 // Some GUIDs we need to know without linking to libraries that aren't available before Vista.
 /* *INDENT-OFF* */ // clang-format off
diff --git a/thirdparty/sdl/events/SDL_events.c b/thirdparty/sdl/events/SDL_events.c
index 06f1053cf6..2b17e6c247 100644
--- a/thirdparty/sdl/events/SDL_events.c
+++ b/thirdparty/sdl/events/SDL_events.c
@@ -24,10 +24,10 @@
 
 #include "SDL_events_c.h"
 #include "SDL_eventwatch_c.h"
-#include "SDL_windowevents_c.h"
+// #include "SDL_windowevents_c.h"
 #include "../SDL_hints_c.h"
-#include "../audio/SDL_audio_c.h"
-#include "../camera/SDL_camera_c.h"
+// #include "../audio/SDL_audio_c.h"
+// #include "../camera/SDL_camera_c.h"
 #include "../timer/SDL_timer_c.h"
 #include "../core/linux/SDL_udev.h"
 #ifndef SDL_JOYSTICK_DISABLED
@@ -39,16 +39,16 @@
 #ifdef HAVE_DBUS_DBUS_H
 #include "core/linux/SDL_dbus.h"
 #endif
-#include "../video/SDL_sysvideo.h"
+// #include "../video/SDL_sysvideo.h"
 
 #ifdef SDL_PLATFORM_ANDROID
 #include "../core/android/SDL_android.h"
 #include "../video/android/SDL_androidevents.h"
 #endif
 
-#ifdef SDL_PLATFORM_UNIX
-#include "../tray/SDL_tray_utils.h"
-#endif
+// #ifdef SDL_PLATFORM_UNIX
+// #include "../tray/SDL_tray_utils.h"
+// #endif
 
 // An arbitrary limit so we don't have unbounded growth
 #define SDL_MAX_QUEUED_EVENTS 65535
@@ -989,7 +989,7 @@ void SDL_StopEventLoop(void)
     }
 
     SDL_QuitEventWatchList(&SDL_event_watchers);
-    SDL_QuitWindowEventWatch();
+    // SDL_QuitWindowEventWatch();
 
     SDL_Mutex *lock = NULL;
     if (SDL_EventQ.lock) {
@@ -1029,7 +1029,7 @@ bool SDL_StartEventLoop(void)
     }
 #endif // !SDL_THREADS_DISABLED
 
-    SDL_InitWindowEventWatch();
+    // SDL_InitWindowEventWatch();
 
     SDL_EventQ.active = true;
 
@@ -1130,17 +1130,17 @@ static void SDL_SendWakeupEvent(void)
 {
 #ifdef SDL_PLATFORM_ANDROID
     Android_SendLifecycleEvent(SDL_ANDROID_LIFECYCLE_WAKE);
-#else
-    SDL_VideoDevice *_this = SDL_GetVideoDevice();
-    if (_this == NULL || !_this->SendWakeupEvent) {
-        return;
-    }
-
-    // We only want to do this once while waiting for an event, so set it to NULL atomically here
-    SDL_Window *wakeup_window = (SDL_Window *)SDL_SetAtomicPointer(&_this->wakeup_window, NULL);
-    if (wakeup_window) {
-        _this->SendWakeupEvent(_this, wakeup_window);
-    }
+// #else
+//     SDL_VideoDevice *_this = SDL_GetVideoDevice();
+//     if (_this == NULL || !_this->SendWakeupEvent) {
+//         return;
+//     }
+
+//     // We only want to do this once while waiting for an event, so set it to NULL atomically here
+//     SDL_Window *wakeup_window = (SDL_Window *)SDL_SetAtomicPointer(&_this->wakeup_window, NULL);
+//     if (wakeup_window) {
+//         _this->SendWakeupEvent(_this, wakeup_window);
+//     }
 #endif
 }
 
@@ -1484,13 +1484,13 @@ void SDL_PumpEventMaintenance(void)
     }
 #endif
 
-    SDL_SendPendingPenProximity();
+    // SDL_SendPendingPenProximity();
 
-    SDL_UpdateCursorAnimation();
+    // SDL_UpdateCursorAnimation();
 
-    SDL_UpdateTrays();
+    // SDL_UpdateTrays();
 
-    SDL_SendPendingSignalEvents(); // in case we had a signal handler fire, etc.
+    // SDL_SendPendingSignalEvents(); // in case we had a signal handler fire, etc.
 }
 
 // Run the system dependent event loops
@@ -1503,7 +1503,7 @@ static void SDL_PumpEventsInternal(bool push_sentinel)
     SDL_FreeTemporaryMemory();
 
     // Release any keys held down from last frame
-    SDL_ReleaseAutoReleaseKeys();
+    // SDL_ReleaseAutoReleaseKeys();
 
     // Run any pending main thread callbacks
     SDL_RunMainThreadCallbacks();
@@ -1516,12 +1516,12 @@ static void SDL_PumpEventsInternal(bool push_sentinel)
 #ifdef SDL_PLATFORM_ANDROID
     // Android event processing is independent of the video subsystem
     Android_PumpEvents(0);
-#else
-    // Get events from the video subsystem
-    SDL_VideoDevice *_this = SDL_GetVideoDevice();
-    if (_this) {
-        _this->PumpEvents(_this);
-    }
+// #else
+//     // Get events from the video subsystem
+//     SDL_VideoDevice *_this = SDL_GetVideoDevice();
+//     if (_this) {
+//         _this->PumpEvents(_this);
+//     }
 #endif
 
     SDL_PumpEventMaintenance();
@@ -1552,113 +1552,113 @@ bool SDL_PollEvent(SDL_Event *event)
     return SDL_WaitEventTimeoutNS(event, 0);
 }
 
-#ifndef SDL_PLATFORM_ANDROID
-
-static Sint64 SDL_events_get_polling_interval(void)
-{
-    Sint64 poll_intervalNS = SDL_MAX_SINT64;
-
-#ifndef SDL_JOYSTICK_DISABLED
-    if (SDL_WasInit(SDL_INIT_JOYSTICK) && SDL_update_joysticks) {
-        if (SDL_JoysticksOpened()) {
-            // If we have joysticks open, we need to poll rapidly for events
-            poll_intervalNS = SDL_min(poll_intervalNS, EVENT_POLL_INTERVAL_NS);
-        } else {
-            // If not, just poll every few seconds to enumerate new joysticks
-            poll_intervalNS = SDL_min(poll_intervalNS, ENUMERATION_POLL_INTERVAL_NS);
-        }
-    }
-#endif
-
-#ifndef SDL_SENSOR_DISABLED
-    if (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors && SDL_SensorsOpened()) {
-        // If we have sensors open, we need to poll rapidly for events
-        poll_intervalNS = SDL_min(poll_intervalNS, EVENT_POLL_INTERVAL_NS);
-    }
-#endif
-
-#ifdef SDL_PLATFORM_UNIX
-    if (SDL_HasActiveTrays()) {
-        // Tray events on *nix platforms run separately from window system events, and need periodic polling
-        poll_intervalNS = SDL_min(poll_intervalNS, TRAY_POLL_INTERVAL_NS);
-    }
-#endif
-
-#ifdef SDL_USE_LIBDBUS
-    // Wake periodically to pump DBus events
-    poll_intervalNS = SDL_min(poll_intervalNS, DBUS_POLL_INTERVAL_NS);
-#endif
-    return poll_intervalNS;
-}
-
-static int SDL_WaitEventTimeout_Device(SDL_VideoDevice *_this, SDL_Window *wakeup_window, SDL_Event *event, Uint64 start, Sint64 timeoutNS)
-{
-    Sint64 loop_timeoutNS = timeoutNS;
-    Sint64 poll_intervalNS = SDL_events_get_polling_interval();
-
-    for (;;) {
-        int status;
-        /* Pump events on entry and each time we wake to ensure:
-           a) All pending events are batch processed after waking up from a wait
-           b) Waiting can be completely skipped if events are already available to be pumped
-           c) Periodic processing that takes place in some platform PumpEvents() functions happens
-           d) Signals received in WaitEventTimeout() are turned into SDL events
-        */
-        SDL_PumpEventsInternal(true);
-
-        status = SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST);
-        if (status < 0) {
-            // Got an error: return
-            break;
-        }
-        if (status > 0) {
-            // There is an event, we can return.
-            return 1;
-        }
-        // No events found in the queue, call WaitEventTimeout to wait for an event.
-        if (timeoutNS > 0) {
-            Sint64 elapsed = SDL_GetTicksNS() - start;
-            if (elapsed >= timeoutNS) {
-                return 0;
-            }
-            loop_timeoutNS = (timeoutNS - elapsed);
-        }
-        // Adjust the timeout for any polling requirements we currently have.
-        if (poll_intervalNS != SDL_MAX_SINT64) {
-            if (loop_timeoutNS >= 0) {
-                loop_timeoutNS = SDL_min(loop_timeoutNS, poll_intervalNS);
-            } else {
-                loop_timeoutNS = poll_intervalNS;
-            }
-        }
-        SDL_SetAtomicPointer(&_this->wakeup_window, wakeup_window);
-        status = _this->WaitEventTimeout(_this, loop_timeoutNS);
-        SDL_SetAtomicPointer(&_this->wakeup_window, NULL);
-        if (status == 0 && poll_intervalNS != SDL_MAX_SINT64 && loop_timeoutNS == poll_intervalNS) {
-            // We may have woken up to poll. Try again
-            continue;
-        } else if (status <= 0) {
-            // There is either an error or the timeout is elapsed: return
-            return status;
-        }
-        /* An event was found and pumped into the SDL events queue. Continue the loop
-          to let SDL_PeepEvents pick it up .*/
-    }
-    return 0;
-}
-
-static SDL_Window *SDL_find_active_window(SDL_VideoDevice *_this)
-{
-    SDL_Window *window;
-    for (window = _this->windows; window; window = window->next) {
-        if (!window->is_destroying) {
-            return window;
-        }
-    }
-    return NULL;
-}
-
-#endif // !SDL_PLATFORM_ANDROID
+// #ifndef SDL_PLATFORM_ANDROID
+
+// static Sint64 SDL_events_get_polling_interval(void)
+// {
+//     Sint64 poll_intervalNS = SDL_MAX_SINT64;
+
+// #ifndef SDL_JOYSTICK_DISABLED
+//     if (SDL_WasInit(SDL_INIT_JOYSTICK) && SDL_update_joysticks) {
+//         if (SDL_JoysticksOpened()) {
+//             // If we have joysticks open, we need to poll rapidly for events
+//             poll_intervalNS = SDL_min(poll_intervalNS, EVENT_POLL_INTERVAL_NS);
+//         } else {
+//             // If not, just poll every few seconds to enumerate new joysticks
+//             poll_intervalNS = SDL_min(poll_intervalNS, ENUMERATION_POLL_INTERVAL_NS);
+//         }
+//     }
+// #endif
+
+// #ifndef SDL_SENSOR_DISABLED
+//     if (SDL_WasInit(SDL_INIT_SENSOR) && SDL_update_sensors && SDL_SensorsOpened()) {
+//         // If we have sensors open, we need to poll rapidly for events
+//         poll_intervalNS = SDL_min(poll_intervalNS, EVENT_POLL_INTERVAL_NS);
+//     }
+// #endif
+
+// #ifdef SDL_PLATFORM_UNIX
+//     if (SDL_HasActiveTrays()) {
+//         // Tray events on *nix platforms run separately from window system events, and need periodic polling
+//         poll_intervalNS = SDL_min(poll_intervalNS, TRAY_POLL_INTERVAL_NS);
+//     }
+// #endif
+
+// #ifdef SDL_USE_LIBDBUS
+//     // Wake periodically to pump DBus events
+//     poll_intervalNS = SDL_min(poll_intervalNS, DBUS_POLL_INTERVAL_NS);
+// #endif
+//     return poll_intervalNS;
+// }
+
+// static int SDL_WaitEventTimeout_Device(SDL_VideoDevice *_this, SDL_Window *wakeup_window, SDL_Event *event, Uint64 start, Sint64 timeoutNS)
+// {
+//     Sint64 loop_timeoutNS = timeoutNS;
+//     Sint64 poll_intervalNS = SDL_events_get_polling_interval();
+
+//     for (;;) {
+//         int status;
+//         /* Pump events on entry and each time we wake to ensure:
+//            a) All pending events are batch processed after waking up from a wait
+//            b) Waiting can be completely skipped if events are already available to be pumped
+//            c) Periodic processing that takes place in some platform PumpEvents() functions happens
+//            d) Signals received in WaitEventTimeout() are turned into SDL events
+//         */
+//         SDL_PumpEventsInternal(true);
+
+//         status = SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST);
+//         if (status < 0) {
+//             // Got an error: return
+//             break;
+//         }
+//         if (status > 0) {
+//             // There is an event, we can return.
+//             return 1;
+//         }
+//         // No events found in the queue, call WaitEventTimeout to wait for an event.
+//         if (timeoutNS > 0) {
+//             Sint64 elapsed = SDL_GetTicksNS() - start;
+//             if (elapsed >= timeoutNS) {
+//                 return 0;
+//             }
+//             loop_timeoutNS = (timeoutNS - elapsed);
+//         }
+//         // Adjust the timeout for any polling requirements we currently have.
+//         if (poll_intervalNS != SDL_MAX_SINT64) {
+//             if (loop_timeoutNS >= 0) {
+//                 loop_timeoutNS = SDL_min(loop_timeoutNS, poll_intervalNS);
+//             } else {
+//                 loop_timeoutNS = poll_intervalNS;
+//             }
+//         }
+//         SDL_SetAtomicPointer(&_this->wakeup_window, wakeup_window);
+//         status = _this->WaitEventTimeout(_this, loop_timeoutNS);
+//         SDL_SetAtomicPointer(&_this->wakeup_window, NULL);
+//         if (status == 0 && poll_intervalNS != SDL_MAX_SINT64 && loop_timeoutNS == poll_intervalNS) {
+//             // We may have woken up to poll. Try again
+//             continue;
+//         } else if (status <= 0) {
+//             // There is either an error or the timeout is elapsed: return
+//             return status;
+//         }
+//         /* An event was found and pumped into the SDL events queue. Continue the loop
+//           to let SDL_PeepEvents pick it up .*/
+//     }
+//     return 0;
+// }
+
+// static SDL_Window *SDL_find_active_window(SDL_VideoDevice *_this)
+// {
+//     SDL_Window *window;
+//     for (window = _this->windows; window; window = window->next) {
+//         if (!window->is_destroying) {
+//             return window;
+//         }
+//     }
+//     return NULL;
+// }
+
+// #endif // !SDL_PLATFORM_ANDROID
 
 bool SDL_WaitEvent(SDL_Event *event)
 {
@@ -1755,23 +1755,23 @@ bool SDL_WaitEventTimeoutNS(SDL_Event *event, Sint64 timeoutNS)
         Android_PumpEvents(delay);
     }
 #else
-    SDL_VideoDevice *_this = SDL_GetVideoDevice();
-    if (_this && _this->WaitEventTimeout && _this->SendWakeupEvent) {
-        // Look if a shown window is available to send the wakeup event.
-        SDL_Window *wakeup_window = SDL_find_active_window(_this);
-        if (wakeup_window) {
-            result = SDL_WaitEventTimeout_Device(_this, wakeup_window, event, start, timeoutNS);
-            if (result > 0) {
-                return true;
-            } else if (result == 0) {
-                return false;
-            } else {
-                /* There may be implementation-defined conditions where the backend cannot
-                 * reliably wait for the next event. If that happens, fall back to polling.
-                 */
-            }
-        }
-    }
+    // SDL_VideoDevice *_this = SDL_GetVideoDevice();
+    // if (_this && _this->WaitEventTimeout && _this->SendWakeupEvent) {
+    //     // Look if a shown window is available to send the wakeup event.
+    //     SDL_Window *wakeup_window = SDL_find_active_window(_this);
+    //     if (wakeup_window) {
+    //         result = SDL_WaitEventTimeout_Device(_this, wakeup_window, event, start, timeoutNS);
+    //         if (result > 0) {
+    //             return true;
+    //         } else if (result == 0) {
+    //             return false;
+    //         } else {
+    //             /* There may be implementation-defined conditions where the backend cannot
+    //              * reliably wait for the next event. If that happens, fall back to polling.
+    //              */
+    //         }
+    //     }
+    // }
 
     for (;;) {
         SDL_PumpEventsInternal(true);
@@ -1945,7 +1945,7 @@ void SDL_SetEventEnabled(Uint32 type, bool enabled)
         /* turn off drag'n'drop support if we've disabled the events.
            This might change some UI details at the OS level. */
         if (type == SDL_EVENT_DROP_FILE || type == SDL_EVENT_DROP_TEXT) {
-            SDL_ToggleDragAndDropSupport();
+            // SDL_ToggleDragAndDropSupport();
         }
     }
 }
@@ -2037,14 +2037,14 @@ bool SDL_InitEvents(void)
         return false;
     }
 
-    SDL_InitQuit();
+    // SDL_InitQuit();
 
     return true;
 }
 
 void SDL_QuitEvents(void)
 {
-    SDL_QuitQuit();
+    // SDL_QuitQuit();
     SDL_StopEventLoop();
     SDL_QuitMainThreadCallbacks();
     SDL_RemoveHintCallback(SDL_HINT_POLL_SENTINEL, SDL_PollSentinelChanged, NULL);
diff --git a/thirdparty/sdl/events/SDL_events_c.h b/thirdparty/sdl/events/SDL_events_c.h
index 377b04ec17..8bd09458c1 100644
--- a/thirdparty/sdl/events/SDL_events_c.h
+++ b/thirdparty/sdl/events/SDL_events_c.h
@@ -25,16 +25,16 @@
 #include "SDL_internal.h"
 
 // Useful functions and variables from SDL_events.c
-#include "../video/SDL_sysvideo.h"
+// #include "../video/SDL_sysvideo.h"
 
-#include "SDL_clipboardevents_c.h"
-#include "SDL_displayevents_c.h"
-#include "SDL_dropevents_c.h"
-#include "SDL_keyboard_c.h"
+// #include "SDL_clipboardevents_c.h"
+// #include "SDL_displayevents_c.h"
+// #include "SDL_dropevents_c.h"
+// #include "SDL_keyboard_c.h"
 #include "SDL_mouse_c.h"
-#include "SDL_touch_c.h"
-#include "SDL_pen_c.h"
-#include "SDL_windowevents_c.h"
+// #include "SDL_touch_c.h"
+// #include "SDL_pen_c.h"
+// #include "SDL_windowevents_c.h"
 
 // Start and stop the event processing loop
 extern bool SDL_StartEventLoop(void);
diff --git a/thirdparty/sdl/include/SDL3/SDL.h b/thirdparty/sdl/include/SDL3/SDL.h
index 0ba8cb73f4..220ca022ce 100644
--- a/thirdparty/sdl/include/SDL3/SDL.h
+++ b/thirdparty/sdl/include/SDL3/SDL.h
@@ -48,7 +48,7 @@
 #include <SDL3/SDL_events.h>
 #include <SDL3/SDL_filesystem.h>
 #include <SDL3/SDL_gamepad.h>
-#include <SDL3/SDL_gpu.h>
+// #include <SDL3/SDL_gpu.h>
 #include <SDL3/SDL_guid.h>
 #include <SDL3/SDL_haptic.h>
 #include <SDL3/SDL_hidapi.h>
@@ -86,6 +86,6 @@
 #include <SDL3/SDL_touch.h>
 #include <SDL3/SDL_version.h>
 #include <SDL3/SDL_video.h>
-#include <SDL3/SDL_oldnames.h>
+// #include <SDL3/SDL_oldnames.h>
 
 #endif /* SDL_h_ */
diff --git a/thirdparty/sdl/include/SDL3/SDL_render.h b/thirdparty/sdl/include/SDL3/SDL_render.h
index a4ea58025e..14d3790808 100644
--- a/thirdparty/sdl/include/SDL3/SDL_render.h
+++ b/thirdparty/sdl/include/SDL3/SDL_render.h
@@ -59,7 +59,7 @@
 #include <SDL3/SDL_rect.h>
 #include <SDL3/SDL_surface.h>
 #include <SDL3/SDL_video.h>
-#include <SDL3/SDL_gpu.h>
+// #include <SDL3/SDL_gpu.h>
 
 #include <SDL3/SDL_begin_code.h>
 /* Set up for C function definitions, even when using C++ */
@@ -384,7 +384,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRendererWithProperties(SDL_
  * \sa SDL_CreateGPURenderState
  * \sa SDL_SetGPURenderState
  */
-extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateGPURenderer(SDL_GPUDevice *device, SDL_Window *window);
+// extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateGPURenderer(SDL_GPUDevice *device, SDL_Window *window);
 
 /**
  * Return the GPU device used by a renderer.
@@ -397,7 +397,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateGPURenderer(SDL_GPUDevice *
  *
  * \since This function is available since SDL 3.4.0.
  */
-extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_GetGPURendererDevice(SDL_Renderer *renderer);
+// extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_GetGPURendererDevice(SDL_Renderer *renderer);
 
 /**
  * Create a 2D software rendering context for a surface.
@@ -2928,16 +2928,16 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetDefaultTextureScaleMode(SDL_Renderer *re
  */
 typedef struct SDL_GPURenderStateCreateInfo
 {
-    SDL_GPUShader *fragment_shader; /**< The fragment shader to use when this render state is active */
+    // SDL_GPUShader *fragment_shader; /**< The fragment shader to use when this render state is active */
 
     Sint32 num_sampler_bindings;    /**< The number of additional fragment samplers to bind when this render state is active */
-    const SDL_GPUTextureSamplerBinding *sampler_bindings;   /**< Additional fragment samplers to bind when this render state is active */
+    // const SDL_GPUTextureSamplerBinding *sampler_bindings;   /**< Additional fragment samplers to bind when this render state is active */
 
     Sint32 num_storage_textures;    /**< The number of storage textures to bind when this render state is active */
-    SDL_GPUTexture *const *storage_textures;    /**< Storage textures to bind when this render state is active */
+    // SDL_GPUTexture *const *storage_textures;    /**< Storage textures to bind when this render state is active */
 
     Sint32 num_storage_buffers;     /**< The number of storage buffers to bind when this render state is active */
-    SDL_GPUBuffer *const *storage_buffers;      /**< Storage buffers to bind when this render state is active */
+    // SDL_GPUBuffer *const *storage_buffers;      /**< Storage buffers to bind when this render state is active */
 
     SDL_PropertiesID props;         /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
 } SDL_GPURenderStateCreateInfo;
diff --git a/thirdparty/sdl/joystick/SDL_joystick.c b/thirdparty/sdl/joystick/SDL_joystick.c
index 3ee5c218d6..ebfcef5b4f 100644
--- a/thirdparty/sdl/joystick/SDL_joystick.c
+++ b/thirdparty/sdl/joystick/SDL_joystick.c
@@ -29,7 +29,7 @@
 #include "SDL_steam_virtual_gamepad.h"
 
 #include "../events/SDL_events_c.h"
-#include "../video/SDL_sysvideo.h"
+// #include "../video/SDL_sysvideo.h"
 #include "../sensor/SDL_sensor_c.h"
 #include "hidapi/SDL_hidapijoystick_c.h"
 
@@ -1240,7 +1240,8 @@ static void AttemptSensorFusion(SDL_Joystick *joystick, bool invert_sensors)
        When a phone is being used as a gamepad, its orientation changes,
        so adjust sensor axes to match.
      */
-    if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
+    // if (SDL_GetNaturalDisplayOrientation(SDL_GetPrimaryDisplay()) == SDL_ORIENTATION_LANDSCAPE) {
+    if (true) {
         /* When a device in landscape orientation is laid flat, the axes change
            orientation as follows:
             -X to +X becomes -X to +X
@@ -2310,10 +2311,10 @@ static bool SDL_PrivateJoystickShouldIgnoreEvent(void)
         return false;
     }
 
-    if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
-        // We have windows but we don't have focus, ignore the event.
-        return true;
-    }
+    // if (SDL_HasWindows() && SDL_GetKeyboardFocus() == NULL) {
+    //     // We have windows but we don't have focus, ignore the event.
+    //     return true;
+    // }
     return false;
 }
 
diff --git a/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c b/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c
index 1613ff4abd..a81af29de4 100644
--- a/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c
+++ b/thirdparty/sdl/joystick/SDL_steam_virtual_gamepad.c
@@ -138,11 +138,11 @@ void SDL_InitSteamVirtualGamepadInfo(void)
 #ifdef SDL_PLATFORM_LINUX
         // Older versions of Wine will blacklist the Steam Virtual Gamepad if
         // it appears to have the real controller's VID/PID, so ignore this.
-        const char *exe = SDL_GetExeName();
-        if (exe && SDL_strcmp(exe, "wine64-preloader") == 0) {
-            SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "Wine launched by Steam, ignoring SteamVirtualGamepadInfo");
-            return;
-        }
+        // const char *exe = SDL_GetExeName();
+        // if (exe && SDL_strcmp(exe, "wine64-preloader") == 0) {
+        //     SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "Wine launched by Steam, ignoring SteamVirtualGamepadInfo");
+        //     return;
+        // }
 #endif
         SDL_steam_virtual_gamepad_info_file = SDL_strdup(file);
     }
diff --git a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_gip.c b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_gip.c
index 826e45b13c..e9da9e21c7 100644
--- a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_gip.c
+++ b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_gip.c
@@ -22,7 +22,7 @@
 
 #ifdef SDL_JOYSTICK_HIDAPI
 
-#include "../../events/SDL_keyboard_c.h"
+// #include "../../events/SDL_keyboard_c.h"
 #include "../SDL_sysjoystick.h"
 #include "SDL_hidapijoystick_c.h"
 #include "SDL_hidapi_rumble.h"
@@ -449,7 +449,7 @@ typedef struct GIP_Attachment
     struct GIP_Device *device;
     Uint8 attachment_index;
     SDL_JoystickID joystick;
-    SDL_KeyboardID keyboard;
+    // SDL_KeyboardID keyboard;
 
     Uint8 fragment_message;
     Uint16 total_length;
@@ -1245,10 +1245,10 @@ static bool GIP_SendInitSequence(GIP_Attachment *attachment)
     if ((!attachment->attachment_index || GIP_AttachmentIsController(attachment)) && !attachment->joystick) {
         return HIDAPI_JoystickConnected(attachment->device->device, &attachment->joystick);
     }
-    if (attachment->attachment_type == GIP_TYPE_CHATPAD && !attachment->keyboard) {
-        attachment->keyboard = (SDL_KeyboardID)(uintptr_t) attachment;
-        SDL_AddKeyboard(attachment->keyboard, "Xbox One Chatpad");
-    }
+    // if (attachment->attachment_type == GIP_TYPE_CHATPAD && !attachment->keyboard) {
+    //     attachment->keyboard = (SDL_KeyboardID)(uintptr_t) attachment;
+    //     SDL_AddKeyboard(attachment->keyboard, "Xbox One Chatpad");
+    // }
     return true;
 }
 
@@ -1851,94 +1851,94 @@ static bool GIP_HandleCommandHidReport(
     const Uint8 *bytes,
     int num_bytes)
 {
-    Uint64 timestamp = SDL_GetTicksNS();
+    // Uint64 timestamp = SDL_GetTicksNS();
     // SDL doesn't have HID descriptor parsing, so we have to hardcode for the Chatpad descriptor instead.
     // I don't know of any other devices that emit HID reports, so this should be safe.
-    if (attachment->attachment_type != GIP_TYPE_CHATPAD || !attachment->keyboard || num_bytes != 8) {
-        SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "GIP: Unimplemented HID Report message");
-        return false;
-    }
-
-    Uint8 modifiers = bytes[0];
-    Uint8 changed_modifiers = modifiers ^ attachment->last_modifiers;
-    if (changed_modifiers & 0x02) {
-        if (modifiers & 0x02) {
-            SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_LSHIFT, true);
-        } else {
-            SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_LSHIFT, false);
-        }
-    }
+    // if (attachment->attachment_type != GIP_TYPE_CHATPAD || !attachment->keyboard || num_bytes != 8) {
+    //     SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "GIP: Unimplemented HID Report message");
+    //     return false;
+    // }
+
+    // Uint8 modifiers = bytes[0];
+    // Uint8 changed_modifiers = modifiers ^ attachment->last_modifiers;
+    // if (changed_modifiers & 0x02) {
+    //     if (modifiers & 0x02) {
+    //         SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_LSHIFT, true);
+    //     } else {
+    //         SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_LSHIFT, false);
+    //     }
+    // }
     // The chatpad has several non-ASCII characters that it sends as Alt codes
-    if (changed_modifiers & 0x04) {
-        if (modifiers & 0x04) {
-            attachment->altcode_digit = 0;
-            attachment->altcode = 0;
-        } else {
-            if (attachment->altcode_digit == 4) {
-                char utf8[4] = {0};
-                // Some Alt codes don't match their Unicode codepoint for some reason
-                switch (attachment->altcode) {
-                case 128:
-                    SDL_UCS4ToUTF8(0x20AC, utf8);
-                    break;
-                case 138:
-                    SDL_UCS4ToUTF8(0x0160, utf8);
-                    break;
-                case 140:
-                    SDL_UCS4ToUTF8(0x0152, utf8);
-                    break;
-                case 154:
-                    SDL_UCS4ToUTF8(0x0161, utf8);
-                    break;
-                case 156:
-                    SDL_UCS4ToUTF8(0x0153, utf8);
-                    break;
-                default:
-                    SDL_UCS4ToUTF8(attachment->altcode, utf8);
-                    break;
-                }
-                SDL_SendKeyboardText(utf8);
-            }
-            attachment->altcode_digit = -1;
-            SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_NUMLOCKCLEAR, true);
-            SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_NUMLOCKCLEAR, false);
-        }
-    }
-
-    if (!bytes[2] && attachment->last_key) {
-        if (attachment->last_key == SDL_SCANCODE_CAPSLOCK) {
-            attachment->capslock = !attachment->capslock;
-        }
-        SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, attachment->last_key, false);
-        if (!(attachment->last_modifiers & 0xfd)) {
-            SDL_Keycode keycode = SDL_GetKeymapKeycode(NULL,
-                attachment->last_key,
-                ((attachment->last_modifiers & 0x02) || attachment->capslock) ? SDL_KMOD_SHIFT : 0);
-            if (keycode && keycode < 0x80) {
-                char text[2] = { (char)keycode };
-                SDL_SendKeyboardText(text);
-            }
-        }
-        attachment->last_key = 0;
-    } else {
-        SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, bytes[2], true);
-        attachment->last_key = bytes[2];
-
-        if ((modifiers & 0x04) && attachment->altcode_digit >= 0) {
-            int digit = bytes[2] - SDL_SCANCODE_KP_1 + 1;
-            if (digit < 1 || digit > 10) {
-                attachment->altcode_digit = -1;
-            } else {
-                attachment->altcode_digit++;
-                attachment->altcode *= 10;
-                if (digit < 10) {
-                    attachment->altcode += digit;
-                }
-            }
-        }
-    }
-
-    attachment->last_modifiers = modifiers;
+    // if (changed_modifiers & 0x04) {
+    //     if (modifiers & 0x04) {
+    //         attachment->altcode_digit = 0;
+    //         attachment->altcode = 0;
+    //     } else {
+    //         if (attachment->altcode_digit == 4) {
+    //             char utf8[4] = {0};
+    //             // Some Alt codes don't match their Unicode codepoint for some reason
+    //             switch (attachment->altcode) {
+    //             case 128:
+    //                 SDL_UCS4ToUTF8(0x20AC, utf8);
+    //                 break;
+    //             case 138:
+    //                 SDL_UCS4ToUTF8(0x0160, utf8);
+    //                 break;
+    //             case 140:
+    //                 SDL_UCS4ToUTF8(0x0152, utf8);
+    //                 break;
+    //             case 154:
+    //                 SDL_UCS4ToUTF8(0x0161, utf8);
+    //                 break;
+    //             case 156:
+    //                 SDL_UCS4ToUTF8(0x0153, utf8);
+    //                 break;
+    //             default:
+    //                 SDL_UCS4ToUTF8(attachment->altcode, utf8);
+    //                 break;
+    //             }
+    //             SDL_SendKeyboardText(utf8);
+    //         }
+    //         attachment->altcode_digit = -1;
+    //         SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_NUMLOCKCLEAR, true);
+    //         SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, SDL_SCANCODE_NUMLOCKCLEAR, false);
+    //     }
+    // }
+
+    // if (!bytes[2] && attachment->last_key) {
+    //     if (attachment->last_key == SDL_SCANCODE_CAPSLOCK) {
+    //         attachment->capslock = !attachment->capslock;
+    //     }
+    //     SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, attachment->last_key, false);
+    //     if (!(attachment->last_modifiers & 0xfd)) {
+    //         SDL_Keycode keycode = SDL_GetKeymapKeycode(NULL,
+    //             attachment->last_key,
+    //             ((attachment->last_modifiers & 0x02) || attachment->capslock) ? SDL_KMOD_SHIFT : 0);
+    //         if (keycode && keycode < 0x80) {
+    //             char text[2] = { (char)keycode };
+    //             SDL_SendKeyboardText(text);
+    //         }
+    //     }
+    //     attachment->last_key = 0;
+    // } else {
+    //     SDL_SendKeyboardKey(timestamp, attachment->keyboard, 0, bytes[2], true);
+    //     attachment->last_key = bytes[2];
+
+    //     if ((modifiers & 0x04) && attachment->altcode_digit >= 0) {
+    //         int digit = bytes[2] - SDL_SCANCODE_KP_1 + 1;
+    //         if (digit < 1 || digit > 10) {
+    //             attachment->altcode_digit = -1;
+    //         } else {
+    //             attachment->altcode_digit++;
+    //             attachment->altcode *= 10;
+    //             if (digit < 10) {
+    //                 attachment->altcode += digit;
+    //             }
+    //         }
+    //     }
+    // }
+
+    // attachment->last_modifiers = modifiers;
     return true;
 }
 
@@ -2458,10 +2458,10 @@ static bool GIP_HandleSystemMessage(
         // XXX If we reattach to a controller after it's been initialized, it might have
         // attachments we don't know about. Try to figure out what this one is.
         if (header->message_type == GIP_CMD_HID_REPORT && num_bytes == 8) {
-            if (!attachment->keyboard) {
-                attachment->keyboard = (SDL_KeyboardID)(uintptr_t) attachment;
-                SDL_AddKeyboard(attachment->keyboard, "Xbox One Chatpad");
-            }
+            // if (!attachment->keyboard) {
+            //     attachment->keyboard = (SDL_KeyboardID)(uintptr_t) attachment;
+            //     SDL_AddKeyboard(attachment->keyboard, "Xbox One Chatpad");
+            // }
             attachment->attachment_type = GIP_TYPE_CHATPAD;
             attachment->metadata.device.in_system_messages[0] |= (1u << GIP_CMD_HID_REPORT);
         }
@@ -3069,9 +3069,9 @@ static void HIDAPI_DriverGIP_FreeDevice(SDL_HIDAPI_Device *device)
             SDL_free(attachment->fragment_data);
             attachment->fragment_data = NULL;
         }
-        if (attachment->keyboard) {
-            SDL_RemoveKeyboard(attachment->keyboard);
-        }
+        // if (attachment->keyboard) {
+        //     SDL_RemoveKeyboard(attachment->keyboard);
+        // }
         GIP_MetadataFree(&attachment->metadata);
         SDL_free(attachment);
         context->attachments[i] = NULL;
diff --git a/thirdparty/sdl/time/SDL_time.c b/thirdparty/sdl/time/SDL_time.c
index ba0a2cf7fa..8f1492b3df 100644
--- a/thirdparty/sdl/time/SDL_time.c
+++ b/thirdparty/sdl/time/SDL_time.c
@@ -66,7 +66,7 @@ bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat
         *timeFormat = SDL_TIME_FORMAT_24HR;
     }
 
-    SDL_GetSystemTimeLocalePreferences(dateFormat, timeFormat);
+    // SDL_GetSystemTimeLocalePreferences(dateFormat, timeFormat);
 
     return true;
 }