From 93afe0a1ea45efb5d62608555784580d4513bfd0 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 19 Aug 2012 00:40:20 +0100 Subject: More robust EngineProcess (still doesn't fix lua bug) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 9d1aa15..7eb9366 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -296,7 +296,7 @@ void EngineProcess() { if(engine->Broken()) { - engine->Break(); + engine->UnBreak(); break; } event.type = 0; @@ -414,6 +414,9 @@ void EngineProcess() } engine->SetFps(fps); } +#ifdef DEBUG + std::cout << "Breaking out of EngineProcess" << std::endl; +#endif } int main(int argc, char * argv[]) diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp index 3a2a39f..68333d1 100644 --- a/src/dialogues/TextPrompt.cpp +++ b/src/dialogues/TextPrompt.cpp @@ -5,6 +5,7 @@ * Author: Simon */ +#include #include "TextPrompt.h" #include "interface/Label.h" #include "interface/Button.h" diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp index 31311fe..0d709e6 100644 --- a/src/interface/Engine.cpp +++ b/src/interface/Engine.cpp @@ -52,7 +52,12 @@ void Engine::Begin(int width, int height) void Engine::Break() { - break_ = !break_; + break_ = true; +} + +void Engine::UnBreak() +{ + break_ = false; } void Engine::Exit() diff --git a/src/interface/Engine.h b/src/interface/Engine.h index b28ba84..47e3859 100644 --- a/src/interface/Engine.h +++ b/src/interface/Engine.h @@ -38,6 +38,7 @@ namespace ui inline bool Broken() { return break_; } void Exit(); void Break(); + void UnBreak(); void SetFullscreen(bool fullscreen) { Fullscreen = fullscreen; } inline bool GetFullscreen() { return Fullscreen; } -- cgit v0.9.2-21-gd62e