Skip to content

Commit

Permalink
Merge branch 'gameinistuff'
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelBryk committed Jan 17, 2013
2 parents 592395b + 2fd1c9e commit 69c91a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 9 additions & 2 deletions Source/Core/Core/Src/BootManager.cpp
Expand Up @@ -55,8 +55,8 @@ namespace BootManager
struct ConfigCache
{
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker;
int iTLBHack;
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker, bHLE_BS2;
int iTLBHack, iCPUCore;
std::string strBackend;
};
static ConfigCache config_cache;
Expand Down Expand Up @@ -89,6 +89,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.valid = true;
config_cache.bCPUThread = StartUp.bCPUThread;
config_cache.bSkipIdle = StartUp.bSkipIdle;
config_cache.iCPUCore = StartUp.iCPUCore;
config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT;
Expand All @@ -99,6 +100,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.bDSPHLE = StartUp.bDSPHLE;
config_cache.bDisableWiimoteSpeaker = StartUp.bDisableWiimoteSpeaker;
config_cache.strBackend = StartUp.m_strVideoBackend;
config_cache.bHLE_BS2 = StartUp.bHLE_BS2;

// General settings
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
Expand All @@ -113,6 +115,8 @@ bool BootCore(const std::string& _rFilename)
game_ini.Get("Core", "DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
game_ini.Get("Wii", "DisableWiimoteSpeaker",&StartUp.bDisableWiimoteSpeaker, StartUp.bDisableWiimoteSpeaker);
game_ini.Get("Core", "GFXBackend", &StartUp.m_strVideoBackend, StartUp.m_strVideoBackend.c_str());
game_ini.Get("Core", "CPUCore", &StartUp.iCPUCore, StartUp.iCPUCore);
game_ini.Get("Core", "HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2);
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);

if (Movie::IsPlayingInput() && Movie::IsConfigSaved())
Expand All @@ -122,6 +126,7 @@ bool BootCore(const std::string& _rFilename)
StartUp.bDSPHLE = Movie::IsDSPHLE();
StartUp.bProgressive = Movie::IsProgressive();
StartUp.bFastDiscSpeed = Movie::IsFastDiscSpeed();
StartUp.iCPUCore = Movie::GetCPUMode();
if (Movie::IsUsingMemcard() && Movie::IsStartingFromClearSave() && !StartUp.bWii)
{
if (File::Exists("Movie.raw"))
Expand Down Expand Up @@ -159,6 +164,7 @@ void Stop()
config_cache.valid = false;
StartUp.bCPUThread = config_cache.bCPUThread;
StartUp.bSkipIdle = config_cache.bSkipIdle;
StartUp.iCPUCore = config_cache.iCPUCore;
StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT;
Expand All @@ -170,6 +176,7 @@ void Stop()
StartUp.bDisableWiimoteSpeaker = config_cache.bDisableWiimoteSpeaker;
StartUp.m_strVideoBackend = config_cache.strBackend;
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
StartUp.bHLE_BS2 = config_cache.bHLE_BS2;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/Core.cpp
Expand Up @@ -428,7 +428,7 @@ void EmuThread()
CBoot::BootUp();

// Setup our core, but can't use dynarec if we are compare server
if (Movie::GetCPUMode() && (!_CoreParameter.bRunCompareServer ||
if (_CoreParameter.iCPUCore && (!_CoreParameter.bRunCompareServer ||
_CoreParameter.bRunCompareClient))
PowerPC::SetMode(PowerPC::MODE_JIT);
else
Expand Down
4 changes: 0 additions & 4 deletions Source/Core/Core/Src/HW/CPU.cpp
Expand Up @@ -37,10 +37,6 @@ namespace

void CCPU::Init(int cpu_core)
{
if (Movie::IsPlayingInput() && Movie::IsConfigSaved())
{
cpu_core = Movie::GetCPUMode();
}
PowerPC::Init(cpu_core);
m_SyncEvent = 0;
}
Expand Down

0 comments on commit 69c91a2

Please sign in to comment.