mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Gamepad (minor) > Disabled LiveUpdates, it's not stable in the current form
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4552 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -57,29 +57,24 @@ bool LocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
|
||||
bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
||||
{
|
||||
DEBUG_LOG(CONSOLE, "LocalSearchDevicesReset");
|
||||
|
||||
// Turn off device polling while resetting
|
||||
EnablePolling(false);
|
||||
bool bSuccess = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
||||
bool bSuccess = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
||||
DoLocalSearchDevices(_joyinfo, _NumPads);
|
||||
EnablePolling(true);
|
||||
|
||||
DoLocalSearchDevices(_joyinfo, _NumPads);
|
||||
|
||||
return bSuccess;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Fill joyinfo with the current connected devices
|
||||
bool DoLocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
||||
{
|
||||
//DEBUG_LOG(WIIMOTE, "LocalSearchDevices");
|
||||
|
||||
// Turn off device polling while searching
|
||||
WiiMoteEmu::EnablePolling(false);
|
||||
|
||||
bool bReturn = InputCommon::SearchDevices(_joyinfo, _NumPads);
|
||||
|
||||
// Warn the user if no gamepads are detected
|
||||
if (_NumPads == 0 && g_EmulatorRunning)
|
||||
@ -108,9 +103,7 @@ bool DoLocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, i
|
||||
if (!Match) PadState[i].joy = NULL;
|
||||
}
|
||||
|
||||
WiiMoteEmu::EnablePolling(true);
|
||||
|
||||
return bReturn;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Is the device connected?
|
||||
@ -147,6 +140,7 @@ void EnablePolling(bool Enable)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ID to Name
|
||||
// ----------------
|
||||
std::string IDToName(int ID)
|
||||
@ -219,10 +213,10 @@ void GetJoyState(InputCommon::CONTROLLER_STATE_NEW &_PadState, InputCommon::CONT
|
||||
//DEBUG_LOG(WIIMOTE, "GetJoyState: Polling:%i NumPads:%i", SDLPolling, NumPads);
|
||||
|
||||
// Return if polling is off
|
||||
if (!IsPolling) return;
|
||||
if (!IsPolling()) return;
|
||||
// Update joyinfo handles. This is in case the Wiimote plugin has restarted SDL after a pad was conencted/disconnected
|
||||
// so that the handles are updated. We don't need to run this this often. Once a second would be enough.
|
||||
LocalSearchDevices(joyinfo, NumPads);
|
||||
if (LiveUpdates) LocalSearchDevices(joyinfo, NumPads);
|
||||
// Return if we have no pads
|
||||
if (NumPads == 0) return;
|
||||
// Read info
|
||||
|
Reference in New Issue
Block a user