diff --git a/Runtime/Input/CDolphinController.cpp b/Runtime/Input/CDolphinController.cpp index cfba128e0..c7397d5c4 100644 --- a/Runtime/Input/CDolphinController.cpp +++ b/Runtime/Input/CDolphinController.cpp @@ -51,10 +51,10 @@ void CDolphinController::ReadDevices() { } } - if (x1b4_[i] == 0) { + if (x1b4_controllerTypePollTime[i] == 0) { const auto type = SIProbe(i); if ((type & (SI::ERROR_NO_RESPONSE | SI::ERROR_UNKNOWN | SI::ERROR_BUSY)) == 0) { - x1b4_[i] = 0x3c; + x1b4_controllerTypePollTime[i] = 0x3c; if (type == SI::GC_WIRELESS) { x1a4_controllerTypes[i] = skTypeWavebird; } else if (type == SI::GBA) { /* here for completeness, the GameCube adapter does not support GBA */ @@ -66,7 +66,7 @@ void CDolphinController::ReadDevices() { x1a4_controllerTypes[i] = skTypeUnknown; } } else { - --x1b4_[i]; + --x1b4_controllerTypePollTime[i]; } } @@ -163,19 +163,19 @@ bool CDolphinController::Initialize() { memset(x4_status.data(), 0, sizeof(PADStatus) * x4_status.size()); x34_gamepadStates[0].SetDeviceIsPresent(false); x194_motorStates[0] = EMotorState::StopHard; - x1b4_[0] = 0; + x1b4_controllerTypePollTime[0] = 0; x1a4_controllerTypes[0] = skTypeUnknown; x34_gamepadStates[1].SetDeviceIsPresent(false); x194_motorStates[1] = EMotorState::StopHard; - x1b4_[1] = 0; + x1b4_controllerTypePollTime[1] = 0; x1a4_controllerTypes[0] = skTypeUnknown; x34_gamepadStates[2].SetDeviceIsPresent(false); x194_motorStates[2] = EMotorState::StopHard; - x1b4_[2] = 0; + x1b4_controllerTypePollTime[2] = 0; x1a4_controllerTypes[0] = skTypeUnknown; x34_gamepadStates[3].SetDeviceIsPresent(false); x194_motorStates[3] = EMotorState::StopHard; - x1b4_[3] = 0; + x1b4_controllerTypePollTime[3] = 0; x1a4_controllerTypes[0] = skTypeUnknown; PADControlAllMotors(reinterpret_cast(x194_motorStates.data())); Poll(); diff --git a/Runtime/Input/CDolphinController.hpp b/Runtime/Input/CDolphinController.hpp index 61b387341..5a6882bb5 100644 --- a/Runtime/Input/CDolphinController.hpp +++ b/Runtime/Input/CDolphinController.hpp @@ -15,7 +15,7 @@ class CDolphinController : public IController { std::array x34_gamepadStates{}; std::array x194_motorStates{}; std::array x1a4_controllerTypes{}; - std::array x1b4_{}; + std::array x1b4_controllerTypePollTime{}; u32 x1c4_ = 0xf0000000; u32 x1c8_invalidControllers = 0; u32 x1cc_ = 0;