When beginning recording, check settings in Init() instead of just in BeginRecordingInput(), since it's called after bootmanager.cpp reads the game's config.

This commit is contained in:
rog 2012-10-24 16:35:52 -04:00
parent 7006cd1217
commit 7ee455ce3b
2 changed files with 20 additions and 18 deletions

View File

@ -136,6 +136,10 @@ void Init()
{ {
ReadHeader(); ReadHeader();
} }
if (IsRecordingInput())
{
GetSettings();
}
g_frameSkipCounter = g_framesToSkip; g_frameSkipCounter = g_framesToSkip;
memset(&g_padState, 0, sizeof(g_padState)); memset(&g_padState, 0, sizeof(g_padState));
if (!tmpHeader.bFromSaveState || !IsPlayingInput()) if (!tmpHeader.bFromSaveState || !IsPlayingInput())
@ -378,16 +382,7 @@ bool BeginRecordingInput(int controllers)
g_bRecordingFromSaveState = true; g_bRecordingFromSaveState = true;
} }
g_playMode = MODE_RECORDING; g_playMode = MODE_RECORDING;
GetSettings();
bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
bBlankMC = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
delete [] tmpInput; delete [] tmpInput;
tmpInput = new u8[MAX_DTM_LENGTH]; tmpInput = new u8[MAX_DTM_LENGTH];
@ -635,14 +630,7 @@ void ReadHeader()
else else
{ {
bSaveConfig = false; bSaveConfig = false;
bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle; GetSettings();
bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
bBlankMC = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
} }
@ -1150,4 +1138,17 @@ void SetGraphicsConfig()
g_Config.bUseXFB = tmpHeader.bUseXFB; g_Config.bUseXFB = tmpHeader.bUseXFB;
g_Config.bUseRealXFB = tmpHeader.bUseRealXFB; g_Config.bUseRealXFB = tmpHeader.bUseRealXFB;
} }
void GetSettings()
{
bSkipIdle = SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
bDualCore = SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
bProgressive = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
bDSPHLE = SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE;
bFastDiscSpeed = SConfig::GetInstance().m_LocalCoreStartupParameter.bFastDiscSpeed;
videoBackend = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend;
iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
bBlankMC = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
}
}; };

View File

@ -151,6 +151,7 @@ int GetCPUMode();
bool IsBlankMemcard(); bool IsBlankMemcard();
bool IsUsingMemcard(); bool IsUsingMemcard();
void SetGraphicsConfig(); void SetGraphicsConfig();
void GetSettings();
bool IsUsingPad(int controller); bool IsUsingPad(int controller);
bool IsUsingWiimote(int wiimote); bool IsUsingWiimote(int wiimote);