diff --git a/src/m_menu.c b/src/m_menu.c index 09a0c6350..6cb9137a3 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -282,7 +282,6 @@ static void M_SetupMultiHandler(INT32 choice); // Options // Split into multiple parts due to size -static void M_VideoModeMenu(INT32 choice); static void M_Setup1PControlsMenu(void); static void M_Setup2PControlsMenu(void); static void M_Setup3PControlsMenu(void); @@ -9441,7 +9440,7 @@ static void M_ResetControls(INT32 choice) static modedesc_t modedescs[MAXMODEDESCS]; -static void M_VideoModeMenu(INT32 choice) +void M_VideoModeMenu(INT32 choice) { INT32 i, j, vdup, nummodes, width, height; const char *desc; diff --git a/src/m_menu.h b/src/m_menu.h index de4f3b983..dc0cad1b9 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -231,6 +231,8 @@ extern menu_t *currentMenu; extern menu_t MainDef; extern menu_t SP_LoadDef; +extern menu_t OP_VideoModeDef; +void M_VideoModeMenu(INT32 choice); // Call upon joystick hotplug void M_SetupJoystickMenu(INT32 choice); diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 3ccdd1ca3..dcd2a01e3 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -100,6 +100,7 @@ typedef struct static video_mode_t windowedModes[MAXWINMODES] = {{NULL, 0, 0}}; static video_mode_t customMode = {NULL, 0, 0}; +static const char *fallback_resolution_name = "Fallback"; rendermode_t rendermode = render_none; @@ -164,7 +165,6 @@ SDL_Window *window = NULL; SDL_Renderer *renderer = NULL; static SDL_Texture *texture = NULL; static SDL_bool havefocus = SDL_TRUE; -static const char *fallback_resolution_name = "Fallback"; static SDL_bool Impl_CreateWindow(SDL_bool fullscreen); static void Impl_SetWindowIcon(void); @@ -1577,6 +1577,11 @@ static void I_FillScreenResolutionsList(void) } windowedModes[list_size].name = NULL; + + // be sure to update the video menu + if (menuactive && + currentMenu == &OP_VideoModeDef) + M_VideoModeMenu(0); } // return number of fullscreen + X11 modes