mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Merge branch 'master' of https://code.google.com/p/dolphin-emu
This commit is contained in:
commit
2c3a714e49
@ -223,7 +223,6 @@ void SConfig::SaveSettings()
|
|||||||
ini.Set("Core", "SelectedLanguage", m_LocalCoreStartupParameter.SelectedLanguage);
|
ini.Set("Core", "SelectedLanguage", m_LocalCoreStartupParameter.SelectedLanguage);
|
||||||
ini.Set("Core", "MemcardA", m_strMemoryCardA);
|
ini.Set("Core", "MemcardA", m_strMemoryCardA);
|
||||||
ini.Set("Core", "MemcardB", m_strMemoryCardB);
|
ini.Set("Core", "MemcardB", m_strMemoryCardB);
|
||||||
ini.Set("Core", "ReloadMemcardOnState", b_reloadMCOnState);
|
|
||||||
ini.Set("Core", "SlotA", m_EXIDevice[0]);
|
ini.Set("Core", "SlotA", m_EXIDevice[0]);
|
||||||
ini.Set("Core", "SlotB", m_EXIDevice[1]);
|
ini.Set("Core", "SlotB", m_EXIDevice[1]);
|
||||||
ini.Set("Core", "SerialPort1", m_EXIDevice[2]);
|
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", "SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
|
||||||
ini.Get("Core", "MemcardA", &m_strMemoryCardA);
|
ini.Get("Core", "MemcardA", &m_strMemoryCardA);
|
||||||
ini.Get("Core", "MemcardB", &m_strMemoryCardB);
|
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", "SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD);
|
||||||
ini.Get("Core", "SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
|
ini.Get("Core", "SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
|
||||||
ini.Get("Core", "SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
ini.Get("Core", "SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
||||||
|
@ -47,10 +47,6 @@ struct SConfig : NonCopyable
|
|||||||
|
|
||||||
std::string m_strMemoryCardA;
|
std::string m_strMemoryCardA;
|
||||||
std::string m_strMemoryCardB;
|
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];
|
TEXIDevices m_EXIDevice[3];
|
||||||
SIDevices m_SIDevice[4];
|
SIDevices m_SIDevice[4];
|
||||||
std::string m_bba_mac;
|
std::string m_bba_mac;
|
||||||
|
@ -284,8 +284,6 @@ void CEXIChannel::DoState(PointerWrap &p)
|
|||||||
p.Do(m_Control);
|
p.Do(m_Control);
|
||||||
p.Do(m_ImmData);
|
p.Do(m_ImmData);
|
||||||
|
|
||||||
bool reloadOnState = SConfig::GetInstance().b_reloadMCOnState;
|
|
||||||
|
|
||||||
for (int d = 0; d < NUM_DEVICES; ++d)
|
for (int d = 0; d < NUM_DEVICES; ++d)
|
||||||
{
|
{
|
||||||
IEXIDevice* pDevice = m_pDevices[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
|
// 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,
|
// instead of the ones they had when the savestate was created,
|
||||||
// unless the device is NONE (since ChangeDevice sets that temporarily).
|
// unless the device is NONE (since ChangeDevice sets that temporarily).
|
||||||
if(p.GetMode() != PointerWrap::MODE_READ ||
|
if(p.GetMode() != PointerWrap::MODE_READ)
|
||||||
(pDevice->m_deviceType != EXIDEVICE_NONE &&
|
|
||||||
reloadOnState && !Movie::IsRecordingInput() && !Movie::IsPlayingInput()))
|
|
||||||
{
|
{
|
||||||
delete pSaveDevice;
|
delete pSaveDevice;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
|
|||||||
m_strFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
|
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
|
// 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);
|
et_this_card = CoreTiming::RegisterEvent((card_index == 0) ? "memcardA" : "memcardB", FlushCallback);
|
||||||
reloadOnState = SConfig::GetInstance().b_reloadMCOnState;
|
|
||||||
|
|
||||||
interruptSwitch = 0;
|
interruptSwitch = 0;
|
||||||
m_bInterruptSet = 0;
|
m_bInterruptSet = 0;
|
||||||
@ -426,14 +425,7 @@ void CEXIMemoryCard::TransferByte(u8 &byte)
|
|||||||
|
|
||||||
void CEXIMemoryCard::OnAfterLoad()
|
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)
|
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.
|
// 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,
|
// 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).
|
// 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);
|
p.Do(storeContents);
|
||||||
|
|
||||||
if (storeContents)
|
if (storeContents)
|
||||||
|
@ -71,7 +71,6 @@ private:
|
|||||||
std::string m_strFilename;
|
std::string m_strFilename;
|
||||||
int card_index;
|
int card_index;
|
||||||
int et_this_card;
|
int et_this_card;
|
||||||
bool reloadOnState;
|
|
||||||
//! memory card state
|
//! memory card state
|
||||||
|
|
||||||
// STATE_TO_SAVE
|
// STATE_TO_SAVE
|
||||||
|
Loading…
Reference in New Issue
Block a user