merge with branch fix lost focus on disabled gamepad

pull/685/head
Greenlamp 2024-05-09 20:26:00 +02:00
parent 5c9af9bb3c
commit 59832c6bef
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ export const settingGamepadDefaults: SettingDefaults = {
export function setSettingGamepad(scene: BattleScene, setting: SettingGamepad, value: integer): boolean { export function setSettingGamepad(scene: BattleScene, setting: SettingGamepad, value: integer): boolean {
switch (setting) { switch (setting) {
case SettingGamepad.Gamepad_Support: case SettingGamepad.Gamepad_Support:
// if we change the value of the gamepad support, we call a method in the inputController to
// activate or deactivate the controller listener
scene.inputController.setGamepadSupport(settingGamepadOptions[setting][value] !== 'Disabled'); scene.inputController.setGamepadSupport(settingGamepadOptions[setting][value] !== 'Disabled');
break; break;
case SettingGamepad.Swap_A_and_B: case SettingGamepad.Swap_A_and_B: