Skip to content

Commit

Permalink
Fixed return value setting state on combined Joy-Con controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 1, 2024
1 parent 77a0411 commit 8b48b70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/joystick/hidapi/SDL_hidapi_combined.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand All @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 8b48b70

Please sign in to comment.