From 778befe28682dd971651506549fabaf3138fe02a Mon Sep 17 00:00:00 2001 From: Sara Kelley Date: Sat, 1 May 2021 03:47:59 +0000 Subject: [PATCH] Compatibility changes for latest version of bizhawk (2.6.1) Reload save state after script is reloaded when switching games Clear graphics on reload so overlay does not linger --- SoloShuffler.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SoloShuffler.lua b/SoloShuffler.lua index 83d49d1..412c719 100644 --- a/SoloShuffler.lua +++ b/SoloShuffler.lua @@ -184,7 +184,6 @@ function nextGame(game) -- Changes to the next game and saves the current settin userdata.set("first",1) savestate.saveslot(1) client.openrom(gamePath .. currentGame) - savestate.loadslot(1) console.log(currentGame .. " loaded!") userdata.set("currentGame",currentGame) userdata.set("timeLimit",timeLimit) @@ -255,6 +254,12 @@ if databaseSize == 1 then timeLimit = 6000 end +if readOldTime ~= 0 then + savestate.loadslot(1) +end + +gui.clearGraphics() + while true do -- The main cycle that causes the emulator to advance and trigger a game switch. if (diff >= timeLimit - 180) then startCountdown(count)