- fixed: parent-less confirmation screens did not process any input.

This commit is contained in:
Christoph Oelckers 2020-02-04 21:02:22 +01:00
parent 5d4514060b
commit 1d468190a6

View file

@ -142,8 +142,6 @@ void DMessageBoxMenu::CloseSound()
void DMessageBoxMenu::HandleResult(bool res) void DMessageBoxMenu::HandleResult(bool res)
{ {
if (mParentMenu != NULL)
{
if (mMessageMode == 0) if (mMessageMode == 0)
{ {
if (mActionFunc) if (mActionFunc)
@ -151,9 +149,9 @@ void DMessageBoxMenu::HandleResult(bool res)
mActionFunc(res); mActionFunc(res);
Close(); Close();
} }
else if (mAction == NAME_None) else if (mAction == NAME_None && mParentMenu)
{ {
mParentMenu->MenuEvent(res? MKEY_MBYes : MKEY_MBNo, false); mParentMenu->MenuEvent(res ? MKEY_MBYes : MKEY_MBNo, false);
Close(); Close();
} }
else else
@ -163,7 +161,6 @@ void DMessageBoxMenu::HandleResult(bool res)
} }
CloseSound(); CloseSound();
} }
}
} }
//============================================================================= //=============================================================================