Skip to content

Commit 8b48b70

Browse files
committed
Fixed return value setting state on combined Joy-Con controllers
1 parent 77a0411 commit 8b48b70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/joystick/hidapi/SDL_hidapi_combined.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static bool HIDAPI_DriverCombined_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_
115115

116116
for (i = 0; i < device->num_children; ++i) {
117117
SDL_HIDAPI_Device *child = device->children[i];
118-
if (child->driver->RumbleJoystick(child, joystick, low_frequency_rumble, high_frequency_rumble) == 0) {
118+
if (child->driver->RumbleJoystick(child, joystick, low_frequency_rumble, high_frequency_rumble)) {
119119
result = true;
120120
}
121121
}
@@ -129,7 +129,7 @@ static bool HIDAPI_DriverCombined_RumbleJoystickTriggers(SDL_HIDAPI_Device *devi
129129

130130
for (i = 0; i < device->num_children; ++i) {
131131
SDL_HIDAPI_Device *child = device->children[i];
132-
if (child->driver->RumbleJoystickTriggers(child, joystick, left_rumble, right_rumble) == 0) {
132+
if (child->driver->RumbleJoystickTriggers(child, joystick, left_rumble, right_rumble)) {
133133
result = true;
134134
}
135135
}
@@ -155,7 +155,7 @@ static bool HIDAPI_DriverCombined_SetJoystickLED(SDL_HIDAPI_Device *device, SDL_
155155

156156
for (i = 0; i < device->num_children; ++i) {
157157
SDL_HIDAPI_Device *child = device->children[i];
158-
if (child->driver->SetJoystickLED(child, joystick, red, green, blue) == 0) {
158+
if (child->driver->SetJoystickLED(child, joystick, red, green, blue)) {
159159
result = true;
160160
}
161161
}
@@ -174,7 +174,7 @@ static bool HIDAPI_DriverCombined_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *d
174174

175175
for (i = 0; i < device->num_children; ++i) {
176176
SDL_HIDAPI_Device *child = device->children[i];
177-
if (child->driver->SetJoystickSensorsEnabled(child, joystick, enabled) == 0) {
177+
if (child->driver->SetJoystickSensorsEnabled(child, joystick, enabled)) {
178178
result = true;
179179
}
180180
}

0 commit comments

Comments
 (0)