Implement F12 game reset (MRI only)

Can be disabled with "enableReset=false".

While at it, also replace the flakey volatile bool flags
with proper atomics.
This commit is contained in:
Jonas Kulla 2014-08-24 07:36:19 +02:00
parent 3a2e560139
commit d223d83cbf
23 changed files with 343 additions and 60 deletions

View file

@ -330,11 +330,20 @@ void SharedState::checkShutdown()
if (!p->rtData.rqTerm)
return;
p->rtData.rqTermAck = true;
p->rtData.rqTermAck.set();
p->texPool.disable();
scriptBinding->terminate();
}
void SharedState::checkReset()
{
if (!p->rtData.rqReset)
return;
p->rtData.rqReset.clear();
scriptBinding->reset();
}
Font &SharedState::defaultFont() const
{
return *p->defaultFont;