Delegate ClientLuaLibrary.FrameSkip to ApiHawk

the ApiHawk copy was the bad one
This commit is contained in:
YoshiRulz 2020-11-30 19:57:13 +10:00
parent 7c85aee53b
commit a1ccac4d67
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 6 additions and 19 deletions

View File

@ -130,15 +130,14 @@ namespace BizHawk.Client.EmuHawk
public void FrameSkip(int numFrames) public void FrameSkip(int numFrames)
{ {
if (numFrames > 0) if (numFrames < 0)
{
_config.FrameSkip = numFrames;
_mainForm.FrameSkipMessage();
}
else
{ {
_logCallback("Invalid frame skip value"); _logCallback("Invalid frame skip value");
return;
} }
_config.FrameSkip = numFrames;
_mainForm.FrameSkipMessage();
} }
private void GetAllInputs() private void GetAllInputs()

View File

@ -76,19 +76,7 @@ namespace BizHawk.Client.EmuHawk
[LuaMethodExample("client.frameskip( 8 );")] [LuaMethodExample("client.frameskip( 8 );")]
[LuaMethod("frameskip", "Sets the frame skip value of the client UI (use 0 to disable)")] [LuaMethod("frameskip", "Sets the frame skip value of the client UI (use 0 to disable)")]
public void FrameSkip(int numFrames) public void FrameSkip(int numFrames) => APIs.EmuClient.FrameSkip(numFrames);
{
//TODO delegate to APIs.EmuClient (impl uses `> 0` instead of `>= 0`)
if (numFrames >= 0)
{
GlobalWin.Config.FrameSkip = numFrames;
MainForm.FrameSkipMessage();
}
else
{
Log("Invalid frame skip value");
}
}
[LuaMethodExample("client.invisibleemulation( true );")] [LuaMethodExample("client.invisibleemulation( true );")]
[LuaMethod("invisibleemulation", "Disables and enables emulator updates")] [LuaMethod("invisibleemulation", "Disables and enables emulator updates")]