summaryrefslogtreecommitdiff
path: root/platform/x11/joypad_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/joypad_linux.cpp')
-rw-r--r--platform/x11/joypad_linux.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index 3e9e8033e8..21c3b0ac91 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -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;