From 34cf5487e8d7242e321f9e0a160fc9dab2cf4cc5 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" <alienjack@foxmail.com> Date: Mon, 31 Mar 2025 18:35:38 +0800 Subject: [PATCH] fix bug --- .../AppSettings/KeyMapperSetting/KeyMapperSetting.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs index 4d63326b..81a80857 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs @@ -107,11 +107,11 @@ namespace AxibugEmuOnline.Client.Settings internal void RaiseDeviceRegist(InputDevice_D device, ControllerBinder binding) { - if (device is Keyboard_D keyboard && this is IDeviceBinder<T, Keyboard_D> keyboardIn) keyboardIn.Bind(keyboard, binding); - if (device is GamePad_D gamePad && this is IDeviceBinder<T, GamePad_D> gamepadIn) gamepadIn.Bind(gamePad, binding); - if (device is DualShockController_D dsC && this is IDeviceBinder<T, DualShockController_D> dsIn) dsIn.Bind(dsC, binding); - if (device is XboxController_D xbC && this is IDeviceBinder<T, XboxController_D> xbIn) xbIn.Bind(xbC, binding); - if (device is PSVController_D psvC && this is IDeviceBinder<T, PSVController_D> psvIn) psvIn.Bind(psvC, binding); + if (device is Keyboard_D keyboard) Bind(keyboard, binding); + else if (device is GamePad_D gamePad) Bind(gamePad, binding); + else if (device is DualShockController_D dsC) Bind(dsC, binding); + else if (device is XboxController_D xbC) Bind(xbC, binding); + else if (device is PSVController_D psvC) Bind(psvC, binding); else throw new NotImplementedException($"{device.GetType()}"); }