From: Holger Schemel Date: Sun, 4 Oct 2020 23:10:05 +0000 (+0200) Subject: added waiting for press/release events when waiting for events to continue X-Git-Tag: 4.2.0.3~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=023dd1a5d064b6a2fbfb8145af8c61261ea53886;p=rocksndiamonds.git added waiting for press/release events when waiting for events to continue --- diff --git a/src/tools.c b/src/tools.c index a6a08d72..50f6775b 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4196,6 +4196,7 @@ void DrawPlayerField(int x, int y) void WaitForEventToContinue(void) { + boolean first_wait = TRUE; boolean still_wait = TRUE; if (program.headless) @@ -4218,7 +4219,16 @@ void WaitForEventToContinue(void) { switch (event.type) { - case EVENT_BUTTONRELEASE: + case EVENT_BUTTONPRESS: + case EVENT_FINGERPRESS: + first_wait = FALSE; + break; + + case EVENT_BUTTONRELEASE: + case EVENT_FINGERRELEASE: + still_wait = first_wait; + break; + case EVENT_KEYPRESS: case SDL_CONTROLLERBUTTONDOWN: case SDL_JOYBUTTONDOWN: