]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
vid: [Windows] don't r_restart for window resize events
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 10 Apr 2024 13:02:44 +0000 (23:02 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 11 Apr 2024 12:12:32 +0000 (22:12 +1000)
This workaround was added for SDL 1.2 and is no longer necessary.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
vid_sdl.c

index 7bd5be3bb19ca2b3b065d9f30b00d4d61cb205c1..51e98c4ed3bb4ba6f12bc91c0d62adb51ff1bce3 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -59,9 +59,6 @@ static io_connect_t IN_GetIOHandle(void)
 #endif
 #endif
 
-#ifdef WIN32
-#define SDL_R_RESTART
-#endif
 
 // Tell startup code that we have a client
 int cl_available = true;
@@ -1023,20 +1020,6 @@ void IN_Move( void )
 // Message Handling
 ////
 
-#ifdef SDL_R_RESTART
-static qbool sdl_needs_restart;
-static void sdl_start(void)
-{
-}
-static void sdl_shutdown(void)
-{
-       sdl_needs_restart = false;
-}
-static void sdl_newmap(void)
-{
-}
-#endif
-
 static keynum_t buttonremap[] =
 {
        K_MOUSE1,
@@ -1209,15 +1192,6 @@ void Sys_SDL_HandleEvents(void)
                                                        //vid.height = event.window.data2;
                                                        // get the real framebuffer size in case the platform's screen coordinates are DPI scaled
                                                        SDL_GL_GetDrawableSize(window, &vid.width, &vid.height);
-#ifdef SDL_R_RESTART
-                                                       // better not call R_Modules_Restart_f from here directly, as this may wreak havoc...
-                                                       // so, let's better queue it for next frame
-                                                       if(!sdl_needs_restart)
-                                                       {
-                                                               Cbuf_AddText(cmd_local, "\nr_restart\n");
-                                                               sdl_needs_restart = true;
-                                                       }
-#endif
                                                }
                                                break;
                                        case SDL_WINDOWEVENT_SIZE_CHANGED: // internal and external events
@@ -1513,10 +1487,6 @@ void VID_Init (void)
 #endif
        Cvar_RegisterVariable(&joy_sdl2_trigger_deadzone);
 
-#ifdef SDL_R_RESTART
-       R_RegisterModule("SDL", sdl_start, sdl_shutdown, sdl_newmap, NULL, NULL);
-#endif
-
 #if defined(__linux__)
        // exclusive fullscreen is no longer functional (and when it worked was obnoxious and not faster)
        Cvar_SetValueQuick(&vid_desktopfullscreen, 1);