Some Wiimote Cleanup, re/moved some globals to where they belong.

A few things could be solved differently/in a better way, but that would involve some classes and stuff (plus work)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5097 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2010-02-21 18:53:11 +00:00
parent b6a3df2fcf
commit f7f11211a1
11 changed files with 56 additions and 826 deletions

View File

@ -65,10 +65,8 @@ WiimoteBasicConfigDialog::WiimoteBasicConfigDialog(wxWindow *parent, wxWindowID
ControlsCreated = false;
m_Page = 0;
m_bEnableUseRealWiimote = true;
// Initialize the Real WiiMotes here, so we get a count of how many were found and set everything properly
if (!g_RealWiiMoteInitialized)
WiiMoteReal::Initialize();
WiiMoteReal::Initialize();
CreateGUIControls();
UpdateGUI();
@ -293,19 +291,17 @@ void WiimoteBasicConfigDialog::UpdateOnce(wxTimerEvent& event)
{
case IDTM_UPDATE_ONCE:
// Reenable the checkbox
m_bEnableUseRealWiimote = true;
SetCursor(wxCursor(wxCURSOR_ARROW));
UpdateGUI();
break;
}
}
#if HAVE_WIIUSE
void WiimoteBasicConfigDialog::DoRefreshReal()
{
if (g_RealWiiMoteInitialized)
WiiMoteReal::Shutdown();
if (!g_RealWiiMoteInitialized)
WiiMoteReal::Initialize();
WiiMoteReal::Shutdown();
WiiMoteReal::Initialize();
}
void WiimoteBasicConfigDialog::DoUseReal()
@ -332,7 +328,6 @@ void WiimoteBasicConfigDialog::DoUseReal()
{
// Disable the checkbox for a moment
SetCursor(wxCursor(wxCURSOR_WAIT));
m_bEnableUseRealWiimote = false;
// We may not need this if there is already a message queue that allows the nessesary timeout
//sleep(100);
@ -342,6 +337,7 @@ void WiimoteBasicConfigDialog::DoUseReal()
m_TimeoutOnce->Start(1000, true);
}
}
#endif
// Generate connect/disconnect status event
void WiimoteBasicConfigDialog::DoExtensionConnectedDisconnected(int Extension)