From 5f0a0f5ea785f46a99837bc8a2ac46c0e930993d Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 10 Apr 2024 23:02:44 +1000 Subject: [PATCH] vid: [Windows] don't r_restart for window resize events This workaround was added for SDL 1.2 and is no longer necessary. Signed-off-by: bones_was_here --- vid_sdl.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/vid_sdl.c b/vid_sdl.c index 7bd5be3b..51e98c4e 100644 --- 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); -- 2.39.2