Now you can switch between Emulated and Real WiiMotes, connect more Real Wiimotes and even pair them up (if you have MS BT Stack) during gameplay!

All you gotta do is Pause the emulation! That's useful for when your batteries run out during gameplay, for example...

But if you change the WiiMote source (between Emulated, Real or Inactive) you must disconnect and reconnect (Menu Tools -> Connect WiiMote) the WiiMotes affected by the change...

Thanks to jack.fr0st who did all the emulation state notification work!

Now every plugin has a way to know the current emulation state (paused, stopped or playing)

@ayuanx: I thought about doing a PostMessage(g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, current_number); so that the user gets asked to reconnect that WiiMote, trying to avoid having to disconnect and reconnect, but it didn't work because shooting that message only asks to reconnect, doesn't do a disconnect... Do you have any ideas on how to accomplish that?

Also, if anyone could check if Issue 1916 is finally fixed... Or at least when is the cursor being hidden or not...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4789 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fgfemperor
2010-01-06 19:26:52 +00:00
parent 623a09b5a5
commit 64167bcb60
18 changed files with 117 additions and 37 deletions

View File

@ -315,7 +315,7 @@ int Initialize()
g_RealWiiMotePresent = false;
g_RealWiiMoteAllocated = false;
if(g_Config.bConnectRealWiimote)
if (g_Config.bConnectRealWiimote)
{
// Call Wiiuse.dll
g_WiiMotesFromWiiUse = wiiuse_init(MAX_WIIMOTES);
@ -356,7 +356,7 @@ int Initialize()
#endif
// If we are connecting from the config window without a game running we set the LEDs
if (!g_EmulatorRunning && g_RealWiiMotePresent)
if (g_EmulatorState != PLUGIN_EMUSTATE_PLAY && g_RealWiiMotePresent)
FlashLights(true);
// Create a new thread and start listening for Wiimote data
@ -389,7 +389,7 @@ int Initialize()
// Allocate each Real WiiMote found to a WiiMote slot with Source set to "WiiMote Real"
void Allocate()
{
if(!g_RealWiiMoteInitialized)
if (!g_RealWiiMoteInitialized)
Initialize();
// Clear the wiimote classes
@ -419,9 +419,8 @@ void Allocate()
}
}
// If we found a valid slot for this WiiMote...
if(current_number < MAX_WIIMOTES)
if (current_number < MAX_WIIMOTES)
{
g_WiiMotes[current_number] = new CWiiMote(current_number, g_WiiMotesFromWiiUse[i]);
g_WiimoteInUse[current_number] = true;
switch (current_number)
@ -490,7 +489,7 @@ void Shutdown(void)
}
// Flash flights
if (!g_EmulatorRunning && g_RealWiiMotePresent)
if (g_EmulatorState != PLUGIN_EMUSTATE_PLAY && g_RealWiiMotePresent)
FlashLights(false);
// Clean up wiiuse