Allow the Joy2 button to cancel binding a key in the controls menu

This commit is contained in:
nashmuhandes 2024-02-02 19:26:46 +08:00 committed by Christoph Oelckers
parent 481b2c1a70
commit cf4841c7de

View file

@ -467,7 +467,7 @@ class EnterKey : Menu
menuactive = Menu.On;
SetMenuMessage(0);
Close();
mParentMenu.MenuEvent((ev.KeyScan == InputEvent.KEY_ESCAPE)? Menu.MKEY_Abort : Menu.MKEY_Input, 0);
mParentMenu.MenuEvent((ev.KeyScan == InputEvent.KEY_ESCAPE) || (ev.KeyScan == InputEvent.KEY_JOY2) ? Menu.MKEY_Abort : Menu.MKEY_Input, 0);
return true;
}
return false;