mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 07:42:25 +02:00
Implement keybind migrator
This commit is contained in:
parent
d12aa635af
commit
7db4f55ec8
@ -564,6 +564,15 @@ export class InputsController {
|
|||||||
if (!this.configs[selectedDevice]) {
|
if (!this.configs[selectedDevice]) {
|
||||||
this.configs[selectedDevice] = {};
|
this.configs[selectedDevice] = {};
|
||||||
}
|
}
|
||||||
|
// A proper way of handling migrating keybinds would be much better
|
||||||
|
const mappingOverrides = {
|
||||||
|
"BUTTON_CYCLE_VARIANT": "BUTTON_CYCLE_TERA",
|
||||||
|
};
|
||||||
|
for (const key in mappingConfigs.custom) {
|
||||||
|
if (mappingConfigs.custom[key] in mappingOverrides) {
|
||||||
|
mappingConfigs.custom[key] = mappingOverrides[mappingConfigs.custom[key]];
|
||||||
|
}
|
||||||
|
}
|
||||||
this.configs[selectedDevice].custom = mappingConfigs.custom;
|
this.configs[selectedDevice].custom = mappingConfigs.custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user