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:
parent
3a2e560139
commit
d223d83cbf
23 changed files with 343 additions and 60 deletions
|
@ -51,11 +51,13 @@
|
|||
|
||||
static void mrbBindingExecute();
|
||||
static void mrbBindingTerminate();
|
||||
static void mrbBindingReset();
|
||||
|
||||
ScriptBinding scriptBindingImpl =
|
||||
{
|
||||
mrbBindingExecute,
|
||||
mrbBindingTerminate
|
||||
mrbBindingTerminate,
|
||||
mrbBindingReset
|
||||
};
|
||||
|
||||
ScriptBinding *scriptBinding = &scriptBindingImpl;
|
||||
|
@ -384,7 +386,7 @@ static void mrbBindingExecute()
|
|||
|
||||
checkException(mrb);
|
||||
|
||||
shState->rtData().rqTermAck = true;
|
||||
shState->rtData().rqTermAck.set();
|
||||
shState->texPool().disable();
|
||||
|
||||
mrbc_context_free(mrb, ctx);
|
||||
|
@ -398,3 +400,8 @@ static void mrbBindingTerminate()
|
|||
|
||||
mrb_raise(mrb, data->exc[Shutdown], "");
|
||||
}
|
||||
|
||||
static void mrbBindingReset()
|
||||
{
|
||||
// No idea how to do this with mruby yet
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue