Skip to content

Commit

Permalink
EVENTS: Allow for alt+f4 to quit on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
clone2727 committed Jan 21, 2013
1 parent 219b917 commit f295e61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/events/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ bool EventsManager::parseEventQuit(const Event &event) {
return true;
}

#ifdef WIN32
if ((event.type == kEventKeyDown) && (event.key.keysym.mod & KMOD_ALT) &&
(event.key.keysym.sym == SDLK_F4)) {
requestQuit();
return true;
}
#endif

return false;
}

Expand Down

0 comments on commit f295e61

Please sign in to comment.