Skip to content

Commit ab96697

Browse files
committed
[O] AdxHidInput.DisableButtons
1 parent 4f6048c commit ab96697

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

AquaMai.Config/Migration/ConfigMigration_V2_3_V2_4.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ public ConfigView Migrate(ConfigView src)
4343
dst.Remove("GameSystem.MaimollerIO.P2");
4444
}
4545

46+
if (src.TryGetValue<bool>("GameSystem.AdxHidInput.Io4Compact", out var adxDisableButtons))
47+
{
48+
dst.SetValue("GameSystem.AdxHidInput.DisableButtons", adxDisableButtons);
49+
dst.Remove("GameSystem.AdxHidInput.Io4Compact");
50+
}
51+
4652
return dst;
4753
}
4854
}

AquaMai.Mods/GameSystem/AdxHidInput.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static void OnBeforeEnableCheck()
117117
if (adxController[i] == null) continue;
118118
TdInit(i);
119119
if (adxController[i].Attributes.ProductId is 0x5767 or 0x5768) continue;
120-
if (io4Compact) continue;
120+
if (disableButtons) continue;
121121
keyEnabled = true;
122122
var p = i;
123123
Thread hidThread = new Thread(() => HidInputThread(p));
@@ -168,8 +168,8 @@ private static bool IsButtonPushed(int playerNo, int buttonIndex1To8)
168168
[ConfigEntry(name: "按钮 4(最下方的圆形按键)")]
169169
private static readonly IOKeyMap button4 = IOKeyMap.Test;
170170

171-
[ConfigEntry("IO4 兼容模式", zh: "如果你不知道这是什么,请勿开启", hideWhenDefault: true)]
172-
private static readonly bool io4Compact = false;
171+
[ConfigEntry("禁用外键输入")]
172+
private static readonly bool disableButtons = false;
173173

174174
private static AuxiliaryState GetAuxiliaryState()
175175
{

0 commit comments

Comments
 (0)