From 48557332740a9b921512fb12248c9341e92fe29b Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:30:03 +0200 Subject: [PATCH] Re-apply Ally controller status on every wake up / reboot https://github.com/seerge/g-helper/issues/3192 --- app/Ally/AllyControl.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Ally/AllyControl.cs b/app/Ally/AllyControl.cs index d9bc2abb..e40b6dc4 100644 --- a/app/Ally/AllyControl.cs +++ b/app/Ally/AllyControl.cs @@ -618,7 +618,6 @@ namespace GHelper.Ally public static void ApplyXBoxStatus() { - if (AppConfig.Get("controller_disabled") < 0) return; AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, AppConfig.Is("controller_disabled") ? (byte)0x02 : (byte)0x01], "Status"); } @@ -650,10 +649,9 @@ namespace GHelper.Ally { WakeUp(); InputDispatcher.SetBacklightAuto(true); - ApplyXBoxStatus(); } - AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode }, "Controller"); + AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode], "Controller"); //AsusHid.WriteInput(CommandSave, null); BindZone(BindingZone.M1M2); @@ -670,6 +668,11 @@ namespace GHelper.Ally SetDeadzones(); + if (init && AppConfig.Is("controller_disabled")) + { + ApplyXBoxStatus(); + } + }); }