lua: add debuggerloopstep
This commit is contained in:
parent
6021ba627d
commit
fca1c78925
|
@ -903,15 +903,14 @@ void _updateWindow()
|
||||||
//UpdateTasEditor(); //AnS: moved to FCEUD_Update
|
//UpdateTasEditor(); //AnS: moved to FCEUD_Update
|
||||||
}
|
}
|
||||||
|
|
||||||
void win_debuggerLoop()
|
void win_debuggerLoopStep()
|
||||||
{
|
{
|
||||||
//delay until something causes us to unpause.
|
|
||||||
//either a hotkey or a debugger command
|
|
||||||
while(FCEUI_EmulationPaused() && !FCEUI_EmulationFrameStepped())
|
|
||||||
{
|
|
||||||
Sleep(50);
|
|
||||||
FCEUD_UpdateInput();
|
FCEUD_UpdateInput();
|
||||||
_updateWindow();
|
_updateWindow();
|
||||||
|
|
||||||
|
//question:
|
||||||
|
//should this go here, or in the loop?
|
||||||
|
|
||||||
// HACK: break when Frame Advance is pressed
|
// HACK: break when Frame Advance is pressed
|
||||||
extern bool frameAdvanceRequested;
|
extern bool frameAdvanceRequested;
|
||||||
extern int frameAdvance_Delay_count, frameAdvance_Delay;
|
extern int frameAdvance_Delay_count, frameAdvance_Delay;
|
||||||
|
@ -923,7 +922,16 @@ void win_debuggerLoop()
|
||||||
frameAdvance_Delay_count++;
|
frameAdvance_Delay_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int zzz=9;
|
|
||||||
|
void win_debuggerLoop()
|
||||||
|
{
|
||||||
|
//delay until something causes us to unpause.
|
||||||
|
//either a hotkey or a debugger command
|
||||||
|
while(FCEUI_EmulationPaused() && !FCEUI_EmulationFrameStepped())
|
||||||
|
{
|
||||||
|
Sleep(50);
|
||||||
|
win_debuggerLoopStep();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the game and gamewindow with a new frame
|
// Update the game and gamewindow with a new frame
|
||||||
|
|
|
@ -407,6 +407,14 @@ static int emu_debuggerloop(lua_State *L) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int emu_debuggerloopstep(lua_State *L) {
|
||||||
|
#ifdef WIN32
|
||||||
|
extern void win_debuggerLoopStep();
|
||||||
|
win_debuggerLoopStep();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// emu.softreset()
|
// emu.softreset()
|
||||||
//
|
//
|
||||||
// Executes a power cycle
|
// Executes a power cycle
|
||||||
|
@ -5547,6 +5555,7 @@ static const struct luaL_reg emulib [] = {
|
||||||
|
|
||||||
{"poweron", emu_poweron},
|
{"poweron", emu_poweron},
|
||||||
{"debuggerloop", emu_debuggerloop},
|
{"debuggerloop", emu_debuggerloop},
|
||||||
|
{"debuggerloopstep", emu_debuggerloopstep},
|
||||||
{"softreset", emu_softreset},
|
{"softreset", emu_softreset},
|
||||||
{"speedmode", emu_speedmode},
|
{"speedmode", emu_speedmode},
|
||||||
{"frameadvance", emu_frameadvance},
|
{"frameadvance", emu_frameadvance},
|
||||||
|
|
Loading…
Reference in New Issue