From: Holger Schemel Date: Wed, 31 Jan 2018 18:41:43 +0000 (+0100) Subject: renamed function 'NextEvent' to 'WaitEvent' X-Git-Tag: 4.0.1.1~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=88a1829af8ca41b6e581f209002022b2483b86df;p=rocksndiamonds.git renamed function 'NextEvent' to 'WaitEvent' - to make it clear that this function is waiting if no event is pending - to match SDL function name --- diff --git a/src/events.c b/src/events.c index e575a981..10b866d4 100644 --- a/src/events.c +++ b/src/events.c @@ -142,7 +142,7 @@ boolean NextValidEvent(Event *event) { boolean handle_this_event = FALSE; - NextEvent(event); + WaitEvent(event); if (FilterEvents(event)) handle_this_event = TRUE; @@ -344,7 +344,7 @@ void ClearEventQueue() { Event event; - NextEvent(&event); + WaitEvent(&event); switch (event.type) { @@ -392,7 +392,7 @@ void SleepWhileUnmapped() { Event event; - NextEvent(&event); + WaitEvent(&event); switch (event.type) { diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 14ad28fe..9d2dc17c 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -2536,7 +2536,7 @@ void SDLCloseAudio(void) /* event functions */ /* ========================================================================= */ -void SDLNextEvent(Event *event) +void SDLWaitEvent(Event *event) { SDL_WaitEvent(event); } diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index 075b99bb..b6fad441 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -490,7 +490,7 @@ void SDLSetMouseCursor(struct MouseCursorInfo *); void SDLOpenAudio(void); void SDLCloseAudio(void); -void SDLNextEvent(Event *); +void SDLWaitEvent(Event *); void SDLHandleWindowManagerEvent(Event *); void HandleJoystickEvent(Event *); diff --git a/src/libgame/system.c b/src/libgame/system.c index 6d2b222a..a87ecc83 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1493,9 +1493,9 @@ boolean PendingEvent(void) return (SDL_PollEvent(NULL) ? TRUE : FALSE); } -void NextEvent(Event *event) +void WaitEvent(Event *event) { - SDLNextEvent(event); + SDLWaitEvent(event); } void PeekEvent(Event *event) diff --git a/src/libgame/system.h b/src/libgame/system.h index 216ca6a6..3cf8bea6 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1544,7 +1544,7 @@ void CloseAudio(void); void SetAudioMode(boolean); boolean PendingEvent(void); -void NextEvent(Event *event); +void WaitEvent(Event *event); void PeekEvent(Event *event); void CheckQuitEvent(void); Key GetEventKey(KeyEvent *, boolean); diff --git a/src/screens.c b/src/screens.c index d3bf2981..0a0f1f25 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5608,7 +5608,7 @@ static Key getSetupKey() { Event event; - NextEvent(&event); + WaitEvent(&event); switch (event.type) { @@ -6294,7 +6294,7 @@ void CustomizeKeyboard(int player_nr) { Event event; - NextEvent(&event); + WaitEvent(&event); switch (event.type) { diff --git a/src/tools.c b/src/tools.c index 209c4e23..9bde54c7 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3781,7 +3781,7 @@ void WaitForEventToContinue() { Event event; - NextEvent(&event); + WaitEvent(&event); switch (event.type) {