commit 38c615f9
The close button does now work in the level select screen
Changed files
| M | source/code/main.cpp before |
| M | source/code/mainVars.hpp before |
diff --git a/source/code/main.cpp b/source/code/main.cpp
index 3d8c0d7..b057ffe 100644
--- a/source/code/main.cpp
+++ b/source/code/main.cpp
@@ -1562,7 +1562,12 @@ int PuzzleLevelSelect(int Type) {
}
SDL_Event event;
- while ( SDL_PollEvent(&event) )
+ while ( SDL_PollEvent(&event) ) {
+ if ( event.type == SDL_QUIT ) {
+ Config::getInstance()->setShuttingDown(5);
+ levelNr = -1;
+ levelSelected = true;
+ }
if ( event.type == SDL_KEYDOWN ) {
if ( event.key.keysym.sym == SDLK_ESCAPE ) {
levelNr = -1;
@@ -1597,6 +1602,7 @@ int PuzzleLevelSelect(int Type) {
}
}
}
+ }
SDL_GetKeyboardState(nullptr);
diff --git a/source/code/mainVars.hpp b/source/code/mainVars.hpp
index a35598e..6de66d1 100644
--- a/source/code/mainVars.hpp
+++ b/source/code/mainVars.hpp
@@ -197,8 +197,6 @@ std::string player2name;
bool twoPlayers; //True if two players are playing
-//Old mouse position:
-static int oldMousex, oldMousey;
//Old Stage Clear Buble
static int oldBubleX, oldBubleY;