Change LiSendMultiControllerEvent number/mask arguments to unsigned

The modulo operator will not work as expected with negative numbers.
This commit is contained in:
Cameron Gutman committed 2026-11-12 22:10:28 -06:00
1 parent f0df33caf8
commit a1aa0a1801
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1072,7 +1072,7 @@ int LiSendUtf8TextEvent(const char *text, unsigned int length) {
return err; 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, int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
short leftStickX, short leftStickY, short rightStickX, short rightStickY) 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 // 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, int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
short leftStickX, short leftStickY, short rightStickX, short rightStickY) short leftStickX, short leftStickY, short rightStickX, short rightStickY)
{ {
+1 -1
View File
@@ -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 // 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. // 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, int buttonFlags, unsigned char leftTrigger, unsigned char rightTrigger,
short leftStickX, short leftStickY, short rightStickX, short rightStickY); short leftStickX, short leftStickY, short rightStickX, short rightStickY);