mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
XBox controller toggle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,6 +412,11 @@ public static class AppConfig
|
||||
return ContainsModel("X13");
|
||||
}
|
||||
|
||||
public static bool IsG14AMD()
|
||||
{
|
||||
return ContainsModel("GA402R");
|
||||
}
|
||||
|
||||
public static bool DynamicBoost5()
|
||||
{
|
||||
return ContainsModel("GZ301ZE");
|
||||
|
||||
@@ -133,7 +133,7 @@ public class AsusACPI
|
||||
public const int MinTotal = 5;
|
||||
|
||||
public static int MaxTotal = 150;
|
||||
public static int DefaultTotal = 125;
|
||||
public static int DefaultTotal = 80;
|
||||
|
||||
public const int MinCPU = 5;
|
||||
public const int MaxCPU = 100;
|
||||
@@ -251,6 +251,11 @@ public class AsusACPI
|
||||
MaxTotal = 250;
|
||||
}
|
||||
|
||||
if (AppConfig.IsG14AMD())
|
||||
{
|
||||
DefaultTotal = 125;
|
||||
}
|
||||
|
||||
if (AppConfig.IsX13())
|
||||
{
|
||||
MaxTotal = 75;
|
||||
|
||||
@@ -314,11 +314,6 @@ namespace GHelper
|
||||
}
|
||||
}
|
||||
|
||||
public void VisualiseXBox(bool status)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void VisualiseBacklight(int backlight)
|
||||
{
|
||||
buttonBacklight.Text = Math.Round((double)backlight*33.33).ToString() + "%";
|
||||
|
||||
Reference in New Issue
Block a user