mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-05-18 23:50:16 +00:00
Add support for controllers with dual touchpads
This commit is contained in:
@@ -460,7 +460,9 @@ void SdlInputHandler::handleControllerTouchpadEvent(SDL_ControllerTouchpadEvent*
|
||||
return;
|
||||
}
|
||||
|
||||
LiSendControllerTouchEvent((uint8_t)state->index, eventType, event->finger, event->x, event->y, event->pressure);
|
||||
LiSendControllerTouchEvent2((uint8_t)state->index, eventType,
|
||||
(uint8_t)event->touchpad, event->finger,
|
||||
event->x, event->y, event->pressure);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -662,6 +664,9 @@ void SdlInputHandler::handleControllerDeviceEvent(SDL_ControllerDeviceEvent* eve
|
||||
}
|
||||
if (SDL_GameControllerGetNumTouchpads(state->controller) > 0) {
|
||||
capabilities |= LI_CCAP_TOUCHPAD;
|
||||
if (SDL_GameControllerGetNumTouchpads(state->controller) > 1) {
|
||||
capabilities |= LI_CCAP_DUAL_TOUCHPAD;
|
||||
}
|
||||
}
|
||||
if (SDL_GameControllerHasSensor(state->controller, SDL_SENSOR_ACCEL)) {
|
||||
capabilities |= LI_CCAP_ACCEL;
|
||||
|
||||
Submodule moonlight-common-c/moonlight-common-c updated: 7b026e77be...2600beaf13
Reference in New Issue
Block a user