More robust EngineProcess (still doesn't fix lua bug)

This commit is contained in:
Simon Robertshaw 2012-08-19 00:40:20 +01:00
parent 740f0d30c3
commit 93afe0a1ea
4 changed files with 12 additions and 2 deletions

View File

@ -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[])

View File

@ -5,6 +5,7 @@
* Author: Simon
*/
#include <iostream>
#include "TextPrompt.h"
#include "interface/Label.h"
#include "interface/Button.h"

View File

@ -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()

View File

@ -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; }