Lua - move threading code into the frame loops, now emu.frameadvance works per frame not per emulator loop
This commit is contained in:
parent
33ca14a344
commit
41708a8579
|
@ -332,11 +332,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
//client input-related duties
|
|
||||||
if (LuaConsole1.LuaImp.isRunning)
|
|
||||||
{
|
|
||||||
LuaConsole1.LuaImp.LuaWait.WaitOne();
|
|
||||||
}
|
|
||||||
|
|
||||||
Input.Instance.Update();
|
Input.Instance.Update();
|
||||||
//handle events and dispatch as a hotkey action, or a hotkey button, or an input button
|
//handle events and dispatch as a hotkey action, or a hotkey button, or an input button
|
||||||
|
@ -352,10 +348,7 @@ namespace BizHawk.MultiClient
|
||||||
StepRunLoop_Throttle();
|
StepRunLoop_Throttle();
|
||||||
|
|
||||||
Render();
|
Render();
|
||||||
if (LuaConsole1.LuaImp.isRunning)
|
|
||||||
{
|
|
||||||
Global.MainForm.MainWait.Set();
|
|
||||||
}
|
|
||||||
CheckMessages();
|
CheckMessages();
|
||||||
if (exit)
|
if (exit)
|
||||||
break;
|
break;
|
||||||
|
@ -1626,6 +1619,17 @@ namespace BizHawk.MultiClient
|
||||||
bool genSound = false;
|
bool genSound = false;
|
||||||
if (runFrame)
|
if (runFrame)
|
||||||
{
|
{
|
||||||
|
//client input-related duties
|
||||||
|
if (LuaConsole1.LuaImp.isRunning)
|
||||||
|
{
|
||||||
|
LuaConsole1.LuaImp.LuaWait.WaitOne();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LuaConsole1.LuaImp.isRunning)
|
||||||
|
{
|
||||||
|
Global.MainForm.MainWait.Set();
|
||||||
|
}
|
||||||
|
|
||||||
runloop_fps++;
|
runloop_fps++;
|
||||||
bool ff = Global.ClientControls["Fast Forward"];
|
bool ff = Global.ClientControls["Fast Forward"];
|
||||||
bool updateFpsString = (runloop_last_ff != ff);
|
bool updateFpsString = (runloop_last_ff != ff);
|
||||||
|
|
Loading…
Reference in New Issue