mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
Fixed return value setting state on combined Joy-Con controllers
This commit is contained in:
parent
77a0411dde
commit
8b48b70c6e
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue