New Wiimote Plugin: buildfix and minor tweak.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6214 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak 2010-09-17 00:27:37 +00:00
parent 19a50b3c51
commit bac3eac629
1 changed files with 6 additions and 2 deletions

View File

@ -30,6 +30,7 @@
// used for pair up
#ifdef _WIN32
#include <bthdef.h>
#include <BluetoothAPIs.h>
#pragma comment(lib, "Bthprops.lib")
#endif
@ -482,9 +483,12 @@ THREAD_RETURN WiimoteThreadFunc(void* arg)
// main loop
while (g_run_wiimote_thread)
{
wiimote->Write();
// hopefully this is alright
while (wiimote->Write()) {}
// sleep if there was nothing to read
if (false == wiimote->Read())
Common::SleepCurrentThread(1); // sleep if there was nothing to read
Common::SleepCurrentThread(1);
}
return 0;