Re-apply Ally controller status on every wake up / reboot https://github.com/seerge/g-helper/issues/3192

This commit is contained in:
Serge
2024-09-30 12:13:22 +02:00
parent 77d89505b3
commit cdeb4951dc

View File

@@ -618,7 +618,8 @@ namespace GHelper.Ally
public static void ApplyXBoxStatus() public static void ApplyXBoxStatus()
{ {
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, AppConfig.Is("controller_disabled") ? (byte)0x02 : (byte)0x01 }, "Status"); if (AppConfig.Get("controller_disabled") < 0) return;
AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, AppConfig.Is("controller_disabled") ? (byte)0x02 : (byte)0x01], "Status");
} }
public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto, bool init = false) public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto, bool init = false)
@@ -649,6 +650,7 @@ namespace GHelper.Ally
{ {
WakeUp(); WakeUp();
InputDispatcher.SetBacklightAuto(true); InputDispatcher.SetBacklightAuto(true);
ApplyXBoxStatus();
} }
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode }, "Controller"); AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode }, "Controller");