mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
DualSense adaptive trigger support (#1561)
This commit is contained in:
@@ -38,6 +38,37 @@ struct GamepadState {
|
||||
unsigned char lt, rt;
|
||||
};
|
||||
|
||||
|
||||
struct DualSenseOutputReport{
|
||||
uint8_t validFlag0;
|
||||
uint8_t validFlag1;
|
||||
|
||||
/* For DualShock 4 compatibility mode. */
|
||||
uint8_t motorRight;
|
||||
uint8_t motorLeft;
|
||||
|
||||
/* Audio controls */
|
||||
uint8_t reserved[4];
|
||||
uint8_t muteButtonLed;
|
||||
|
||||
uint8_t powerSaveControl;
|
||||
uint8_t rightTriggerEffectType;
|
||||
uint8_t rightTriggerEffect[DS_EFFECT_PAYLOAD_SIZE];
|
||||
uint8_t leftTriggerEffectType;
|
||||
uint8_t leftTriggerEffect[DS_EFFECT_PAYLOAD_SIZE];
|
||||
uint8_t reserved2[6];
|
||||
|
||||
/* LEDs and lightbar */
|
||||
uint8_t validFlag2;
|
||||
uint8_t reserved3[2];
|
||||
uint8_t lightbarSetup;
|
||||
uint8_t ledBrightness;
|
||||
uint8_t playerLeds;
|
||||
uint8_t lightbarRed;
|
||||
uint8_t lightbarGreen;
|
||||
uint8_t lightbarBlue;
|
||||
};
|
||||
|
||||
// activeGamepadMask is a short, so we're bounded by the number of mask bits
|
||||
#define MAX_GAMEPADS 16
|
||||
|
||||
@@ -95,6 +126,8 @@ public:
|
||||
|
||||
void setControllerLED(uint16_t controllerNumber, uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
void setAdaptiveTriggers(uint16_t controllerNumber, DualSenseOutputReport *report);
|
||||
|
||||
void handleTouchFingerEvent(SDL_TouchFingerEvent* event);
|
||||
|
||||
int getAttachedGamepadMask();
|
||||
|
||||
Reference in New Issue
Block a user