Menus/Video Options: fix "Set Resolution..." submenu not having the arrow

This commit is contained in:
James R 2024-03-07 15:26:59 -08:00
parent f066f10e8f
commit bc9c778bb5
3 changed files with 6 additions and 9 deletions

View file

@ -1104,7 +1104,6 @@ void M_ProfileTryController(INT32 choice);
void M_ProfileControlsConfirm(INT32 choice);
// video modes menu (resolution)
void M_VideoModeMenu(INT32 choice);
void M_HandleVideoModes(INT32 ch);
// data stuff

View file

@ -10,8 +10,8 @@
menuitem_t OPTIONS_Video[] =
{
{IT_STRING | IT_CALL, "Set Resolution...", "Change the screen resolution for the game.",
NULL, {.routine = M_VideoModeMenu}, 0, 0},
{IT_STRING | IT_SUBMENU, "Set Resolution...", "Change the screen resolution for the game.",
NULL, {.submenu = &OPTIONS_VideoModesDef}, 0, 0},
{IT_NOTHING|IT_SPACE, NULL, NULL,
NULL, {NULL}, 0, 0},

View file

@ -12,6 +12,8 @@ menuitem_t OPTIONS_VideoModes[] = {
};
static void M_VideoModeMenu(void);
menu_t OPTIONS_VideoModesDef = {
sizeof (OPTIONS_VideoModes) / sizeof (menuitem_t),
&OPTIONS_VideoDef,
@ -25,20 +27,18 @@ menu_t OPTIONS_VideoModesDef = {
M_DrawVideoModes,
M_DrawOptionsCogs,
M_OptionsTick,
NULL,
M_VideoModeMenu,
NULL,
NULL,
};
// setup video mode menu
void M_VideoModeMenu(INT32 choice)
static void M_VideoModeMenu(void)
{
INT32 i, j, vdup, nummodes;
UINT32 width, height;
const char *desc;
(void)choice;
memset(optionsmenu.modedescs, 0, sizeof(optionsmenu.modedescs));
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
@ -100,8 +100,6 @@ void M_VideoModeMenu(INT32 choice)
}
optionsmenu.vidm_column_size = (optionsmenu.vidm_nummodes+2) / 3;
M_SetupNextMenu(&OPTIONS_VideoModesDef, false);
}
// special menuitem key handler for video mode list