]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
slight cleanup of Sys_EventFilter
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 18:21:54 +0000 (18:21 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Feb 2008 18:21:54 +0000 (18:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8091 d7cf8633-e32d-0410-b094-e92efae38249

vid_sdl.c

index bb3b22395863cace552b3fa56a228a2841cb95d4..5dbd5cc6b6545d8d08c0d55c3fe47d985b8056f8 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -331,14 +331,14 @@ void IN_Move( void )
 static int Sys_EventFilter( SDL_Event *event )
 {
        //TODO: Add a quit query in linux, too - though linux user are more likely to know what they do
+       if (event->type == SDL_QUIT)
+       {
 #ifdef WIN32
-       if( event->type == SDL_QUIT && MessageBox( NULL, "Are you sure you want to quit?", "Confirm Exit", MB_YESNO | MB_SETFOREGROUND | MB_ICONQUESTION ) == IDNO )
-               return 0;
-       else
-               return 1;
-#else
-       return 1;
+               if (MessageBox( NULL, "Are you sure you want to quit?", "Confirm Exit", MB_YESNO | MB_SETFOREGROUND | MB_ICONQUESTION ) == IDNO)
+                       return 0;
 #endif
+       }
+       return 1;
 }
 
 static keynum_t buttonremap[18] =