From 0ce99ce869706f043596198c347a6b2f287ff77a Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 4 May 2009 07:29:08 +0000 Subject: [PATCH] integrate 2087 from rerecording_0_9_2 --- desmume/src/NDSSystem.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 69bc98496..179550ecb 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -860,6 +860,13 @@ void MovieSRAM() strcat(buf, "movie"); } + if (MMU.bupmem.fp) + { + fclose(MMU.bupmem.fp); + MMU.bupmem.fp = NULL; + } + + mc_realloc(&MMU.bupmem, bmtype, bmsize); mc_load_file(&MMU.bupmem, buf); } @@ -886,12 +893,6 @@ void NDS_Reset(BOOL resetBySavestate) if (!header) return ; - if (MMU.bupmem.fp) - { - fclose(MMU.bupmem.fp); - MMU.bupmem.fp = NULL; - } - lagframecounter=0; LagFrameFlag=0; lastLag=0;