mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-17 13:49:59 +00:00
Map Misc button to Guide for GFE hosts
This commit is contained in:
@@ -983,10 +983,19 @@ static int sendControllerEventInternal(short controllerNumber, short activeGamep
|
||||
return -2;
|
||||
}
|
||||
|
||||
// GFE only supports a maximum of 4 controllers
|
||||
if (!IS_SUNSHINE()) {
|
||||
// GFE only supports a maximum of 4 controllers
|
||||
controllerNumber %= 4;
|
||||
activeGamepadMask &= 0xF;
|
||||
|
||||
// GFE doesn't support buttons that aren't present on an Xbox 360 controller,
|
||||
// so the extended button flags won't even be sent. For convenience, let's
|
||||
// map the MISC button to the SPECIAL (Guide) button. Some platforms reserve
|
||||
// the Guide button for OS functionality (Game Bar, Home button, etc.), so
|
||||
// this allows otherwise unused buttons to activate that functionality.
|
||||
if (buttonFlags & MISC_FLAG) {
|
||||
buttonFlags |= SPECIAL_FLAG;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Sunshine supports up to 16 (max number of bits in activeGamepadMask)
|
||||
|
||||
Reference in New Issue
Block a user