Compare commits

...

1 Commits

Author SHA1 Message Date
Jonas Bark
edda16dc06 adjust reinstating saved keymaps 2025-03-30 19:30:34 +02:00
3 changed files with 12 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
### 1.1.0 (2025-03-30)
### 1.1.3 (2025-03-30)
- Windows: fix custom keyboard profile recreation after restart, also warn when choosing MyWhoosh profile (may fix #7)
- Zwift Ride: button map adjustments to prevent double shifting
- potential fix for #6

View File

@@ -36,14 +36,18 @@ class Keymap {
];
}
static Keymap decode(List<String> data) {
static Keymap? decode(List<String> data) {
// decode from preferences
if (data.length < 4) {
return custom;
return null;
}
final name = data[0];
final keymap = values.firstWhere((element) => element.name == name, orElse: () => custom);
final keymap = values.firstOrNullWhere((element) => element.name == name);
if (keymap == null) {
return null;
}
if (keymap.name != custom.name) {
return keymap;
@@ -58,8 +62,10 @@ class Keymap {
physicalKey: PhysicalKeyboardKey(int.parse(data[4])),
logicalKey: LogicalKeyboardKey(int.parse(data[3])),
);
return keymap;
} else {
return null;
}
return keymap;
}
}

View File

@@ -1,7 +1,7 @@
name: swift_control
description: "SwiftControl - Control your virtual riding"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.1.2+0
version: 1.1.3+0
environment:
sdk: ^3.7.0