fix a bad bug in savefile handling introduced a few revisions ago due to changes in initialization/reset code flow, always a desmume weakness and area of confusion.... but maybe not for long
This commit is contained in:
parent
44ff6e97b4
commit
a570e7a054
|
@ -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();
|
||||
|
|
|
@ -2397,7 +2397,6 @@ void NDS_Reset()
|
|||
}
|
||||
|
||||
MMU_Reset();
|
||||
MMU_new.backupDevice.reset();
|
||||
|
||||
//ARM7 BIOS IRQ HANDLER
|
||||
if(CommonSettings.UseExtBIOS == true)
|
||||
|
|
|
@ -263,6 +263,8 @@ bool BackupDevice::load_state(EMUFILE* is)
|
|||
|
||||
BackupDevice::BackupDevice()
|
||||
{
|
||||
isMovieMode = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
//due to unfortunate shortcomings in the emulator architecture,
|
||||
|
|
|
@ -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<u8> data;
|
||||
std::vector<u8> data_autodetect;
|
||||
enum STATE {
|
||||
|
|
Loading…
Reference in New Issue