From 9e8e46f1c03ffb0021579b6795b1cbac9a239a1e Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 4 May 2009 06:28:24 +0000 Subject: [PATCH] fix bug which made it impossible to loadstate while in moviemode --- src/NDSSystem.cpp | 4 +++- src/saves.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NDSSystem.cpp b/src/NDSSystem.cpp index 0e43eee93..ae261ef0e 100644 --- a/src/NDSSystem.cpp +++ b/src/NDSSystem.cpp @@ -874,6 +874,7 @@ void NDS_FreeROM(void) MMU.bupmem.fp = NULL; } +bool _HACK_DONT_STOPMOVIE = false; void NDS_Reset( void) { unsigned int i; @@ -882,7 +883,8 @@ void NDS_Reset( void) FILE* inf = 0; NDS_header * header = NDS_getROMHeader(); - FCEUI_StopMovie(); + if(!_HACK_DONT_STOPMOVIE) + FCEUI_StopMovie(); if (!header) return ; diff --git a/src/saves.cpp b/src/saves.cpp index 084993354..e346c2cbc 100644 --- a/src/saves.cpp +++ b/src/saves.cpp @@ -862,7 +862,10 @@ static bool savestate_load(std::istream* is) //while the series of resets below should work, //we are testing the robustness of the savestate system with this full reset. //the full reset wipes more things, so we can make sure that they are being restored correctly + extern bool _HACK_DONT_STOPMOVIE; + _HACK_DONT_STOPMOVIE = true; NDS_Reset(); + _HACK_DONT_STOPMOVIE = false; //reset some options to their old defaults which werent saved nds.debugConsole = FALSE;