From ef4f7a42b94ef8ea44f039766218433a400ae418 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 12 Dec 2022 20:31:59 +0100 Subject: [PATCH] added returning directly to main menu from info sub-screens if needed --- src/screens.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/screens.c b/src/screens.c index 394f5292..c01d7356 100644 --- a/src/screens.c +++ b/src/screens.c @@ -318,6 +318,8 @@ static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS]; static int info_mode = INFO_MODE_MAIN; static int setup_mode = SETUP_MODE_MAIN; +static boolean info_screens_from_main = FALSE; + static TreeInfo *window_sizes = NULL; static TreeInfo *window_size_current = NULL; @@ -2537,6 +2539,18 @@ static void DrawInfoScreen_Main(void) int fade_mask = REDRAW_FIELD; int i; + // (needed after displaying info sub-screens directly from main menu) + if (info_screens_from_main) + { + info_screens_from_main = FALSE; + + SetGameStatus(GAME_MODE_MAIN); + + DrawMainMenu(); + + return; + } + if (redraw_mask & REDRAW_ALL) fade_mask = REDRAW_ALL; @@ -3856,6 +3870,7 @@ void DrawInfoScreen_FromMainMenu(int nr) SetGameStatus(GAME_MODE_INFO); info_mode = nr;; + info_screens_from_main = TRUE; FadeSetEnterScreen(); -- 2.34.1