Linux: Check return values of posix read/write
Fixes #29849, for real this time.
This commit is contained in:
parent
d2f38dbb28
commit
ce1c840635
2 changed files with 11 additions and 7 deletions
|
|
@ -414,7 +414,9 @@ void JoypadLinux::joypad_vibration_start(int p_id, float p_weak_magnitude, float
|
|||
play.type = EV_FF;
|
||||
play.code = effect.id;
|
||||
play.value = 1;
|
||||
write(joy.fd, (const void *)&play, sizeof(play));
|
||||
if (write(joy.fd, (const void *)&play, sizeof(play)) == -1) {
|
||||
print_verbose("Couldn't write to Joypad device.");
|
||||
}
|
||||
|
||||
joy.ff_effect_id = effect.id;
|
||||
joy.ff_effect_timestamp = p_timestamp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue