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 14:30:03 +02:00
parent 740a34fa9c
commit 4855733274

View File

@@ -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();
}
});
}