From a59cb8ed506a25ce33cc4faaff8c0925a3faeabb Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Wed, 10 Sep 2008 00:33:12 +0000 Subject: [PATCH] this might fix ESC-key hack for vista users. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@112 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/windows/WinMain.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pcsx2/windows/WinMain.c b/pcsx2/windows/WinMain.c index 8505eab30e..45cf1c73b0 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -622,24 +622,26 @@ void CALLBACK KeyEvent(keyEvent* ev) #endif if (CHECK_ESCAPE_HACK) { - ClosePlugins(); - SysClose(); + //ClosePlugins(); + //SysClose(); + PostMessage(GetForegroundWindow(), WM_CLOSE, 0, 0); //ReleasePlugins(); //needReset = 1; //efile = 0; - exit(0); + //exit(0); } + else { + ClosePlugins(); - ClosePlugins(); + if( !UseGui ) { + // not using GUI and user just quit, so exit + exit(0); + } - if( !UseGui ) { - // not using GUI and user just quit, so exit - exit(0); - } - - CreateMainWindow(SW_SHOWNORMAL); - RunGui(); - nDisableSC = 0; + CreateMainWindow(SW_SHOWNORMAL); + RunGui(); + nDisableSC = 0; + } break; default: