From 6302091c54e5618ff723a213dcd67d028bc5ce02 Mon Sep 17 00:00:00 2001 From: Jonas Bark Date: Sun, 7 Dec 2025 10:41:21 +0100 Subject: [PATCH] improve handling of analog gamepad events --- README.md | 2 +- lib/bluetooth/devices/gamepad/gamepad_device.dart | 2 +- lib/pages/touch_area.dart | 2 +- lib/widgets/ui/button_widget.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c2b1b01..5122075 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Best follow our landing page and the "Get Started" button: [bikecontrol.app](htt - CYCPLUS BC2 Virtual Shifter - Elite Sterzo Smart (for steering support) - Elite Square Smart Frame (beta) -- Gamepads (beta) +- Gamepads - Cheap Bluetooth buttons such as [these](https://www.amazon.com/s?k=bluetooth+remote) (beta) - BLE HID devices and classic Bluetooth HID devices are supported - works out of the box on Android diff --git a/lib/bluetooth/devices/gamepad/gamepad_device.dart b/lib/bluetooth/devices/gamepad/gamepad_device.dart index bff388c..b1ef34f 100644 --- a/lib/bluetooth/devices/gamepad/gamepad_device.dart +++ b/lib/bluetooth/devices/gamepad/gamepad_device.dart @@ -10,7 +10,7 @@ import 'package:swift_control/widgets/ui/beta_pill.dart'; class GamepadDevice extends BaseDevice { final String id; - GamepadDevice(super.name, {required this.id}) : super(availableButtons: [], isBeta: true); + GamepadDevice(super.name, {required this.id}) : super(availableButtons: []); List _lastButtonsClicked = []; diff --git a/lib/pages/touch_area.dart b/lib/pages/touch_area.dart index 0e2fd02..cbda67a 100644 --- a/lib/pages/touch_area.dart +++ b/lib/pages/touch_area.dart @@ -458,7 +458,7 @@ class _KeyWidget extends StatelessWidget { style: TextStyle( fontFamily: screenshotMode ? null : 'monospace', fontSize: 12, - color: Theme.of(context).colorScheme.primaryForeground, + color: Colors.white, ), ), ), diff --git a/lib/widgets/ui/button_widget.dart b/lib/widgets/ui/button_widget.dart index 2298f98..3fdafab 100644 --- a/lib/widgets/ui/button_widget.dart +++ b/lib/widgets/ui/button_widget.dart @@ -39,7 +39,7 @@ class ButtonWidget extends StatelessWidget { fontFamily: screenshotMode ? null : 'monospace', fontSize: big && button.color != null ? 20 : 12, fontWeight: button.color != null ? FontWeight.bold : null, - color: button.color != null ? Colors.white : Theme.of(context).colorScheme.foreground, + color: Colors.white, ), ), ),