mirror of https://github.com/AxioDL/metaforce.git
CDolphinController: rename known field
This commit is contained in:
parent
be79334465
commit
22c9b55300
|
@ -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<const u32*>(x194_motorStates.data()));
|
||||
Poll();
|
||||
|
|
|
@ -15,7 +15,7 @@ class CDolphinController : public IController {
|
|||
std::array<CControllerGamepadData, 4> x34_gamepadStates{};
|
||||
std::array<EMotorState, 4> x194_motorStates{};
|
||||
std::array<u32, 4> x1a4_controllerTypes{};
|
||||
std::array<u32, 4> x1b4_{};
|
||||
std::array<u32, 4> x1b4_controllerTypePollTime{};
|
||||
u32 x1c4_ = 0xf0000000;
|
||||
u32 x1c8_invalidControllers = 0;
|
||||
u32 x1cc_ = 0;
|
||||
|
|
Loading…
Reference in New Issue