This commit is contained in:
calc84maniac 2012-01-03 00:44:41 -05:00
commit 2c3a714e49
5 changed files with 3 additions and 22 deletions

View File

@ -223,7 +223,6 @@ void SConfig::SaveSettings()
ini.Set("Core", "SelectedLanguage", m_LocalCoreStartupParameter.SelectedLanguage);
ini.Set("Core", "MemcardA", m_strMemoryCardA);
ini.Set("Core", "MemcardB", m_strMemoryCardB);
ini.Set("Core", "ReloadMemcardOnState", b_reloadMCOnState);
ini.Set("Core", "SlotA", m_EXIDevice[0]);
ini.Set("Core", "SlotB", m_EXIDevice[1]);
ini.Set("Core", "SerialPort1", m_EXIDevice[2]);
@ -354,7 +353,6 @@ void SConfig::LoadSettings()
ini.Get("Core", "SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
ini.Get("Core", "MemcardA", &m_strMemoryCardA);
ini.Get("Core", "MemcardB", &m_strMemoryCardB);
ini.Get("Core", "ReloadMemcardOnState", &b_reloadMCOnState, true);
ini.Get("Core", "SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD);
ini.Get("Core", "SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
ini.Get("Core", "SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);

View File

@ -47,10 +47,6 @@ struct SConfig : NonCopyable
std::string m_strMemoryCardA;
std::string m_strMemoryCardB;
// eject and reload the memory card on state
// in ZTP and other games if the save file has been deleted from the memory card
//this is necessary to save after loading a savestate
bool b_reloadMCOnState;
TEXIDevices m_EXIDevice[3];
SIDevices m_SIDevice[4];
std::string m_bba_mac;

View File

@ -284,8 +284,6 @@ void CEXIChannel::DoState(PointerWrap &p)
p.Do(m_Control);
p.Do(m_ImmData);
bool reloadOnState = SConfig::GetInstance().b_reloadMCOnState;
for (int d = 0; d < NUM_DEVICES; ++d)
{
IEXIDevice* pDevice = m_pDevices[d];
@ -299,9 +297,7 @@ void CEXIChannel::DoState(PointerWrap &p)
// also, if no movie is active, we'll assume the user wants to keep their current devices
// instead of the ones they had when the savestate was created,
// unless the device is NONE (since ChangeDevice sets that temporarily).
if(p.GetMode() != PointerWrap::MODE_READ ||
(pDevice->m_deviceType != EXIDEVICE_NONE &&
reloadOnState && !Movie::IsRecordingInput() && !Movie::IsPlayingInput()))
if(p.GetMode() != PointerWrap::MODE_READ)
{
delete pSaveDevice;
}

View File

@ -52,7 +52,6 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
m_strFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
// we're potentially leaking events here, since there's no UnregisterEvent until emu shutdown, but I guess it's inconsequential
et_this_card = CoreTiming::RegisterEvent((card_index == 0) ? "memcardA" : "memcardB", FlushCallback);
reloadOnState = SConfig::GetInstance().b_reloadMCOnState;
interruptSwitch = 0;
m_bInterruptSet = 0;
@ -426,14 +425,7 @@ void CEXIMemoryCard::TransferByte(u8 &byte)
void CEXIMemoryCard::OnAfterLoad()
{
// hack for memory card switching, so you can load an old savestate and expect your newer memcard data to show up.
// it breaks movie sync, so we disable it if a movie is active.
// this was moved out of DoState because other things that got loaded later conflicted with it.
// note: the reloadOnState flag is almost always true. maybe only a few TASers have it off.
if (reloadOnState && !Movie::IsRecordingInput() && !Movie::IsPlayingInput())
{
ExpansionInterface::ChangeDevice(card_index, EXIDEVICE_MEMORYCARD, 0);
}
}
void CEXIMemoryCard::DoState(PointerWrap &p)
@ -441,7 +433,7 @@ void CEXIMemoryCard::DoState(PointerWrap &p)
// for movie sync, we need to save/load memory card contents (and other data) in savestates.
// otherwise, we'll assume the user wants to keep their memcards and saves separate,
// unless we're loading (in which case we let the savestate contents decide, in order to stay aligned with them).
bool storeContents = (!reloadOnState || Movie::IsRecordingInput() || Movie::IsPlayingInput());
bool storeContents = (Movie::IsRecordingInput() || Movie::IsPlayingInput());
p.Do(storeContents);
if (storeContents)

View File

@ -71,7 +71,6 @@ private:
std::string m_strFilename;
int card_index;
int et_this_card;
bool reloadOnState;
//! memory card state
// STATE_TO_SAVE