[gnome-games] retro-gamepad: Fix rumble duration
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro-gamepad: Fix rumble duration
- Date: Sat, 20 Mar 2021 21:08:02 +0000 (UTC)
commit 78698a1772ac60cf816065c7c32c48090c2605fc
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Mar 21 02:07:20 2021 +0500
retro-gamepad: Fix rumble duration
uint16.MAX was wrong, we can't pass more than int16.MAX here.
See https://gitlab.gnome.org/GNOME/libmanette/-/commit/0e847702f08dd0c4491a9ff0444a17a22de8af53
src/retro/retro-gamepad.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/retro/retro-gamepad.vala b/src/retro/retro-gamepad.vala
index 131bf7ab..32ce1368 100644
--- a/src/retro/retro-gamepad.vala
+++ b/src/retro/retro-gamepad.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.RetroGamepad : Object, Retro.Controller {
+ private const uint16 RUMBLE_DURATION_MS = int16.MAX;
+
public Manette.Device device { get; construct; }
private bool[] buttons;
@@ -57,7 +59,7 @@ private class Games.RetroGamepad : Object, Retro.Controller {
device.rumble (rumble_effect[Retro.RumbleEffect.STRONG],
rumble_effect[Retro.RumbleEffect.WEAK],
- uint16.MAX);
+ RUMBLE_DURATION_MS);
}
private bool get_button_pressed (Retro.JoypadId button) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]