You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Remove the vibration effect from the joystick when stopping
This commit is contained in:
@@ -439,11 +439,9 @@ void joystick_linux::joystick_vibration_stop(int p_id, uint64_t p_timestamp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct input_event stop;
|
if (ioctl(joy.fd, EVIOCRMFF, joy.ff_effect_id) < 0) {
|
||||||
stop.type = EV_FF;
|
return;
|
||||||
stop.code = joy.ff_effect_id;
|
}
|
||||||
stop.value = 0;
|
|
||||||
write(joy.fd, (const void*)&stop, sizeof(stop));
|
|
||||||
|
|
||||||
joy.ff_effect_id = -1;
|
joy.ff_effect_id = -1;
|
||||||
joy.ff_effect_timestamp = p_timestamp;
|
joy.ff_effect_timestamp = p_timestamp;
|
||||||
|
|||||||
Reference in New Issue
Block a user