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

@ -46,7 +46,7 @@ rgssThreadError(RGSSThreadData *rtData, const std::string &msg)
{
rtData->rgssErrorMsg = msg;
rtData->ethread->requestTerminate();
rtData->rqTermAck = true;
rtData->rqTermAck.set();
}
static inline const char*
@ -147,7 +147,7 @@ int rgssThreadFun(void *userdata)
/* Start script execution */
scriptBinding->execute();
threadData->rqTermAck = true;
threadData->rqTermAck.set();
threadData->ethread->requestTerminate();
SharedState::finiInstance();
@ -276,7 +276,7 @@ int main(int argc, char *argv[])
eventThread.process(rtData);
/* Request RGSS thread to stop */
rtData.rqTerm = true;
rtData.rqTerm.set();
/* Wait for RGSS thread response */
for (int i = 0; i < 1000; ++i)