From bc9c778bb54062fbad291eac8413d03aeffde1e3 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 7 Mar 2024 15:26:59 -0800 Subject: [PATCH] Menus/Video Options: fix "Set Resolution..." submenu not having the arrow --- src/k_menu.h | 1 - src/menus/options-video-1.c | 4 ++-- src/menus/options-video-modes.c | 10 ++++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/k_menu.h b/src/k_menu.h index c39984a37..479d9495e 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -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 diff --git a/src/menus/options-video-1.c b/src/menus/options-video-1.c index a1e1dcecc..e233ee195 100644 --- a/src/menus/options-video-1.c +++ b/src/menus/options-video-1.c @@ -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}, diff --git a/src/menus/options-video-modes.c b/src/menus/options-video-modes.c index a7648b7d6..ee360491c 100644 --- a/src/menus/options-video-modes.c +++ b/src/menus/options-video-modes.c @@ -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