refresh the video menu list if our resolution list changes
if you move the gamewindow to a different display, the video menu will now upadate to the new resolutions
This commit is contained in:
1 parent
406dbf333d
commit
6915077e0f
3 files changed
+9
-3
No files matched your search
+1
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
+6
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user