X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=fe82932a746867dcfd26d64f01208ecf2e8e0a2f;hb=7c04ddc404bb1d13df41a1f808924f5f89c6749b;hp=a5bbf458ccc3f91381023161f01d945b75bd819a;hpb=55188fc81fac757089356928ae7ec26f90c4a7d0;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index a5bbf458..fe82932a 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; @@ -2403,7 +2411,7 @@ void HandleKey(Key key, int key_status) switch (key) { case KSYM_Escape: - RequestQuitGame(setup.ask_on_escape); + RequestQuitGame(TRUE); break; default: