diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-19 00:03:33 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-19 00:03:33 +0000 |
commit | 0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f (patch) | |
tree | e40d35465465b9e87e0453321968fa8345621b4b /src/game.cpp | |
parent | 9d4197b066ddb65ca1caf0ca2363f9909895d608 (diff) | |
download | mana-0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f.tar.gz mana-0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f.tar.bz2 mana-0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f.tar.xz mana-0f7927ab8aadc2c6f42c70d2809b357efc4ddb2f.zip |
Added handling of window close button.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 2c0b4f72..e7eebbe6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -339,8 +339,7 @@ void do_input() } } } // End key down - - if (event.type == SDL_MOUSEBUTTONDOWN) + else if (event.type == SDL_MOUSEBUTTONDOWN) { int mx = event.button.x / 32 + camera_x; int my = event.button.y / 32 + camera_y; @@ -364,6 +363,10 @@ void do_input() } } } + else if (event.type == SDL_QUIT) + { + state = EXIT; + } // Push input to GUI when not used if (!used) { |