From f8d5a9136324ceb736da556f4c2f08b9a83f1350 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 27 Jan 2019 21:32:22 -0500 Subject: [PATCH] lua: make emu.speedmode nothrottle and maximum set to 100% frameskip, as originally intended (fixes #34) --- src/drivers/win/main.cpp | 3 +++ src/lua-engine.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 1190e2a7..1ba2fdf9 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -901,6 +901,9 @@ doloopy: } else skippy = 0; + if(FCEU_LuaFrameskip()) + skippy = true; + FCEUI_Emulate(&gfx, &sound, &ssize, skippy); //emulate a single frame FCEUD_Update(gfx, sound, ssize); //update displays and debug tools diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp index 6748dca9..6002780d 100644 --- a/src/lua-engine.cpp +++ b/src/lua-engine.cpp @@ -327,7 +327,7 @@ int FCEU_LuaSpeed() { * Asks Lua if it wants control whether this frame is skipped. * Returns 0 if no, 1 if frame should be skipped, -1 if it should not be. */ -int FCEU_LuaFrameSkip() { +int FCEU_LuaFrameskip() { if (!L || !luaRunning) return 0;