X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=7b2ba984732b8fa857478f9bfc44d26d9259d041;hp=8c8ae5a910f25ee6fb41a11d0661dad4bd062e0a;hb=b275388df382d188bdce63b9e68783cb7139fc11;hpb=363a87ea9e17020bfb820f9f19a9c68a07fec120 diff --git a/src/events.c b/src/events.c index 8c8ae5a9..7b2ba984 100644 --- a/src/events.c +++ b/src/events.c @@ -1849,9 +1849,9 @@ boolean HandleKeysDebug(Key key, int key_status) return TRUE; } } +#endif return FALSE; -#endif } void HandleKey(Key key, int key_status) @@ -2360,6 +2360,16 @@ void HandleJoystick(void) return; } + if (newbutton && (game_status == GAME_MODE_PSEUDO_TYPENAME || + anyTextGadgetActive())) + { + // leave name input in main menu or text input gadget + HandleKey(KSYM_Escape, KEY_PRESSED); + HandleKey(KSYM_Escape, KEY_RELEASED); + + return; + } + if (level.game_engine_type == GAME_ENGINE_TYPE_MM) { if (game_status == GAME_MODE_PLAYING)