XBox controller toggle

This commit is contained in:
Serge
2024-01-27 11:50:13 +01:00
parent 2987d750e3
commit 8884b0d844
4 changed files with 11 additions and 15 deletions

View File

@@ -603,14 +603,5 @@ namespace GHelper.Ally
} }
} }
public void ToggleXBox()
{
bool status = !AppConfig.IsNotFalse("controller_xbox");
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, status ? (byte)0x01 : (byte)0x02 }, "XBox");
AppConfig.Set("controller_xbox", status ? 1 : 0);
settings.VisualiseXBox(status);
}
} }
} }

View File

@@ -412,6 +412,11 @@ public static class AppConfig
return ContainsModel("X13"); return ContainsModel("X13");
} }
public static bool IsG14AMD()
{
return ContainsModel("GA402R");
}
public static bool DynamicBoost5() public static bool DynamicBoost5()
{ {
return ContainsModel("GZ301ZE"); return ContainsModel("GZ301ZE");

View File

@@ -133,7 +133,7 @@ public class AsusACPI
public const int MinTotal = 5; public const int MinTotal = 5;
public static int MaxTotal = 150; public static int MaxTotal = 150;
public static int DefaultTotal = 125; public static int DefaultTotal = 80;
public const int MinCPU = 5; public const int MinCPU = 5;
public const int MaxCPU = 100; public const int MaxCPU = 100;
@@ -251,6 +251,11 @@ public class AsusACPI
MaxTotal = 250; MaxTotal = 250;
} }
if (AppConfig.IsG14AMD())
{
DefaultTotal = 125;
}
if (AppConfig.IsX13()) if (AppConfig.IsX13())
{ {
MaxTotal = 75; MaxTotal = 75;

View File

@@ -314,11 +314,6 @@ namespace GHelper
} }
} }
public void VisualiseXBox(bool status)
{
}
public void VisualiseBacklight(int backlight) public void VisualiseBacklight(int backlight)
{ {
buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%"; buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%";