mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Init
This commit is contained in:
@@ -377,6 +377,11 @@ public static class AppConfig
|
|||||||
return ContainsModel("Vivobook") || ContainsModel("Zenbook");
|
return ContainsModel("Vivobook") || ContainsModel("Zenbook");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsVivoZenPro()
|
||||||
|
{
|
||||||
|
return ContainsModel("Vivobook") || ContainsModel("Zenbook") || ContainsModel("ProArt");
|
||||||
|
}
|
||||||
|
|
||||||
// Devices with bugged bios command to change brightness
|
// Devices with bugged bios command to change brightness
|
||||||
public static bool SwappedBrightness()
|
public static bool SwappedBrightness()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ public class AsusACPI
|
|||||||
private bool? _allAMD = null;
|
private bool? _allAMD = null;
|
||||||
private bool? _overdrive = null;
|
private bool? _overdrive = null;
|
||||||
|
|
||||||
public static uint GPUEco => (AppConfig.IsVivoZenbook() || AppConfig.IsProArt()) ? GPUEcoVivo : GPUEcoROG;
|
public static uint GPUEco => AppConfig.IsVivoZenPro() ? GPUEcoVivo : GPUEcoROG;
|
||||||
public static uint GPUMux => AppConfig.IsVivoZenbook() ? GPUMuxVivo : GPUMuxROG;
|
public static uint GPUMux => AppConfig.IsVivoZenbook() ? GPUMuxVivo : GPUMuxROG;
|
||||||
|
|
||||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
InitBacklightTimer();
|
InitBacklightTimer();
|
||||||
|
|
||||||
if (AppConfig.IsVivoZenbook())
|
if (AppConfig.IsVivoZenPro())
|
||||||
Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
|
Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
// FN-Lock group
|
// FN-Lock group
|
||||||
|
|
||||||
if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenbook())
|
if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenPro())
|
||||||
for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i);
|
for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i);
|
||||||
|
|
||||||
// Arrow-lock group
|
// Arrow-lock group
|
||||||
@@ -597,7 +597,7 @@ namespace GHelper.Input
|
|||||||
bool fnLock = !AppConfig.Is("fn_lock");
|
bool fnLock = !AppConfig.Is("fn_lock");
|
||||||
AppConfig.Set("fn_lock", fnLock ? 1 : 0);
|
AppConfig.Set("fn_lock", fnLock ? 1 : 0);
|
||||||
|
|
||||||
if (AppConfig.IsVivoZenbook())
|
if (AppConfig.IsVivoZenPro())
|
||||||
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
|
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
|
||||||
else
|
else
|
||||||
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace GHelper.USB
|
|||||||
public static Color Color1 = Color.White;
|
public static Color Color1 = Color.White;
|
||||||
public static Color Color2 = Color.Black;
|
public static Color Color2 = Color.Black;
|
||||||
|
|
||||||
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenbook() || AppConfig.IsProArt();
|
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenPro();
|
||||||
static bool isStrix = AppConfig.IsAdvancedRGB() && !AppConfig.IsNoDirectRGB();
|
static bool isStrix = AppConfig.IsAdvancedRGB() && !AppConfig.IsNoDirectRGB();
|
||||||
|
|
||||||
static bool isStrix4Zone = AppConfig.Is4ZoneRGB();
|
static bool isStrix4Zone = AppConfig.Is4ZoneRGB();
|
||||||
|
|||||||
Reference in New Issue
Block a user