mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-27 16:24:02 +00:00
Change LiSendMultiControllerEvent number/mask arguments to unsigned
The modulo operator will not work as expected with negative numbers.
This commit is contained in:
1 parent
f0df33caf8
commit
a1aa0a1801
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -1072,7 +1072,7 @@ int LiSendUtf8TextEvent(const char *text, unsigned int length) {
|
||||
return err;
|
||||
}
|
||||
|
||||
static int sendControllerEventInternal(short controllerNumber, short activeGamepadMask,
|
||||
static int sendControllerEventInternal(uint8_t controllerNumber, uint16_t activeGamepadMask,
|
||||
int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
|
||||
short leftStickX, short leftStickY, short rightStickX, short rightStickY)
|
||||
{
|
||||
@@ -1262,7 +1262,7 @@ int LiSendControllerEvent(int buttonFlags, unsigned char leftTrigger, unsigned c
|
||||
}
|
||||
|
||||
// Send a controller event to the streaming machine
|
||||
int LiSendMultiControllerEvent(short controllerNumber, short activeGamepadMask,
|
||||
int LiSendMultiControllerEvent(uint8_t controllerNumber, uint16_t activeGamepadMask,
|
||||
int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
|
||||
short leftStickX, short leftStickY, short rightStickX, short rightStickY)
|
||||
{
|
||||
|
||||
+1
-1
@@ -762,7 +762,7 @@ int LiSendControllerEvent(int buttonFlags, unsigned char leftTrigger, unsigned c
|
||||
//
|
||||
// To indicate removal of a gamepad, send an empty event with the controller number set to the
|
||||
// removed controller and the bit of the removed controller cleared in the active gamepad mask.
|
||||
int LiSendMultiControllerEvent(short controllerNumber, short activeGamepadMask,
|
||||
int LiSendMultiControllerEvent(uint8_t controllerNumber, uint16_t activeGamepadMask,
|
||||
int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
|
||||
short leftStickX, short leftStickY, short rightStickX, short rightStickY);
|
||||
|
||||
|
||||
Reference in new issue
Block a user