@@ -759,16 +759,6 @@ bool EmuInstance::loadState(const std::string& filename)
759759 backupState = std::move (backup); // This will clean up any existing backup
760760 assert (backup == nullptr );
761761
762- if (globalCfg.GetBool (" Savestate.RelocSRAM" ) && ndsSave)
763- {
764- previousSaveFile = ndsSave->GetPath ();
765-
766- std::string savefile = filename.substr (lastSep (filename)+1 );
767- savefile = getAssetPath (false , localCfg.GetString (" SaveFilePath" ), " .sav" , savefile);
768- savefile += instanceFileSuffix ();
769- ndsSave->SetPath (savefile, true );
770- }
771-
772762 savestateLoaded = true ;
773763
774764 return true ;
@@ -812,14 +802,6 @@ bool EmuInstance::saveState(const std::string& filename)
812802
813803 Platform::CloseFile (file);
814804
815- if (globalCfg.GetBool (" Savestate.RelocSRAM" ) && ndsSave)
816- {
817- std::string savefile = filename.substr (lastSep (filename)+1 );
818- savefile = getAssetPath (false , localCfg.GetString (" SaveFilePath" ), " .sav" , savefile);
819- savefile += instanceFileSuffix ();
820- ndsSave->SetPath (savefile, false );
821- }
822-
823805 return true ;
824806}
825807
@@ -829,15 +811,11 @@ void EmuInstance::undoStateLoad()
829811
830812 // Rewind the backup state and put it in load mode
831813 backupState->Rewind (false );
814+
832815 // pray that this works
833816 // what do we do if it doesn't???
834817 // but it should work.
835818 nds->DoSavestate (backupState.get ());
836-
837- if (ndsSave && (!previousSaveFile.empty ()))
838- {
839- ndsSave->SetPath (previousSaveFile, true );
840- }
841819}
842820
843821
0 commit comments