X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=e07b8494cef2b9167b45382cb919bf5e69a3189f;hp=a5bbf458ccc3f91381023161f01d945b75bd819a;hb=8ab1a8040e3d3615ac2f6656f38fef8a809364a8;hpb=55188fc81fac757089356928ae7ec26f90c4a7d0 diff --git a/src/events.c b/src/events.c index a5bbf458..e07b8494 100644 --- a/src/events.c +++ b/src/events.c @@ -214,6 +214,8 @@ static void HandleEvents(void) while (NextValidEvent(&event)) { + int game_status_last = game_status; + switch (event.type) { case EVENT_BUTTONPRESS: @@ -264,6 +266,10 @@ static void HandleEvents(void) break; } + // always handle events within delay period if game status has changed + if (game_status != game_status_last) + ResetDelayCounter(&event_frame_delay); + // do not handle events for longer than standard frame delay period if (DelayReached(&event_frame_delay, event_frame_delay_value)) break; @@ -1470,7 +1476,7 @@ void HandleKeyEvent(KeyEvent *event) if (key_status == KEY_PRESSED) SetOverlayEnabled(!GetOverlayEnabled()); } - else + else if (!textinput_status) { // for any other "real" key event, disable virtual buttons SetOverlayEnabled(FALSE); @@ -1749,6 +1755,7 @@ void HandleButton(int mx, int my, int button, int button_nr) break; case GAME_MODE_PSEUDO_TYPENAME: + case GAME_MODE_PSEUDO_TYPENAMES: HandleTypeName(KSYM_Return); break; @@ -2301,6 +2308,7 @@ void HandleKey(Key key, int key_status) switch (game_status) { case GAME_MODE_PSEUDO_TYPENAME: + case GAME_MODE_PSEUDO_TYPENAMES: HandleTypeName(key); break;