From b7b46290199237e2c04c63b7a93d61e3ae362263 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 7 Apr 2010 21:45:06 +0000 Subject: [PATCH] Lua - ip out all the code related to pausing/unpausing of the emulator when running/stopping lua scripts. Let the user be in control of that. --- changelog.txt | 1 + src/lua-engine.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 99885733..615944f2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +07-april-2010 - adelikat - Lua console no longer unpauses the emulator when a script is loaded 30-march-2010 - ugetab - Win32 - Closing minimized windows no longer moves them the next time they get opened 28-march-2010 - adelikat - lua - fixed zapper.read() to read movie data if a movie is playing. Also changed the struct values to x,y,fire. This breaks lua scripts that used it previous, sorry. 04-march-2010 - prockguy - added menu buttons for loading nsf files diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp index 6b1aebce..70a5d789 100644 --- a/src/lua-engine.cpp +++ b/src/lua-engine.cpp @@ -211,8 +211,8 @@ static void FCEU_LuaOnStop() { luajoypads2[i]= 0x00; } gui_used = GUI_CLEAR; - if (wasPaused && !FCEUI_EmulationPaused()) - FCEUI_ToggleEmulationPause(); + //if (wasPaused && !FCEUI_EmulationPaused()) + // FCEUI_ToggleEmulationPause(); FCEUD_SetEmulationSpeed(EMUSPEED_NORMAL); //TODO: Ideally lua returns the speed to the speed the user set before running the script //rather than returning it to normal, and turbo off. Perhaps some flags and a FCEUD_GetEmulationSpeed function FCEUD_TurboOff(); //Turn off turbo @@ -4647,8 +4647,8 @@ int FCEU_LoadLuaCode(const char *filename, const char *arg) { numMemHooks = 0; transparencyModifier = 255; // opaque - wasPaused = FCEUI_EmulationPaused(); - if (wasPaused) FCEUI_ToggleEmulationPause(); + //wasPaused = FCEUI_EmulationPaused(); + //if (wasPaused) FCEUI_ToggleEmulationPause(); // And run it right now. :) //FCEU_LuaFrameBoundary();