Fix the Lua EngineProcess bug, not sure how either (needs further investigation) I suspect that stacking Lua calls upon each other (which will happen in engine->Tick()/engine->Draw()) is causing some unusual behaviour, checking for an engine break just before this fixes it. fixes #129
This commit is contained in:
parent
fee3f3bf44
commit
4c63a6f593
@ -294,11 +294,7 @@ void EngineProcess()
|
|||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
while(engine->Running())
|
while(engine->Running())
|
||||||
{
|
{
|
||||||
if(engine->Broken())
|
if(engine->Broken()) { engine->UnBreak(); break; }
|
||||||
{
|
|
||||||
engine->UnBreak();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
event.type = 0;
|
event.type = 0;
|
||||||
while (SDL_PollEvent(&event))
|
while (SDL_PollEvent(&event))
|
||||||
{
|
{
|
||||||
@ -360,6 +356,7 @@ void EngineProcess()
|
|||||||
}
|
}
|
||||||
event.type = 0; //Clear last event
|
event.type = 0; //Clear last event
|
||||||
}
|
}
|
||||||
|
if(engine->Broken()) { engine->UnBreak(); break; }
|
||||||
|
|
||||||
engine->Tick();
|
engine->Tick();
|
||||||
engine->Draw();
|
engine->Draw();
|
||||||
|
Reference in New Issue
Block a user