aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-02-17 21:35:28 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:51 +0100
commitae7ca5fd35b6425f8f1f73345f6748073e6f87ac (patch)
tree4f5ba2168541865e169129e238b120a2d78e15ec /src/menu
parent07ede1c312c050103ae23ff2f04e86fbc97b087f (diff)
downloadusdx-ae7ca5fd35b6425f8f1f73345f6748073e6f87ac.tar.gz
usdx-ae7ca5fd35b6425f8f1f73345f6748073e6f87ac.tar.xz
usdx-ae7ca5fd35b6425f8f1f73345f6748073e6f87ac.zip
menu: clean quit after pressing q
Diffstat (limited to 'src/menu')
-rw-r--r--src/menu/application.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/menu/application.cpp b/src/menu/application.cpp
index 80fded75..9f3b6b2d 100644
--- a/src/menu/application.cpp
+++ b/src/menu/application.cpp
@@ -114,6 +114,16 @@ namespace usdx
case SDL_QUIT:
running = false;
event_thread.interrupt();
+ break;
+
+ case SDL_KEYDOWN:
+ if (event.key.keysym.sym == SDLK_q) {
+ running = false;
+ event_thread.interrupt();
+ break;
+ }
+
+ /* fall throught */
default:
event_manager.add_event(event);