mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02e700c03c | ||
|
|
35977d007e | ||
|
|
3b9f8de0ab | ||
|
|
1e3a16ae45 | ||
|
|
a520c438da | ||
|
|
6b45795888 |
@@ -365,9 +365,9 @@ public static class AppConfig
|
|||||||
return ContainsModel("ProArt");
|
return ContainsModel("ProArt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsVivoZenbook()
|
public static bool IsVivobook()
|
||||||
{
|
{
|
||||||
return ContainsModel("Vivobook") || ContainsModel("Zenbook");
|
return ContainsModel("Vivobook");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Devices with bugged bios command to change brightness
|
// Devices with bugged bios command to change brightness
|
||||||
@@ -514,7 +514,7 @@ public static class AppConfig
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var (bios, model) = GetBiosAndModel();
|
var (bios, model) = GetBiosAndModel();
|
||||||
return (Int32.Parse(bios) == 317 || Int32.Parse(bios) == 316);
|
return (Int32.Parse(bios) == 317);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@@ -522,19 +522,9 @@ public static class AppConfig
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsResetRequired()
|
|
||||||
{
|
|
||||||
return ContainsModel("GA403");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsFanRequired()
|
public static bool IsFanRequired()
|
||||||
{
|
{
|
||||||
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R") || ContainsModel("G713P") || ContainsModel("GU605") || ContainsModel("GA403");
|
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R") || ContainsModel("G713P");
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsAMDLight()
|
|
||||||
{
|
|
||||||
return ContainsModel("GA402X") || ContainsModel("GU605") || ContainsModel("GA403") || ContainsModel("FA507N") || ContainsModel("FA507X") || ContainsModel("FA707N") || ContainsModel("FA707X");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsPowerRequired()
|
public static bool IsPowerRequired()
|
||||||
|
|||||||
@@ -294,11 +294,6 @@ public class AsusACPI
|
|||||||
MaxGPUPower = 70;
|
MaxGPUPower = 70;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.IsSlash())
|
|
||||||
{
|
|
||||||
MaxGPUPower = 25;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppConfig.DynamicBoost5())
|
if (AppConfig.DynamicBoost5())
|
||||||
{
|
{
|
||||||
MaxGPUBoost = 5;
|
MaxGPUBoost = 5;
|
||||||
@@ -308,14 +303,6 @@ public class AsusACPI
|
|||||||
{
|
{
|
||||||
MaxGPUBoost = 15;
|
MaxGPUBoost = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.IsAMDLight())
|
|
||||||
{
|
|
||||||
MaxTotal = 90;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer)
|
public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer)
|
||||||
@@ -429,16 +416,9 @@ public class AsusACPI
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int SetVivoMode(int mode)
|
|
||||||
{
|
|
||||||
if (mode == 1) mode = 2;
|
|
||||||
else if (mode == 2) mode = 1;
|
|
||||||
return Program.acpi.DeviceSet(VivoBookMode, mode, "VivoMode");
|
|
||||||
}
|
|
||||||
|
|
||||||
public int SetGPUEco(int eco)
|
public int SetGPUEco(int eco)
|
||||||
{
|
{
|
||||||
int ecoFlag = DeviceGet(GPUEco);
|
int ecoFlag = DeviceGet(GPUEco);
|
||||||
@@ -569,7 +549,7 @@ public class AsusACPI
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|||||||
@@ -24,17 +24,29 @@ namespace GHelper.Display
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBrightness(int brightness = -1)
|
public void SaveGamma()
|
||||||
{
|
{
|
||||||
if (!AppConfig.IsOLED()) return;
|
var screenName = ScreenNative.FindLaptopScreen();
|
||||||
|
if (screenName is null) return;
|
||||||
|
|
||||||
if (brightness >= 0) AppConfig.Set("brightness", brightness);
|
try
|
||||||
else brightness = AppConfig.Get("brightness");
|
{
|
||||||
|
var handle = ScreenNative.CreateDC(screenName, screenName, null, IntPtr.Zero);
|
||||||
if (brightness >= 0) SetGamma(brightness);
|
var gammaRamp = new GammaRamp();
|
||||||
|
if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaRamp))
|
||||||
|
{
|
||||||
|
var gamma = new DisplayGammaRamp(gammaRamp);
|
||||||
|
Logger.WriteLine("Gamma R: " + string.Join("-", gamma.Red));
|
||||||
|
Logger.WriteLine("Gamma G: " + string.Join("-", gamma.Green));
|
||||||
|
Logger.WriteLine("Gamma B: " + string.Join("-", gamma.Blue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SetGamma(int brightness = 100)
|
public void SetGamma(int brightness = 100)
|
||||||
{
|
{
|
||||||
var bright = Math.Round((float)brightness / 200 + 0.5, 2);
|
var bright = Math.Round((float)brightness / 200 + 0.5, 2);
|
||||||
@@ -51,15 +63,15 @@ namespace GHelper.Display
|
|||||||
if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaDump))
|
if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaDump))
|
||||||
{
|
{
|
||||||
gammaRamp = new DisplayGammaRamp(gammaDump);
|
gammaRamp = new DisplayGammaRamp(gammaDump);
|
||||||
//Logger.WriteLine("Gamma R: " + string.Join("-", gammaRamp.Red));
|
Logger.WriteLine("Gamma R: " + string.Join("-", gammaRamp.Red));
|
||||||
//Logger.WriteLine("Gamma G: " + string.Join("-", gammaRamp.Green));
|
Logger.WriteLine("Gamma G: " + string.Join("-", gammaRamp.Green));
|
||||||
//Logger.WriteLine("Gamma B: " + string.Join("-", gammaRamp.Blue));
|
Logger.WriteLine("Gamma B: " + string.Join("-", gammaRamp.Blue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gammaRamp is null || !gammaRamp.IsOriginal())
|
if (gammaRamp is null || !gammaRamp.IsOriginal())
|
||||||
{
|
{
|
||||||
Logger.WriteLine("Not default Gamma");
|
Logger.WriteLine("Default Gamma");
|
||||||
gammaRamp = new DisplayGammaRamp();
|
gammaRamp = new DisplayGammaRamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace GHelper.Fan
|
|||||||
|
|
||||||
public const int XGM_FAN_MAX = 72;
|
public const int XGM_FAN_MAX = 72;
|
||||||
|
|
||||||
public const int INADEQUATE_MAX = 104;
|
public const int INADEQUATE_MAX = 92;
|
||||||
|
|
||||||
const int FAN_COUNT = 3;
|
const int FAN_COUNT = 3;
|
||||||
|
|
||||||
|
|||||||
10
app/Fans.cs
10
app/Fans.cs
@@ -762,10 +762,7 @@ namespace GHelper
|
|||||||
|
|
||||||
private void TrackPower_MouseUp(object? sender, MouseEventArgs e)
|
private void TrackPower_MouseUp(object? sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
Task.Run(() =>
|
modeControl.AutoPower();
|
||||||
{
|
|
||||||
modeControl.AutoPower(true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1008,7 +1005,7 @@ namespace GHelper
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (chartCount > 2)
|
if (chartCount > 2)
|
||||||
Size = MinimumSize = new Size(Size.Width, Math.Max(MinimumSize.Height, (int)(ControlHelper.GetDpiScale(this).Value * (chartCount * 200 + 100))));
|
Size = MinimumSize = new Size(Size.Width, (int)(ControlHelper.GetDpiScale(this).Value * (chartCount * 200 + 100)));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -1115,7 +1112,6 @@ namespace GHelper
|
|||||||
if (gpuVisible)
|
if (gpuVisible)
|
||||||
{
|
{
|
||||||
int gpuPowerVar = Program.acpi.DeviceGet(AsusACPI.GPU_POWER);
|
int gpuPowerVar = Program.acpi.DeviceGet(AsusACPI.GPU_POWER);
|
||||||
Logger.WriteLine("Default GPU Power: " + gpuPowerVar);
|
|
||||||
|
|
||||||
trackGPUClockLimit.Value = NvidiaGpuControl.MaxClockLimit;
|
trackGPUClockLimit.Value = NvidiaGpuControl.MaxClockLimit;
|
||||||
trackGPUCore.Value = 0;
|
trackGPUCore.Value = 0;
|
||||||
@@ -1123,7 +1119,7 @@ namespace GHelper
|
|||||||
|
|
||||||
trackGPUBoost.Value = AsusACPI.MaxGPUBoost;
|
trackGPUBoost.Value = AsusACPI.MaxGPUBoost;
|
||||||
trackGPUTemp.Value = AsusACPI.MaxGPUTemp;
|
trackGPUTemp.Value = AsusACPI.MaxGPUTemp;
|
||||||
trackGPUPower.Value = Math.Max(Math.Min((gpuPowerVar >= 0) ? gpuPowerVar : AsusACPI.MaxGPUPower, AsusACPI.MaxGPUPower), AsusACPI.MinGPUPower);
|
trackGPUPower.Value = (gpuPowerVar >= 0) ? gpuPowerVar : AsusACPI.MaxGPUPower;
|
||||||
|
|
||||||
AppConfig.SetMode("gpu_boost", trackGPUBoost.Value);
|
AppConfig.SetMode("gpu_boost", trackGPUBoost.Value);
|
||||||
AppConfig.SetMode("gpu_temp", trackGPUTemp.Value);
|
AppConfig.SetMode("gpu_temp", trackGPUTemp.Value);
|
||||||
|
|||||||
@@ -101,8 +101,6 @@ namespace GHelper.Helpers
|
|||||||
if (Program.settingsForm.Visible)
|
if (Program.settingsForm.Visible)
|
||||||
Program.screenControl.InitScreen();
|
Program.screenControl.InitScreen();
|
||||||
|
|
||||||
Program.screenControl.SetBrightness();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int CheckAndSaveLidAction()
|
private static int CheckAndSaveLidAction()
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
InitBacklightTimer();
|
InitBacklightTimer();
|
||||||
|
|
||||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
if (AppConfig.ContainsModel("VivoBook")) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
// FN-Lock group
|
// FN-Lock group
|
||||||
|
|
||||||
if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenbook())
|
if (AppConfig.Is("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
|
||||||
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
|
||||||
@@ -500,7 +500,7 @@ namespace GHelper.Input
|
|||||||
case "micmute":
|
case "micmute":
|
||||||
bool muteStatus = Audio.ToggleMute();
|
bool muteStatus = Audio.ToggleMute();
|
||||||
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
if (AppConfig.IsVivobook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||||
break;
|
break;
|
||||||
case "brightness_up":
|
case "brightness_up":
|
||||||
SetBrightness(+10);
|
SetBrightness(+10);
|
||||||
@@ -568,7 +568,7 @@ namespace GHelper.Input
|
|||||||
int fnLock = AppConfig.Is("fn_lock") ? 0 : 1;
|
int fnLock = AppConfig.Is("fn_lock") ? 0 : 1;
|
||||||
AppConfig.Set("fn_lock", fnLock);
|
AppConfig.Set("fn_lock", fnLock);
|
||||||
|
|
||||||
if (AppConfig.IsVivoZenbook())
|
if (AppConfig.ContainsModel("VivoBook"))
|
||||||
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 1 : 0, "FnLock");
|
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 1 : 0, "FnLock");
|
||||||
else
|
else
|
||||||
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
||||||
|
|||||||
@@ -62,46 +62,33 @@ namespace GHelper.Mode
|
|||||||
|
|
||||||
if (!Modes.Exists(mode)) mode = 0;
|
if (!Modes.Exists(mode)) mode = 0;
|
||||||
|
|
||||||
|
customFans = false;
|
||||||
|
customPower = 0;
|
||||||
|
|
||||||
settings.ShowMode(mode);
|
settings.ShowMode(mode);
|
||||||
|
SetModeLabel();
|
||||||
|
|
||||||
Modes.SetCurrent(mode);
|
Modes.SetCurrent(mode);
|
||||||
|
|
||||||
|
int status = Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode");
|
||||||
|
|
||||||
Task.Run(async () =>
|
// Vivobook fallback
|
||||||
|
if (status != 1)
|
||||||
{
|
{
|
||||||
bool reset = AppConfig.IsResetRequired() && (Modes.GetBase(oldMode) == Modes.GetBase(mode)) && customPower > 0;
|
int vivoMode = Modes.GetBase(mode);
|
||||||
|
if (vivoMode == 1) vivoMode = 2;
|
||||||
customFans = false;
|
else if (vivoMode == 2) vivoMode = 1;
|
||||||
customPower = 0;
|
Program.acpi.DeviceSet(AsusACPI.VivoBookMode, vivoMode, "VivoMode");
|
||||||
SetModeLabel();
|
}
|
||||||
|
|
||||||
// Workaround for not properly resetting limits on G14 2024
|
|
||||||
if (reset)
|
|
||||||
{
|
|
||||||
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, (Modes.GetBase(oldMode) != 1) ? AsusACPI.PerformanceTurbo : AsusACPI.PerformanceBalanced, "Reset");
|
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(1500));
|
|
||||||
}
|
|
||||||
|
|
||||||
int status = Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode");
|
|
||||||
// Vivobook fallback
|
|
||||||
if (status != 1) Program.acpi.SetVivoMode(Modes.GetBase(mode));
|
|
||||||
|
|
||||||
SetGPUClocks();
|
|
||||||
|
|
||||||
AutoFans();
|
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(1000));
|
|
||||||
AutoPower();
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) XGM.Reset();
|
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) XGM.Reset();
|
||||||
|
|
||||||
if (notify)
|
if (notify)
|
||||||
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
|
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
|
||||||
|
|
||||||
|
SetGPUClocks();
|
||||||
|
AutoFans();
|
||||||
|
AutoPower(1000);
|
||||||
|
|
||||||
// Power plan from config or defaulting to balanced
|
// Power plan from config or defaulting to balanced
|
||||||
if (AppConfig.GetModeString("scheme") is not null)
|
if (AppConfig.GetModeString("scheme") is not null)
|
||||||
@@ -158,17 +145,18 @@ namespace GHelper.Mode
|
|||||||
Program.acpi.SetFanCurve(AsusFan.Mid, AppConfig.GetFanConfig(AsusFan.Mid));
|
Program.acpi.SetFanCurve(AsusFan.Mid, AppConfig.GetFanConfig(AsusFan.Mid));
|
||||||
|
|
||||||
|
|
||||||
// Alternative way to set fan curve
|
// something went wrong, resetting to default profile
|
||||||
if (cpuResult != 1 || gpuResult != 1)
|
if (cpuResult != 1 || gpuResult != 1)
|
||||||
{
|
{
|
||||||
cpuResult = Program.acpi.SetFanRange(AsusFan.CPU, AppConfig.GetFanConfig(AsusFan.CPU));
|
cpuResult = Program.acpi.SetFanRange(AsusFan.CPU, AppConfig.GetFanConfig(AsusFan.CPU));
|
||||||
gpuResult = Program.acpi.SetFanRange(AsusFan.GPU, AppConfig.GetFanConfig(AsusFan.GPU));
|
gpuResult = Program.acpi.SetFanRange(AsusFan.GPU, AppConfig.GetFanConfig(AsusFan.GPU));
|
||||||
|
|
||||||
// Something went wrong, resetting to default profile
|
|
||||||
if (cpuResult != 1 || gpuResult != 1)
|
if (cpuResult != 1 || gpuResult != 1)
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Reset Mode");
|
int mode = Modes.GetCurrentBase();
|
||||||
settings.LabelFansResult("Model doesn't support custom fan curves");
|
Logger.WriteLine("ASUS BIOS rejected fan curve, resetting mode to " + mode);
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, mode, "Reset Mode");
|
||||||
|
settings.LabelFansResult("ASUS BIOS rejected fan curve");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -194,25 +182,52 @@ namespace GHelper.Mode
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AutoPower(bool launchAsAdmin = false)
|
public void AutoPower(int delay = 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
customPower = 0;
|
customPower = 0;
|
||||||
|
|
||||||
bool applyPower = AppConfig.IsMode("auto_apply_power");
|
bool applyPower = AppConfig.IsMode("auto_apply_power");
|
||||||
bool applyFans = AppConfig.IsMode("auto_apply");
|
bool applyFans = AppConfig.IsMode("auto_apply");
|
||||||
|
//bool applyGPU = true;
|
||||||
|
|
||||||
if (applyPower && !applyFans && (AppConfig.IsFanRequired() || AppConfig.IsManualModeRequired()))
|
if (applyPower && !applyFans)
|
||||||
{
|
{
|
||||||
AutoFans(true);
|
// force fan curve for misbehaving bios PPTs on some models
|
||||||
Thread.Sleep(500);
|
if (AppConfig.IsFanRequired())
|
||||||
|
{
|
||||||
|
delay = 500;
|
||||||
|
AutoFans(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix for models that don't support PPT settings in all modes, setting a "manual" mode for them
|
||||||
|
if (AppConfig.IsManualModeRequired())
|
||||||
|
{
|
||||||
|
AutoFans(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (applyPower) SetPower(launchAsAdmin);
|
if (delay > 0)
|
||||||
|
{
|
||||||
|
var timer = new System.Timers.Timer(delay);
|
||||||
|
timer.Elapsed += delegate
|
||||||
|
{
|
||||||
|
timer.Stop();
|
||||||
|
timer.Dispose();
|
||||||
|
|
||||||
Thread.Sleep(500);
|
if (applyPower) SetPower();
|
||||||
SetGPUPower();
|
Thread.Sleep(500);
|
||||||
AutoRyzen();
|
SetGPUPower();
|
||||||
|
AutoRyzen();
|
||||||
|
};
|
||||||
|
timer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (applyPower) SetPower(true);
|
||||||
|
SetGPUPower();
|
||||||
|
AutoRyzen();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,7 @@
|
|||||||
}
|
}
|
||||||
public override int DPIIncrements()
|
public override int DPIIncrements()
|
||||||
{
|
{
|
||||||
return 50;
|
return 100;
|
||||||
}
|
|
||||||
|
|
||||||
public override int MinDPI()
|
|
||||||
{
|
|
||||||
return 50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HasDebounceSetting()
|
public override bool HasDebounceSetting()
|
||||||
|
|||||||
@@ -7,10 +7,6 @@
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public StrixImpactII(ushort pid) : base(0x0B05, pid, "mi_00", false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int DPIProfileCount()
|
public override int DPIProfileCount()
|
||||||
{
|
{
|
||||||
return 4;
|
return 4;
|
||||||
@@ -178,19 +174,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StrixImpactIIElectroPunk : StrixImpactII
|
|
||||||
{
|
|
||||||
|
|
||||||
public StrixImpactIIElectroPunk() : base(0x1956)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override string GetDisplayName()
|
|
||||||
{
|
|
||||||
return "ROG Strix Impact II Electro Punk";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ namespace GHelper.Peripherals
|
|||||||
DetectMouse(new PugioII());
|
DetectMouse(new PugioII());
|
||||||
DetectMouse(new PugioIIWired());
|
DetectMouse(new PugioIIWired());
|
||||||
DetectMouse(new StrixImpactII());
|
DetectMouse(new StrixImpactII());
|
||||||
DetectMouse(new StrixImpactIIElectroPunk());
|
|
||||||
DetectMouse(new Chakram());
|
DetectMouse(new Chakram());
|
||||||
DetectMouse(new ChakramWired());
|
DetectMouse(new ChakramWired());
|
||||||
DetectMouse(new ChakramCore());
|
DetectMouse(new ChakramCore());
|
||||||
|
|||||||
@@ -124,10 +124,10 @@
|
|||||||
<value>Verbindung zu ASUS ACPI fehlgeschlagen. G-Helper kann nicht ausgeführt werden. Bitte installiere ASUS System Control Interface.</value>
|
<value>Verbindung zu ASUS ACPI fehlgeschlagen. G-Helper kann nicht ausgeführt werden. Bitte installiere ASUS System Control Interface.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlertAPUMemoryRestart" xml:space="preserve">
|
<data name="AlertAPUMemoryRestart" xml:space="preserve">
|
||||||
<value>Gerät neu starten, um Änderungen anzuwenden</value>
|
<value>Restart your device to apply changes</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
|
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
|
||||||
<value>Jetzt neu starten?</value>
|
<value>Restart now?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AlertDGPU" xml:space="preserve">
|
<data name="AlertDGPU" xml:space="preserve">
|
||||||
<value>Die GPU wird gerade verwendet. Trotzdem deaktivieren?</value>
|
<value>Die GPU wird gerade verwendet. Trotzdem deaktivieren?</value>
|
||||||
@@ -250,7 +250,7 @@
|
|||||||
<value>Im Betrieb</value>
|
<value>Im Betrieb</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightTimeout" xml:space="preserve">
|
<data name="BacklightTimeout" xml:space="preserve">
|
||||||
<value>Timeout angeschlossen / bei Akku (0 = An)</value>
|
<value>Timeout angeschlossen / bei Akku (0 - AN)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
||||||
<value>Backlight Timeout when on battery</value>
|
<value>Backlight Timeout when on battery</value>
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
<value>Hochfahren</value>
|
<value>Hochfahren</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BootSound" xml:space="preserve">
|
<data name="BootSound" xml:space="preserve">
|
||||||
<value>Boot-Sound</value>
|
<value>Boot Sound</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Helligkeit</value>
|
<value>Helligkeit</value>
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
<value>Farbe</value>
|
<value>Farbe</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Contrast" xml:space="preserve">
|
<data name="Contrast" xml:space="preserve">
|
||||||
<value>Kontrast</value>
|
<value>Contrast</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Controller" xml:space="preserve">
|
<data name="Controller" xml:space="preserve">
|
||||||
<value>Controller</value>
|
<value>Controller</value>
|
||||||
@@ -328,7 +328,7 @@
|
|||||||
<value>Standard</value>
|
<value>Standard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DisableController" xml:space="preserve">
|
<data name="DisableController" xml:space="preserve">
|
||||||
<value>Controller deaktivieren</value>
|
<value>Disable Controller</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DisableOnLidClose" xml:space="preserve">
|
<data name="DisableOnLidClose" xml:space="preserve">
|
||||||
<value>Disable on lid close</value>
|
<value>Disable on lid close</value>
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
<value>Eco</value>
|
<value>Eco</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnableGPUOnShutdown" xml:space="preserve">
|
<data name="EnableGPUOnShutdown" xml:space="preserve">
|
||||||
<value>Aktiviere GPU beim Herunterfahren (verhindert Problem im Eco-Modus)</value>
|
<value>Enable GPU on shutdown (prevents issue with Eco mode)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnableOptimusText" xml:space="preserve">
|
<data name="EnableOptimusText" xml:space="preserve">
|
||||||
<value>Die dGPU zu deaktivieren, indem Sie in den Eco-Modus wechseln während der Anzeigemodus nicht auf Optimus eingestellt ist, kann zu Problemen mit der Helligkeitseinstellung führen.
|
<value>Die dGPU zu deaktivieren, indem Sie in den Eco-Modus wechseln während der Anzeigemodus nicht auf Optimus eingestellt ist, kann zu Problemen mit der Helligkeitseinstellung führen.
|
||||||
@@ -366,7 +366,7 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Energieeinstellungen</value>
|
<value>Energieeinstellungen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Export" xml:space="preserve">
|
<data name="Export" xml:space="preserve">
|
||||||
<value>Profil exportieren</value>
|
<value>Export Profile</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Extra" xml:space="preserve">
|
<data name="Extra" xml:space="preserve">
|
||||||
<value>Extra</value>
|
<value>Extra</value>
|
||||||
@@ -441,10 +441,10 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Hoch</value>
|
<value>Hoch</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ImageRotation" xml:space="preserve">
|
<data name="ImageRotation" xml:space="preserve">
|
||||||
<value>Bilddrehung</value>
|
<value>Image Rotation</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Import" xml:space="preserve">
|
<data name="Import" xml:space="preserve">
|
||||||
<value>Profil importieren</value>
|
<value>Import Profile</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyBindings" xml:space="preserve">
|
<data name="KeyBindings" xml:space="preserve">
|
||||||
<value>Tastenbelegung</value>
|
<value>Tastenbelegung</value>
|
||||||
@@ -534,7 +534,7 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Tastenreaktionsgeschwindigkeit</value>
|
<value>Tastenreaktionsgeschwindigkeit</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MouseImportFailed" xml:space="preserve">
|
<data name="MouseImportFailed" xml:space="preserve">
|
||||||
<value>Import fehlgeschlagen. Die ausgewählte Datei ist kein gültiges Mausprofil oder beschädigt.</value>
|
<value>Import failed. Selected file is not a valid mouse profile or corrutpted.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MouseLiftOffDistance" xml:space="preserve">
|
<data name="MouseLiftOffDistance" xml:space="preserve">
|
||||||
<value>Lift Off Distance</value>
|
<value>Lift Off Distance</value>
|
||||||
@@ -621,7 +621,7 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Schließen</value>
|
<value>Schließen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Reset" xml:space="preserve">
|
<data name="Reset" xml:space="preserve">
|
||||||
<value>Zurücksetzen</value>
|
<value>Reset</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RestartGPU" xml:space="preserve">
|
<data name="RestartGPU" xml:space="preserve">
|
||||||
<value>Ein Prozess verhindert den Wechsel in den Eco-Modus. dGPU neu starten? Fortfahren auf eigene Gefahr.</value>
|
<value>Ein Prozess verhindert den Wechsel in den Eco-Modus. dGPU neu starten? Fortfahren auf eigene Gefahr.</value>
|
||||||
@@ -639,7 +639,7 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Beim Start ausführen</value>
|
<value>Beim Start ausführen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ScalingQuality" xml:space="preserve">
|
<data name="ScalingQuality" xml:space="preserve">
|
||||||
<value>Skalierungsqualität</value>
|
<value>Scaling Quality</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ScreenPadDown" xml:space="preserve">
|
<data name="ScreenPadDown" xml:space="preserve">
|
||||||
<value>Screenpad Helligkeit verringern</value>
|
<value>Screenpad Helligkeit verringern</value>
|
||||||
@@ -720,7 +720,7 @@ Trotzdem fortfahren?</value>
|
|||||||
<value>Version</value>
|
<value>Version</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VibrationStrength" xml:space="preserve">
|
<data name="VibrationStrength" xml:space="preserve">
|
||||||
<value>Vibrationsstärke</value>
|
<value>Vibration Strength</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VolumeDown" xml:space="preserve">
|
<data name="VolumeDown" xml:space="preserve">
|
||||||
<value>Lautstärke verringern</value>
|
<value>Lautstärke verringern</value>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Ryzen
|
|||||||
internal class RyzenControl
|
internal class RyzenControl
|
||||||
{
|
{
|
||||||
|
|
||||||
public static int MinCPUUV => AppConfig.Get("min_uv", -40);
|
public static int MinCPUUV => AppConfig.Get("min_uv", -30);
|
||||||
public const int MaxCPUUV = 0;
|
public const int MaxCPUUV = 0;
|
||||||
|
|
||||||
public const int MinIGPUUV = -20;
|
public const int MinIGPUUV = -20;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -254,28 +254,16 @@ namespace GHelper
|
|||||||
VisualiseFnLock();
|
VisualiseFnLock();
|
||||||
buttonFnLock.Click += ButtonFnLock_Click;
|
buttonFnLock.Click += ButtonFnLock_Click;
|
||||||
|
|
||||||
panelPerformance.Focus();
|
panelGamma.Visible = AppConfig.IsOLED();
|
||||||
|
|
||||||
InitBrightness();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitBrightness()
|
|
||||||
{
|
|
||||||
if (!AppConfig.IsOLED()) return;
|
|
||||||
|
|
||||||
panelGamma.Visible = true;
|
|
||||||
|
|
||||||
int brightness = AppConfig.Get("brightness");
|
|
||||||
if (brightness >= 0) sliderGamma.Value = brightness;
|
|
||||||
|
|
||||||
sliderGamma.ValueChanged += SliderGamma_ValueChanged;
|
sliderGamma.ValueChanged += SliderGamma_ValueChanged;
|
||||||
labelGamma.Text = sliderGamma.Value + "%";
|
labelGamma.Text = "100%";
|
||||||
}
|
|
||||||
|
|
||||||
|
panelPerformance.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
private void SliderGamma_ValueChanged(object? sender, EventArgs e)
|
private void SliderGamma_ValueChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
screenControl.SetBrightness(sliderGamma.Value);
|
screenControl.SetGamma(sliderGamma.Value);
|
||||||
labelGamma.Text = sliderGamma.Value + "%";
|
labelGamma.Text = sliderGamma.Value + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.IsVivobook() || AppConfig.IsProArt();
|
||||||
static bool isStrix = AppConfig.IsStrix() && !AppConfig.IsNoDirectRGB();
|
static bool isStrix = AppConfig.IsStrix() && !AppConfig.IsNoDirectRGB();
|
||||||
|
|
||||||
static bool isStrix4Zone = AppConfig.IsStrixLimitedRGB();
|
static bool isStrix4Zone = AppConfig.IsStrixLimitedRGB();
|
||||||
|
|||||||
@@ -161,36 +161,24 @@ namespace GHelper
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _VisualiseNewDriver(int position, int newer, TableLayoutPanel table)
|
public void VisualiseNewDriver(int position, int newer, TableLayoutPanel table)
|
||||||
{
|
{
|
||||||
var label = table.GetControlFromPosition(3, position) as LinkLabel;
|
var label = table.GetControlFromPosition(3, position) as LinkLabel;
|
||||||
if (label != null)
|
if (label != null)
|
||||||
{
|
|
||||||
if (newer == DRIVER_NEWER)
|
|
||||||
{
|
|
||||||
label.AccessibleName = label.AccessibleName + Properties.Strings.NewUpdates;
|
|
||||||
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
|
|
||||||
label.LinkColor = colorTurbo;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newer == DRIVER_NOT_FOUND) label.LinkColor = Color.Gray;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void VisualiseNewDriver(int position, int newer, TableLayoutPanel table)
|
|
||||||
{
|
|
||||||
if (InvokeRequired)
|
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
Invoke(delegate
|
||||||
{
|
{
|
||||||
_VisualiseNewDriver(position, newer, table);
|
if (newer == DRIVER_NEWER)
|
||||||
});
|
{
|
||||||
} else
|
label.AccessibleName = label.AccessibleName + Properties.Strings.NewUpdates;
|
||||||
{
|
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
|
||||||
_VisualiseNewDriver(position, newer, table);
|
label.LinkColor = colorTurbo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newer == DRIVER_NOT_FOUND) label.LinkColor = Color.Gray;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VisualiseNewCount(int updatesCount, TableLayoutPanel table)
|
public void VisualiseNewCount(int updatesCount, TableLayoutPanel table)
|
||||||
@@ -206,7 +194,7 @@ namespace GHelper
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
public async void DriversAsync(string url, int type, TableLayoutPanel table)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -279,7 +267,7 @@ namespace GHelper
|
|||||||
foreach (var localVersion in localVersions)
|
foreach (var localVersion in localVersions)
|
||||||
{
|
{
|
||||||
newer = Math.Min(newer, new Version(driver.version).CompareTo(new Version(localVersion)));
|
newer = Math.Min(newer, new Version(driver.version).CompareTo(new Version(localVersion)));
|
||||||
Logger.WriteLine(driver.title + " " + deviceID + " " + driver.version + " vs " + localVersion + " = " + newer);
|
Logger.WriteLine(driver.title + " " + deviceID + " "+ driver.version + " vs " + localVersion + " = " + newer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.406"
|
"version": "7.0.400"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user