diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index f3ce67408..e8b96067e 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -971,7 +971,11 @@ void MMU_Reset() MMU.dscard[ARMCPU_ARM7].transfer_count = 0; MMU.dscard[ARMCPU_ARM7].mode = CardMode_Normal; + //HACK!!! + //until we improve all our session tracking stuff, we need to save the backup memory filename + std::string bleh = MMU_new.backupDevice.filename; new(&MMU_new) MMU_struct_new; + MMU_new.backupDevice.filename = bleh; MMU_timing.arm7codeFetch.Reset(); MMU_timing.arm7dataFetch.Reset(); diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index f30c4826a..b3c7a1c9f 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -2397,7 +2397,6 @@ void NDS_Reset() } MMU_Reset(); - MMU_new.backupDevice.reset(); //ARM7 BIOS IRQ HANDLER if(CommonSettings.UseExtBIOS == true) diff --git a/desmume/src/mc.cpp b/desmume/src/mc.cpp index d3aa92169..d82fb680d 100644 --- a/desmume/src/mc.cpp +++ b/desmume/src/mc.cpp @@ -263,6 +263,8 @@ bool BackupDevice::load_state(EMUFILE* is) BackupDevice::BackupDevice() { + isMovieMode = false; + reset(); } //due to unfortunate shortcomings in the emulator architecture, diff --git a/desmume/src/mc.h b/desmume/src/mc.h index 1675ee4e2..01a2b754e 100644 --- a/desmume/src/mc.h +++ b/desmume/src/mc.h @@ -112,6 +112,9 @@ public: //way too much if we flush whenever we read. void lazy_flush(); +public: //SHOULD BE PRIVATE!!!!!!!! + std::string filename; + private: bool write_enable; //is write enabled? u32 com; //persistent command actually handled @@ -119,7 +122,6 @@ private: u32 addr; bool isMovieMode; - std::string filename; std::vector data; std::vector data_autodetect; enum STATE {