From 0c69e0fbfb014cf521e260ca6b69498cd2f6b8dd Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 31 Dec 2012 13:34:32 +0000 Subject: [PATCH] gtk: fix "quit" hotkey when --nogui is disabled --- src/drivers/sdl/input.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 183d63bd..65edc288 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -693,15 +693,20 @@ static void KeyboardCommands () //if(_keyonly(Hotkeys[HK_POWER])) { // FCEUI_PowerNES(); //} - - // TODO add comment i'm on the phone - if (noGui == 1) - { - if (_keyonly (Hotkeys[HK_QUIT])) + if (_keyonly (Hotkeys[HK_QUIT])) { - CloseGame (); - } + if (noGui == 1) + { + CloseGame (); + } + else + { + FCEUI_Kill(); + SDL_Quit(); + exit(0); + } } + else #ifdef _S9XLUA_H if (_keyonly (Hotkeys[HK_LOAD_LUA]))