From: havoc Date: Thu, 14 Feb 2008 18:21:54 +0000 (+0000) Subject: slight cleanup of Sys_EventFilter X-Git-Tag: xonotic-v0.1.0preview~2425 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=09f375f59a1eefb03f8b3baf91718773b3a9dbc6;p=xonotic%2Fdarkplaces.git slight cleanup of Sys_EventFilter git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8091 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index bb3b2239..5dbd5cc6 100644 --- 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] =