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;