Gamepads (minor change) > Fix to last commit, LiveUpdate related

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4547 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2009-11-12 23:22:51 +00:00
parent d47e4827f7
commit 2d064262ce
4 changed files with 10 additions and 16 deletions

View File

@ -694,9 +694,11 @@ void WiimotePadConfigDialog::Update(wxTimerEvent& WXUNUSED(event))
// Don't run this the first time // Don't run this the first time
int OldNumDIDevices; int OldNumDIDevices;
if (WiiMoteEmu::NumDIDevices == -1) OldNumDIDevices = InputCommon::SearchDIDevices(); if (WiiMoteEmu::NumDIDevices == -1)
OldNumDIDevices = InputCommon::SearchDIDevices();
else
// Search for connected devices and update dialog // Search for connected devices and update dialog
OldNumDIDevices = WiiMoteEmu::NumDIDevices; OldNumDIDevices = WiiMoteEmu::NumDIDevices;
WiiMoteEmu::NumDIDevices = InputCommon::SearchDIDevices(); WiiMoteEmu::NumDIDevices = InputCommon::SearchDIDevices();
// Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id // Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id

View File

@ -59,6 +59,7 @@ bool LocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int
bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads) bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
{ {
PanicAlert("LocalSearchDevicesReset");
DEBUG_LOG(CONSOLE, "LocalSearchDevicesReset"); DEBUG_LOG(CONSOLE, "LocalSearchDevicesReset");
// Turn off device polling while resetting // Turn off device polling while resetting
@ -130,17 +131,13 @@ bool IsConnected(std::string Name)
// ---------------- // ----------------
bool IsPolling() bool IsPolling()
{ {
return true;
/*
if (!SDLPolling || SDL_JoystickEventState(SDL_QUERY) == SDL_ENABLE) if (!SDLPolling || SDL_JoystickEventState(SDL_QUERY) == SDL_ENABLE)
return false; return false;
else else
return true; return true;
*/
} }
void EnablePolling(bool Enable) void EnablePolling(bool Enable)
{ {
/*
if (Enable) if (Enable)
{ {
SDLPolling = true; SDLPolling = true;
@ -151,7 +148,6 @@ void EnablePolling(bool Enable)
SDLPolling = false; SDLPolling = false;
SDL_JoystickEventState(SDL_ENABLE); SDL_JoystickEventState(SDL_ENABLE);
} }
*/
} }
// ID to Name // ID to Name

View File

@ -175,9 +175,11 @@ void PADConfigDialognJoy::UpdateSlow()
// Don't run this the first time // Don't run this the first time
int OldNumDIDevices; int OldNumDIDevices;
if (NumDIDevices == -1) OldNumDIDevices = InputCommon::SearchDIDevices(); if (NumDIDevices == -1)
OldNumDIDevices = InputCommon::SearchDIDevices();
else
// Search for connected devices and update dialog // Search for connected devices and update dialog
OldNumDIDevices = NumDIDevices; OldNumDIDevices = NumDIDevices;
NumDIDevices = InputCommon::SearchDIDevices(); NumDIDevices = InputCommon::SearchDIDevices();
// Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id // Update if a pad has been connected/disconnected. Todo: Add a better check that also takes into consideration the pad id

View File

@ -512,22 +512,17 @@ bool IsConnected(std::string Name)
} }
} }
// Earlier versions of SDL could crash if SDL functions were called during SDL_Quit/SDL_Init. I could not get // It could be possible to crash SDL.dll if SDL functions are called during SDL_Quit/SDL_Init. Therefore these functions.
// such a crash in the new version even with frequent SDL_Quit/SDL_Init so thse functions are disabled now.
// ---------------- // ----------------
bool IsPolling() bool IsPolling()
{ {
return true;
/*
if (!SDLPolling || SDL_JoystickEventState(SDL_QUERY) == SDL_ENABLE) if (!SDLPolling || SDL_JoystickEventState(SDL_QUERY) == SDL_ENABLE)
return false; return false;
else else
return true; return true;
*/
} }
void EnablePolling(bool Enable) void EnablePolling(bool Enable)
{ {
/*
if (Enable) if (Enable)
{ {
SDLPolling = true; SDLPolling = true;
@ -538,7 +533,6 @@ void EnablePolling(bool Enable)
SDLPolling = false; SDLPolling = false;
SDL_JoystickEventState(SDL_ENABLE); SDL_JoystickEventState(SDL_ENABLE);
} }
*/
} }
// ID to Name // ID to Name