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
This commit is contained in:
Fabian Greffrath 2024-12-31 09:10:46 +01:00 committed by GitHub
parent 4e3779359f
commit fc6d14cfa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;