X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=7b2ba984732b8fa857478f9bfc44d26d9259d041;hb=c3e0f340f3ba490911b5e1dce7d9902b01afc207;hp=3346055722afa7566fa7f249ade02584d18a4f15;hpb=c0441f4c88acd9bd63f3b30bc4ce22d61ebee10a;p=rocksndiamonds.git 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)