From 09f375f59a1eefb03f8b3baf91718773b3a9dbc6 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 14 Feb 2008 18:21:54 +0000 Subject: [PATCH] slight cleanup of Sys_EventFilter git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8091 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_sdl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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] = -- 2.39.2