mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-18 01:15:26 +00:00
Working Dualshock output reports on macOS; fix runaway loop
This commit is contained in:
@@ -19,6 +19,7 @@ struct DualshockLED
|
||||
|
||||
struct DualshockRumble
|
||||
{
|
||||
uint8_t padding;
|
||||
uint8_t rightDuration;
|
||||
bool rightOn;
|
||||
uint8_t leftDuration;
|
||||
@@ -38,7 +39,7 @@ union DualshockOutReport
|
||||
DualshockLED led[4];
|
||||
DualshockLED reserved;
|
||||
};
|
||||
uint8_t buf[36];
|
||||
uint8_t buf[49];
|
||||
};
|
||||
|
||||
enum class EDualshockPadButtons
|
||||
@@ -130,7 +131,6 @@ class DualshockPad final : public DeviceBase
|
||||
uint8_t m_rumbleIntensity[2];
|
||||
EDualshockLED m_led;
|
||||
DualshockOutReport m_report;
|
||||
uint8_t m_btAddress[6];
|
||||
void deviceDisconnected();
|
||||
void initialCycle();
|
||||
void transferCycle();
|
||||
@@ -157,9 +157,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void stopRumble(EDualshockMotor motor)
|
||||
void stopRumble(int motor)
|
||||
{
|
||||
m_rumbleRequest &= ~motor;
|
||||
m_rumbleRequest &= ~EDualshockMotor(motor);
|
||||
}
|
||||
|
||||
EDualshockLED getLED()
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
void setRawLED(int led)
|
||||
{
|
||||
m_report.leds = led;
|
||||
sendHIDReport(m_report.buf, sizeof(m_report), HIDReportType::Output, 0x0201);
|
||||
sendHIDReport(m_report.buf, sizeof(m_report), HIDReportType::Output, 0x01);
|
||||
}
|
||||
|
||||
size_t getInputBufferSize() const { return 49; }
|
||||
|
||||
Reference in New Issue
Block a user