From d0b7f6203ccc320cbc85bc0b0e4ecbbb715240ba Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 4 Feb 2024 07:56:55 +0100 Subject: [PATCH] fix the dumbass compiler warning --- src/hardware/hw_main.c | 2 +- src/i_video.h | 2 ++ src/sdl/i_video.c | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 3f5a60059..76375238d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -170,7 +170,7 @@ static void CV_grframebuffer_OnChange(void) { ONLY_IF_GL_LOADED HWD.pfnSetSpecialState(HWD_SET_FRAMEBUFFER, cv_grframebuffer.value); - OglSdlSurface(vid.width, vid.height); //this is really dumb but it works TODO: fix compiler warning, cant include the proper header file here + RefreshSDLSurface(); } static void CV_filtermode_ONChange(void) diff --git a/src/i_video.h b/src/i_video.h index 602522871..2f08e4b1f 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -137,4 +137,6 @@ void I_EndRead(void); UINT32 I_GetRefreshRate(void); +void RefreshSDLSurface(void); + #endif diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 89c7bf555..47a5da1ad 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -200,6 +200,11 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen); //static void Impl_SetWindowName(const char *title); static void Impl_SetWindowIcon(void); +void RefreshSDLSurface(void) +{ + OglSdlSurface(vid.width, vid.height); +} + static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) { static SDL_bool wasfullscreen = SDL_FALSE;