From 63de3aac4245593aa81b3e1210ead0fb59b1647c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 11 Nov 2002 09:06:30 +0000 Subject: [PATCH] add alt-f4 --- stepmania/src/StepMania.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index def1f66e0f..be51d07285 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -451,6 +451,20 @@ int main(int argc, char* argv[]) { DeviceInput DeviceI = (DeviceInput)ieArray[i]; InputEventType type = ieArray[i].type; + + /* ALT-F4 -> quit (better place for this? in ScreenManager perhaps?) */ + if(type == IET_FIRST_PRESS && + DeviceI == DeviceInput(DEVICE_KEYBOARD, DIK_F4) && + (INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_RMENU)) || + INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_LMENU)) ) ) + { + SDL_Event *event; + event = (SDL_Event *) malloc(sizeof(event)); + event->type = SDL_QUIT; + SDL_PushEvent(event); + continue; + } + GameInput GameI; MenuInput MenuI; StyleInput StyleI;