Fixed return value setting state on combined Joy-Con controllers
Some checks are pending
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions

This commit is contained in:
Sam Lantinga 2024-10-31 20:36:42 -07:00
parent 77a0411dde
commit 8b48b70c6e

View file

@ -115,7 +115,7 @@ static bool HIDAPI_DriverCombined_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_
for (i = 0; i < device->num_children; ++i) {
SDL_HIDAPI_Device *child = device->children[i];
if (child->driver->RumbleJoystick(child, joystick, low_frequency_rumble, high_frequency_rumble) == 0) {
if (child->driver->RumbleJoystick(child, joystick, low_frequency_rumble, high_frequency_rumble)) {
result = true;
}
}
@ -129,7 +129,7 @@ static bool HIDAPI_DriverCombined_RumbleJoystickTriggers(SDL_HIDAPI_Device *devi
for (i = 0; i < device->num_children; ++i) {
SDL_HIDAPI_Device *child = device->children[i];
if (child->driver->RumbleJoystickTriggers(child, joystick, left_rumble, right_rumble) == 0) {
if (child->driver->RumbleJoystickTriggers(child, joystick, left_rumble, right_rumble)) {
result = true;
}
}
@ -155,7 +155,7 @@ static bool HIDAPI_DriverCombined_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_
for (i = 0; i < device->num_children; ++i) {
SDL_HIDAPI_Device *child = device->children[i];
if (child->driver->SetJoystickLED(child, joystick, red, green, blue) == 0) {
if (child->driver->SetJoystickLED(child, joystick, red, green, blue)) {
result = true;
}
}
@ -174,7 +174,7 @@ static bool HIDAPI_DriverCombined_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *d
for (i = 0; i < device->num_children; ++i) {
SDL_HIDAPI_Device *child = device->children[i];
if (child->driver->SetJoystickSensorsEnabled(child, joystick, enabled) == 0) {
if (child->driver->SetJoystickSensorsEnabled(child, joystick, enabled)) {
result = true;
}
}