Forced the video thread to the third core when "Lock threads to cores" is enabled. This should fix the slowdown that this option produced on CPU's with HyperThreading. Thanks to NaturalViolence for the tip.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6579 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2010-12-14 09:20:02 +00:00
parent e4ed7dab22
commit 7c0e08b0e7
1 changed files with 6 additions and 1 deletions

View File

@ -314,7 +314,12 @@ THREAD_RETURN EmuThread(void *pArg)
CPluginManager &Plugins = CPluginManager::GetInstance(); CPluginManager &Plugins = CPluginManager::GetInstance();
if (_CoreParameter.bLockThreads) if (_CoreParameter.bLockThreads)
Common::Thread::SetCurrentThreadAffinity(2); // Force to second core {
if (cpu_info.num_cores > 3)
Common::Thread::SetCurrentThreadAffinity(3); // Force to third, non-HT core
else
Common::Thread::SetCurrentThreadAffinity(2); // Force to second core
}
INFO_LOG(OSREPORT, "Starting core = %s mode", _CoreParameter.bWii ? "Wii" : "Gamecube"); INFO_LOG(OSREPORT, "Starting core = %s mode", _CoreParameter.bWii ? "Wii" : "Gamecube");
INFO_LOG(OSREPORT, "CPU Thread separate = %s", _CoreParameter.bCPUThread ? "Yes" : "No"); INFO_LOG(OSREPORT, "CPU Thread separate = %s", _CoreParameter.bCPUThread ? "Yes" : "No");