renamed function 'NextEvent' to 'WaitEvent'
[rocksndiamonds.git] / src / libgame / system.c
index 4f90a2d120835da09bda46a89f3877979b700ed5..a87ecc837f15206351dd228e89bedcf25512a925 100644 (file)
@@ -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)
@@ -1507,6 +1507,12 @@ void PeekEvent(Event *event)
 #endif
 }
 
+void CheckQuitEvent(void)
+{
+  if (SDL_QuitRequested())
+    program.exit_function(0);
+}
+
 Key GetEventKey(KeyEvent *event, boolean with_modifiers)
 {
 #if defined(TARGET_SDL2)