mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Implement extended controller button support
This commit is contained in:
@@ -254,7 +254,7 @@ namespace input {
|
||||
<< "--begin controller packet--"sv << std::endl
|
||||
<< "controllerNumber ["sv << packet->controllerNumber << ']' << std::endl
|
||||
<< "activeGamepadMask ["sv << util::hex(packet->activeGamepadMask).to_string_view() << ']' << std::endl
|
||||
<< "buttonFlags ["sv << util::hex(packet->buttonFlags).to_string_view() << ']' << std::endl
|
||||
<< "buttonFlags ["sv << util::hex((uint32_t) packet->buttonFlags | (packet->buttonFlags2 << 16)).to_string_view() << ']' << std::endl
|
||||
<< "leftTrigger ["sv << util::hex(packet->leftTrigger).to_string_view() << ']' << std::endl
|
||||
<< "rightTrigger ["sv << util::hex(packet->rightTrigger).to_string_view() << ']' << std::endl
|
||||
<< "leftStickX ["sv << packet->leftStickX << ']' << std::endl
|
||||
@@ -691,8 +691,9 @@ namespace input {
|
||||
}
|
||||
|
||||
std::uint16_t bf = packet->buttonFlags;
|
||||
std::uint32_t bf2 = packet->buttonFlags2;
|
||||
platf::gamepad_state_t gamepad_state {
|
||||
bf,
|
||||
bf | (bf2 << 16),
|
||||
packet->leftTrigger,
|
||||
packet->rightTrigger,
|
||||
packet->leftStickX,
|
||||
|
||||
Reference in New Issue
Block a user