Wiimote: Switch between emulated and real Wiimote during gameplay.

Notice: It's currently not very user friendly and can crash or fail under some circumstances. I'll make it better momentarily. You currently have to first open the Wiimote config window and the start a game to be able to use switch back and forth after that.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2011 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-25 23:07:15 +00:00
parent c9ca6ef55a
commit 8eeb1d0202
15 changed files with 771 additions and 355 deletions

View File

@ -407,26 +407,24 @@ THREAD_RETURN EmuThread(void *pArg)
if (!_CoreParameter.bUseDualCore)
{
#ifdef _WIN32
cpuThread = new Common::Thread(CpuThread, pArg);
//Common::SetCurrentThreadName("Idle thread");
//TODO(ector) : investigate using GetMessage instead .. although
//then we lose the powerdown check. ... unless powerdown sends a message :P
while (PowerPC::state != PowerPC::CPU_POWERDOWN)
{
if (Callback_PeekMessages) {
Callback_PeekMessages();
}
Common::SleepCurrentThread(20);
}
#else
// In single-core mode, the Emulation main thread is also the CPU thread
CpuThread(pArg);
#endif
#ifdef _WIN32
cpuThread = new Common::Thread(CpuThread, pArg);
//Common::SetCurrentThreadName("Idle thread");
//TODO(ector) : investigate using GetMessage instead .. although
//then we lose the powerdown check. ... unless powerdown sends a message :P
while (PowerPC::state != PowerPC::CPU_POWERDOWN)
{
if (Callback_PeekMessages) Callback_PeekMessages();
Common::SleepCurrentThread(20);
}
#else
// In single-core mode, the Emulation main thread is also the CPU thread
CpuThread(pArg);
#endif
}
else
{
Plugins.GetVideo()->Video_Prepare(); //wglMakeCurrent
Plugins.GetVideo()->Video_Prepare(); // wglMakeCurrent
cpuThread = new Common::Thread(CpuThread, pArg);
Common::SetCurrentThreadName("Video thread");
Plugins.GetVideo()->Video_EnterLoop();