From: Holger Schemel Date: Sat, 29 Dec 2018 01:00:51 +0000 (+0100) Subject: added stopping text input when pressing joystick button X-Git-Tag: 4.1.2.0~67 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0c08866e0fd391ec7e01562ad2ea3b5645ebfc13;p=rocksndiamonds.git added stopping text input when pressing joystick button --- diff --git a/src/events.c b/src/events.c index 33460557..7b2ba984 100644 --- a/src/events.c +++ b/src/events.c @@ -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)