Change YieldCPU to sleep(0) like on windows. Time trials show this to be the most effective. Also, when using usleep(1) and dsp on thread the emulator is painfully slow. With the old _mm_pause() the emulator hangs on shutdown. With sleep(0) the emulator is faster, and doesn't hang on shutdown.

Also fix a possible undefined operation (according to gcc).


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7275 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-03-02 22:19:56 +00:00
parent 3ffdcf1aec
commit 12cd2d41ec
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ void SetCurrentThreadAffinity(u32 mask);
#ifdef _WIN32
Sleep(0);
#elif defined(_M_IX86) || defined(_M_X64)
usleep(1);
sleep(0);
#endif
}

View File

@ -533,7 +533,7 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
NetPlay_WiimoteUpdate(wiimote_to_update);
Wiimote::Update(wiimote_to_update);
}
wiimote_to_update = ++wiimote_to_update % m_WiiMotes.size();
wiimote_to_update = (wiimote_to_update + 1) % m_WiiMotes.size();
m_last_ticks = now;
}