From fc6d14cfa680a344be51bd1962b851a50dfd3be2 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 31 Dec 2024 09:10:46 +0100 Subject: [PATCH] clear active thermo when prematurely exiting out of the menu (#2111) Fixes #2100 At least this fixes the last thermo still being in an active state when exiting the menu while the mouse button is pressed but not yet released. It does not fix the thermo value != actual value issue, though --- src/mn_setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mn_setup.c b/src/mn_setup.c index 346b01b6..e9f78796 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -4217,6 +4217,8 @@ static boolean NextPage(int inc) return true; } +static setup_menu_t *active_thermo = NULL; + boolean MN_SetupResponder(menu_action_t action, int ch) { // phares 3/26/98 - 4/11/98: @@ -4465,6 +4467,7 @@ boolean MN_SetupResponder(menu_action_t action, int ch) set_weapon_active = false; default_verify = false; // phares 4/19/98 print_warning_about_changes = false; // [FG] reset + active_thermo = NULL; M_StartSound(sfx_swtchx); return true; } @@ -4531,8 +4534,6 @@ boolean MN_SetupMouseResponder(int x, int y) return true; } - static setup_menu_t *active_thermo = NULL; - if (M_InputDeactivated(input_menu_enter) && active_thermo) { int flags = active_thermo->m_flags;