mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
45 Commits
v0.190
...
FixedCurve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04afbea26f | ||
|
|
e28f51cce6 | ||
|
|
b0c48b9e63 | ||
|
|
ec17d8cb80 | ||
|
|
42ac2d627c | ||
|
|
3c241cafba | ||
|
|
873fcc0591 | ||
|
|
73d5a0bb90 | ||
|
|
ff5ac7de7e | ||
|
|
917fe112b8 | ||
|
|
4855733274 | ||
|
|
740a34fa9c | ||
|
|
534dc3d344 | ||
|
|
a52a87bcfd | ||
|
|
cdeb4951dc | ||
|
|
77d89505b3 | ||
|
|
4be790dce0 | ||
|
|
c9698a1613 | ||
|
|
819506e7ee | ||
|
|
489616d255 | ||
|
|
1103ab70f6 | ||
|
|
dbf0cbc3ac | ||
|
|
a45d693937 | ||
|
|
0db49af310 | ||
|
|
28daaf9a4c | ||
|
|
38d02ee7f9 | ||
|
|
c6d1b29a49 | ||
|
|
79cd773632 | ||
|
|
897de4ed27 | ||
|
|
afa6dbb542 | ||
|
|
80fbee2609 | ||
|
|
e1c83da19b | ||
|
|
59b5888632 | ||
|
|
cd74c62908 | ||
|
|
000fbe466f | ||
|
|
ab08bd8ab4 | ||
|
|
9f157d323e | ||
|
|
9c236ca17b | ||
|
|
ba8effcaad | ||
|
|
28f8cc95fd | ||
|
|
07f1edb02f | ||
|
|
6758d9224d | ||
|
|
5e51511df0 | ||
|
|
e71d283474 | ||
|
|
d0f0bd9155 |
@@ -616,9 +616,9 @@ namespace GHelper.Ally
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ApplyXBoxStatus()
|
public static void DisableXBoxController(bool disabled)
|
||||||
{
|
{
|
||||||
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, AppConfig.Is("controller_disabled") ? (byte)0x02 : (byte)0x01 }, "Status");
|
AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, disabled ? (byte)0x02 : (byte)0x01], $"ControllerDisabled: {disabled}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto, bool init = false)
|
public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto, bool init = false)
|
||||||
@@ -651,7 +651,7 @@ namespace GHelper.Ally
|
|||||||
InputDispatcher.SetBacklightAuto(true);
|
InputDispatcher.SetBacklightAuto(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
//AsusHid.WriteInput(CommandSave, null);
|
||||||
|
|
||||||
BindZone(BindingZone.M1M2);
|
BindZone(BindingZone.M1M2);
|
||||||
@@ -668,6 +668,13 @@ namespace GHelper.Ally
|
|||||||
|
|
||||||
SetDeadzones();
|
SetDeadzones();
|
||||||
|
|
||||||
|
if (init && AppConfig.Is("controller_disabled"))
|
||||||
|
{
|
||||||
|
Thread.Sleep(500);
|
||||||
|
DisableXBoxController(false);
|
||||||
|
DisableXBoxController(true);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,6 @@ namespace GHelper.AnimeMatrix
|
|||||||
deviceSlash.SetEnabled(true);
|
deviceSlash.SetEnabled(true);
|
||||||
deviceSlash.Init();
|
deviceSlash.Init();
|
||||||
|
|
||||||
deviceSlash.SetLidMode(false);
|
|
||||||
|
|
||||||
switch ((SlashMode)running)
|
switch ((SlashMode)running)
|
||||||
{
|
{
|
||||||
case SlashMode.Static:
|
case SlashMode.Static:
|
||||||
@@ -150,6 +148,11 @@ namespace GHelper.AnimeMatrix
|
|||||||
{
|
{
|
||||||
bool matrixLid = AppConfig.Is("matrix_lid");
|
bool matrixLid = AppConfig.Is("matrix_lid");
|
||||||
|
|
||||||
|
if (deviceSlash is not null)
|
||||||
|
{
|
||||||
|
deviceSlash.SetLidMode(!matrixLid && AppConfig.Is("slash_sleep"));
|
||||||
|
}
|
||||||
|
|
||||||
if (matrixLid || force)
|
if (matrixLid || force)
|
||||||
{
|
{
|
||||||
Logger.WriteLine($"Matrix LidClosed: {lidClose}");
|
Logger.WriteLine($"Matrix LidClosed: {lidClose}");
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ namespace GHelper.AnimeMatrix
|
|||||||
|
|
||||||
public void SetLidMode(bool status)
|
public void SetLidMode(bool status)
|
||||||
{
|
{
|
||||||
Set(CreatePacket([0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00]), $"DisableLidClose {status}");
|
Set(CreatePacket([0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00]), $"SlashLidCloseAnimation {status}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSleepActive(bool status)
|
public void SetSleepActive(bool status)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public static class AppConfig
|
|||||||
private static string? _bios;
|
private static string? _bios;
|
||||||
|
|
||||||
private static Dictionary<string, object> config = new Dictionary<string, object>();
|
private static Dictionary<string, object> config = new Dictionary<string, object>();
|
||||||
private static System.Timers.Timer timer = new System.Timers.Timer(1000);
|
private static System.Timers.Timer timer = new System.Timers.Timer(2000);
|
||||||
|
|
||||||
static AppConfig()
|
static AppConfig()
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,9 @@ public static class AppConfig
|
|||||||
|
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
|
|
||||||
if (File.ReadAllText(backup).Contains("}"))
|
var backupText = File.ReadAllText(backup);
|
||||||
|
|
||||||
|
if (backupText.Contains("{") && backupText.Contains("}"))
|
||||||
{
|
{
|
||||||
File.Copy(backup, configFile, true);
|
File.Copy(backup, configFile, true);
|
||||||
}
|
}
|
||||||
@@ -219,6 +221,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
private static void Write()
|
private static void Write()
|
||||||
{
|
{
|
||||||
|
timer.Stop();
|
||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,27 +305,32 @@ public static class AppConfig
|
|||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case 1:
|
case AsusACPI.PerformanceTurbo:
|
||||||
if (device == AsusFan.GPU)
|
switch (device)
|
||||||
curve = StringToBytes("14-3F-44-48-4C-50-54-62-16-1F-26-2D-39-47-55-5F");
|
{
|
||||||
else
|
case AsusFan.GPU:
|
||||||
curve = StringToBytes("14-3F-44-48-4C-50-54-62-11-1A-22-29-34-43-51-5A");
|
return StringToBytes("14-3F-44-48-4C-50-54-62-16-1F-26-2D-39-47-55-5F");
|
||||||
break;
|
default:
|
||||||
case 2:
|
return StringToBytes("14-3F-44-48-4C-50-54-62-11-1A-22-29-34-43-51-5A");
|
||||||
if (device == AsusFan.GPU)
|
}
|
||||||
curve = StringToBytes("3C-41-42-46-47-4B-4C-62-08-11-11-1D-1D-26-26-2D");
|
case AsusACPI.PerformanceSilent:
|
||||||
else
|
switch (device)
|
||||||
curve = StringToBytes("3C-41-42-46-47-4B-4C-62-03-0C-0C-16-16-22-22-29");
|
{
|
||||||
break;
|
case AsusFan.GPU:
|
||||||
|
return StringToBytes("3C-41-42-46-47-4B-4C-62-08-11-11-1D-1D-26-26-2D");
|
||||||
|
default:
|
||||||
|
return StringToBytes("3C-41-42-46-47-4B-4C-62-03-0C-0C-16-16-22-22-29");
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if (device == AsusFan.GPU)
|
switch (device)
|
||||||
curve = StringToBytes("3A-3D-40-44-48-4D-51-62-0C-16-1D-1F-26-2D-34-4A");
|
{
|
||||||
else
|
case AsusFan.GPU:
|
||||||
curve = StringToBytes("3A-3D-40-44-48-4D-51-62-08-11-16-1A-22-29-30-45");
|
return StringToBytes("3A-3D-40-44-48-4D-51-62-0C-16-1D-1F-26-2D-34-4A");
|
||||||
break;
|
default:
|
||||||
|
return StringToBytes("3A-3D-40-44-48-4D-51-62-08-11-16-1A-22-29-30-45");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return curve;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetModeString(string name)
|
public static string GetModeString(string name)
|
||||||
@@ -446,7 +454,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsOLED()
|
public static bool IsOLED()
|
||||||
{
|
{
|
||||||
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("M550") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540") || ContainsModel("M7400") || ContainsModel("N650") || ContainsModel("HN7306") || ContainsModel("H7606");
|
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("M550") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340") || ContainsModel("S540") || ContainsModel("M7400") || ContainsModel("N650") || ContainsModel("HN7306") || ContainsModel("H7606") || ContainsModel("UX5406") || ContainsModel("UM5606");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsNoOverdrive()
|
public static bool IsNoOverdrive()
|
||||||
@@ -632,7 +640,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsForceSetGPUMode()
|
public static bool IsForceSetGPUMode()
|
||||||
{
|
{
|
||||||
return Is("gpu_mode_force_set") || ContainsModel("503");
|
return Is("gpu_mode_force_set") || (ContainsModel("503") && IsNotFalse("gpu_mode_force_set"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsNoGPUModes()
|
public static bool IsNoGPUModes()
|
||||||
@@ -691,4 +699,9 @@ public static class AppConfig
|
|||||||
return ContainsModel("G834JYR") || Is("force_miniled");
|
return ContainsModel("G834JYR") || Is("force_miniled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool SaveDimming()
|
||||||
|
{
|
||||||
|
return Is("save_dimming");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class AsusACPI
|
|||||||
public const int APU_MEM = 0x000600C1;
|
public const int APU_MEM = 0x000600C1;
|
||||||
|
|
||||||
public const int TUF_KB_BRIGHTNESS = 0x00050021;
|
public const int TUF_KB_BRIGHTNESS = 0x00050021;
|
||||||
public const int VIVO_KB_BRIGHTNESS = 0x0005002F;
|
public const int KBD_BACKLIGHT_OOBE = 0x0005002F;
|
||||||
|
|
||||||
public const int TUF_KB = 0x00100056;
|
public const int TUF_KB = 0x00100056;
|
||||||
public const int TUF_KB2 = 0x0010005a;
|
public const int TUF_KB2 = 0x0010005a;
|
||||||
@@ -583,7 +583,7 @@ public class AsusACPI
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
//Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
||||||
|
if (IsInvalidCurve(result)) result = AppConfig.GetDefaultCurve(device);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -598,43 +598,20 @@ public class AsusACPI
|
|||||||
return curve.All(singleByte => singleByte == 0);
|
return curve.All(singleByte => singleByte == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int FixTemp(int temp, int index)
|
||||||
|
{
|
||||||
|
var dxMin = 30 + 10 * index;
|
||||||
|
var dxMax = dxMin + 9;
|
||||||
|
return Math.Min(dxMax, Math.Max(dxMin, temp));
|
||||||
|
}
|
||||||
|
|
||||||
public static byte[] FixFanCurve(byte[] curve)
|
public static byte[] FixFanCurve(byte[] curve)
|
||||||
{
|
{
|
||||||
if (curve.Length != 16) throw new Exception("Incorrect curve");
|
if (curve.Length != 16) throw new Exception("Incorrect curve");
|
||||||
|
|
||||||
var points = new Dictionary<byte, byte>();
|
|
||||||
byte old = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
if (curve[i] <= old) curve[i] = (byte)Math.Min(100, old + 6); // preventing 2 points in same spot from default asus profiles
|
curve[i] = (byte)FixTemp(curve[i], i);
|
||||||
points[curve[i]] = curve[i + 8];
|
|
||||||
old = curve[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
var pointsFixed = new Dictionary<byte, byte>();
|
|
||||||
bool fix = false;
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
foreach (var pair in points.OrderBy(x => x.Key))
|
|
||||||
{
|
|
||||||
if (count == 0 && pair.Key >= 40)
|
|
||||||
{
|
|
||||||
fix = true;
|
|
||||||
pointsFixed.Add(30, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count != 3 || !fix)
|
|
||||||
pointsFixed.Add(pair.Key, pair.Value);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
count = 0;
|
|
||||||
foreach (var pair in pointsFixed.OrderBy(x => x.Key))
|
|
||||||
{
|
|
||||||
curve[count] = pair.Key;
|
|
||||||
curve[count + 8] = pair.Value;
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return curve;
|
return curve;
|
||||||
@@ -788,7 +765,6 @@ public class AsusACPI
|
|||||||
{
|
{
|
||||||
int param = 0x80 | (brightness & 0x7F);
|
int param = 0x80 | (brightness & 0x7F);
|
||||||
DeviceSet(TUF_KB_BRIGHTNESS, param, "TUF Brightness");
|
DeviceSet(TUF_KB_BRIGHTNESS, param, "TUF Brightness");
|
||||||
if (AppConfig.IsVivoZenPro()) DeviceSet(VIVO_KB_BRIGHTNESS, param, "VIVO Brightness");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -831,6 +807,7 @@ public class AsusACPI
|
|||||||
state = state | 0x01 << 8;
|
state = state | 0x01 << 8;
|
||||||
|
|
||||||
DeviceSet(TUF_KB_STATE, state, "TUF_KB");
|
DeviceSet(TUF_KB_STATE, state, "TUF_KB");
|
||||||
|
if (AppConfig.IsVivoZenPro() && DeviceGet(KBD_BACKLIGHT_OOBE) >= 0) DeviceSet(KBD_BACKLIGHT_OOBE, 1, "VIVO OOBE");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SubscribeToEvents(Action<object, EventArrivedEventArgs> EventHandler)
|
public void SubscribeToEvents(Action<object, EventArrivedEventArgs> EventHandler)
|
||||||
|
|||||||
@@ -326,7 +326,8 @@ namespace GHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LightingMode lm = supportedLightingModes[comboBoxLightingMode.SelectedIndex];
|
var index = comboBoxLightingMode.SelectedIndex;
|
||||||
|
LightingMode lm = supportedLightingModes[index < supportedLightingModes.Count ? index : 0 ];
|
||||||
|
|
||||||
LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
|
LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);
|
||||||
if (ls.LightingMode == lm)
|
if (ls.LightingMode == lm)
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace GHelper.AutoUpdate
|
|||||||
Logger.WriteLine(ex.Message);
|
Logger.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
Environment.Exit(0);
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ namespace GHelper.Battery
|
|||||||
if (AppConfig.IsChargeLimit6080())
|
if (AppConfig.IsChargeLimit6080())
|
||||||
{
|
{
|
||||||
if (limit > 85) limit = 100;
|
if (limit > 85) limit = 100;
|
||||||
|
else if (limit >= 80) limit = 80;
|
||||||
else if (limit < 60) limit = 60;
|
else if (limit < 60) limit = 60;
|
||||||
else limit = 80;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Program.acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "BatteryLimit");
|
Program.acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "BatteryLimit");
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ namespace GHelper.Display
|
|||||||
|
|
||||||
private static int _brightness = 100;
|
private static int _brightness = 100;
|
||||||
private static bool _init = true;
|
private static bool _init = true;
|
||||||
|
private static bool _download = true;
|
||||||
private static string? _splendidPath = null;
|
private static string? _splendidPath = null;
|
||||||
|
|
||||||
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
|
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
|
||||||
@@ -211,9 +212,19 @@ namespace GHelper.Display
|
|||||||
|
|
||||||
AppConfig.Set("gamut", mode);
|
AppConfig.Set("gamut", mode);
|
||||||
|
|
||||||
if (RunSplendid(SplendidCommand.GamutMode, 0, mode)) return;
|
var result = RunSplendid(SplendidCommand.GamutMode, 0, mode);
|
||||||
|
if (result == 0) return;
|
||||||
if (_init)
|
if (result == -1)
|
||||||
|
{
|
||||||
|
Logger.WriteLine("Gamut setting refused, reverting.");
|
||||||
|
RunSplendid(SplendidCommand.GamutMode, 0, (int)GetDefaultGamut());
|
||||||
|
if (ProcessHelper.IsUserAdministrator() && _download)
|
||||||
|
{
|
||||||
|
_download = false;
|
||||||
|
ColorProfileHelper.InstallProfile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result == 1 && _init)
|
||||||
{
|
{
|
||||||
_init = false;
|
_init = false;
|
||||||
RunSplendid(SplendidCommand.Init);
|
RunSplendid(SplendidCommand.Init);
|
||||||
@@ -253,9 +264,19 @@ namespace GHelper.Display
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RunSplendid(mode, 0, balance)) return;
|
var result = RunSplendid(mode, 0, balance);
|
||||||
|
if (result == 0) return;
|
||||||
if (_init)
|
if (result == -1)
|
||||||
|
{
|
||||||
|
Logger.WriteLine("Visual mode setting refused, reverting.");
|
||||||
|
RunSplendid(SplendidCommand.Default, 0, DefaultColorTemp);
|
||||||
|
if (ProcessHelper.IsUserAdministrator() && _download)
|
||||||
|
{
|
||||||
|
_download = false;
|
||||||
|
ColorProfileHelper.InstallProfile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result == 1 && _init)
|
||||||
{
|
{
|
||||||
_init = false;
|
_init = false;
|
||||||
RunSplendid(SplendidCommand.Init);
|
RunSplendid(SplendidCommand.Init);
|
||||||
@@ -288,7 +309,7 @@ namespace GHelper.Display
|
|||||||
return _splendidPath;
|
return _splendidPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool RunSplendid(SplendidCommand command, int? param1 = null, int? param2 = null)
|
private static int RunSplendid(SplendidCommand command, int? param1 = null, int? param2 = null)
|
||||||
{
|
{
|
||||||
var splendid = GetSplendidPath();
|
var splendid = GetSplendidPath();
|
||||||
bool isVivo = AppConfig.IsVivoZenPro();
|
bool isVivo = AppConfig.IsVivoZenPro();
|
||||||
@@ -298,10 +319,11 @@ namespace GHelper.Display
|
|||||||
{
|
{
|
||||||
if (command == SplendidCommand.DimmingVisual && isVivo) command = SplendidCommand.DimmingVivo;
|
if (command == SplendidCommand.DimmingVisual && isVivo) command = SplendidCommand.DimmingVivo;
|
||||||
var result = ProcessHelper.RunCMD(splendid, (int)command + " " + param1 + " " + param2);
|
var result = ProcessHelper.RunCMD(splendid, (int)command + " " + param1 + " " + param2);
|
||||||
if (result.Contains("file not exist") || (result.Length == 0 && !isVivo)) return false;
|
if (result.Contains("file not exist") || (result.Length == 0 && !isVivo)) return 1;
|
||||||
|
if (result.Contains("return code: -1")) return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void BrightnessTimerTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
private static void BrightnessTimerTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||||
@@ -309,28 +331,46 @@ namespace GHelper.Display
|
|||||||
brightnessTimer.Stop();
|
brightnessTimer.Stop();
|
||||||
|
|
||||||
|
|
||||||
if (RunSplendid(SplendidCommand.DimmingVisual, 0, (int)(40 + _brightness * 0.6))) return;
|
if (RunSplendid(SplendidCommand.DimmingVisual, 0, (int)(40 + _brightness * 0.6)) == 0) return;
|
||||||
|
|
||||||
if (_init)
|
if (_init)
|
||||||
{
|
{
|
||||||
_init = false;
|
_init = false;
|
||||||
RunSplendid(SplendidCommand.Init);
|
RunSplendid(SplendidCommand.Init);
|
||||||
RunSplendid(SplendidCommand.Init, 4);
|
RunSplendid(SplendidCommand.Init, 4);
|
||||||
if (RunSplendid(SplendidCommand.DimmingVisual, 0, (int)(40 + _brightness * 0.6))) return;
|
if (RunSplendid(SplendidCommand.DimmingVisual, 0, (int)(40 + _brightness * 0.6)) == 0) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GammaRamp Fallback
|
// GammaRamp Fallback
|
||||||
SetGamma(_brightness);
|
SetGamma(_brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void InitBrightness()
|
||||||
|
{
|
||||||
|
if (!AppConfig.IsOLED()) return;
|
||||||
|
if (!AppConfig.SaveDimming()) return;
|
||||||
|
|
||||||
|
int brightness = GetBrightness();
|
||||||
|
if (brightness >= 0) SetBrightness(brightness);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsOnBattery()
|
||||||
|
{
|
||||||
|
return AppConfig.SaveDimming() && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int GetBrightness()
|
||||||
|
{
|
||||||
|
return AppConfig.Get(IsOnBattery() ? "brightness_battery" : "brightness", 100);
|
||||||
|
}
|
||||||
|
|
||||||
public static int SetBrightness(int brightness = -1, int delta = 0)
|
public static int SetBrightness(int brightness = -1, int delta = 0)
|
||||||
{
|
{
|
||||||
if (!AppConfig.IsOLED()) return -1;
|
if (!AppConfig.IsOLED()) return -1;
|
||||||
|
if (brightness < 0) brightness = GetBrightness();
|
||||||
if (brightness < 0) brightness = AppConfig.Get("brightness", 100);
|
|
||||||
|
|
||||||
_brightness = Math.Max(0, Math.Min(100, brightness + delta));
|
_brightness = Math.Max(0, Math.Min(100, brightness + delta));
|
||||||
AppConfig.Set("brightness", _brightness);
|
AppConfig.Set(IsOnBattery() ? "brightness_battery" : "brightness", _brightness);
|
||||||
|
|
||||||
brightnessTimer.Start();
|
brightnessTimer.Start();
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ namespace GHelper
|
|||||||
customActions.Remove("fnlock");
|
customActions.Remove("fnlock");
|
||||||
break;
|
break;
|
||||||
case "fnv":
|
case "fnv":
|
||||||
customActions[""] = EMPTY;
|
customActions[""] = Properties.Strings.VisualMode;
|
||||||
|
customActions.Remove("visual");
|
||||||
break;
|
break;
|
||||||
case "fne":
|
case "fne":
|
||||||
customActions[""] = "Calculator";
|
customActions[""] = "Calculator";
|
||||||
@@ -504,7 +505,10 @@ namespace GHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
eCoresMax = Math.Max(8, eCoresMax);
|
if (eCoresMax == 0) eCoresMax = 8;
|
||||||
|
if (pCoresMax == 0) pCoresMax = 6;
|
||||||
|
|
||||||
|
eCoresMax = Math.Max(4, eCoresMax);
|
||||||
pCoresMax = Math.Max(6, pCoresMax);
|
pCoresMax = Math.Max(6, pCoresMax);
|
||||||
|
|
||||||
panelCores.Visible = true;
|
panelCores.Visible = true;
|
||||||
|
|||||||
18
app/Fans.cs
18
app/Fans.cs
@@ -757,8 +757,8 @@ namespace GHelper
|
|||||||
|
|
||||||
chart.Titles[0].Text = title;
|
chart.Titles[0].Text = title;
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisX.Minimum = 10;
|
chart.ChartAreas[0].AxisX.Minimum = 20;
|
||||||
chart.ChartAreas[0].AxisX.Maximum = 100;
|
chart.ChartAreas[0].AxisX.Maximum = 110;
|
||||||
chart.ChartAreas[0].AxisX.Interval = 10;
|
chart.ChartAreas[0].AxisX.Interval = 10;
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisY.Minimum = 0;
|
chart.ChartAreas[0].AxisY.Minimum = 0;
|
||||||
@@ -1019,7 +1019,7 @@ namespace GHelper
|
|||||||
int chartCount = 2;
|
int chartCount = 2;
|
||||||
|
|
||||||
// Middle / system fan check
|
// Middle / system fan check
|
||||||
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)) || Program.acpi.GetFan(AsusFan.Mid) >= 0)
|
if (Program.acpi.GetFan(AsusFan.Mid) >= 0)
|
||||||
{
|
{
|
||||||
AppConfig.Set("mid_fan", 1);
|
AppConfig.Set("mid_fan", 1);
|
||||||
chartCount++;
|
chartCount++;
|
||||||
@@ -1082,15 +1082,10 @@ namespace GHelper
|
|||||||
if (reset || AsusACPI.IsInvalidCurve(curve))
|
if (reset || AsusACPI.IsInvalidCurve(curve))
|
||||||
{
|
{
|
||||||
curve = Program.acpi.GetFanCurve(device, Modes.GetCurrentBase());
|
curve = Program.acpi.GetFanCurve(device, Modes.GetCurrentBase());
|
||||||
|
Logger.WriteLine($"Default {device}:" + BitConverter.ToString(curve));
|
||||||
if (AsusACPI.IsInvalidCurve(curve))
|
|
||||||
curve = AppConfig.GetDefaultCurve(device);
|
|
||||||
|
|
||||||
curve = AsusACPI.FixFanCurve(curve);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug.WriteLine(BitConverter.ToString(curve));
|
curve = AsusACPI.FixFanCurve(curve);
|
||||||
|
|
||||||
byte old = 0;
|
byte old = 0;
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
@@ -1245,8 +1240,7 @@ namespace GHelper
|
|||||||
dx = ax.PixelPositionToValue(e.X);
|
dx = ax.PixelPositionToValue(e.X);
|
||||||
dy = ay.PixelPositionToValue(e.Y);
|
dy = ay.PixelPositionToValue(e.Y);
|
||||||
|
|
||||||
if (dx < 20) dx = 20;
|
dx = AsusACPI.FixTemp((int)dx, curIndex);
|
||||||
if (dx > 100) dx = 100;
|
|
||||||
|
|
||||||
if (dy < 0) dy = 0;
|
if (dy < 0) dy = 0;
|
||||||
if (dy > fansMax) dy = fansMax;
|
if (dy > fansMax) dy = fansMax;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.190</AssemblyVersion>
|
<AssemblyVersion>0.195</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
<PackageReference Include="NAudio" Version="2.1.0" />
|
<PackageReference Include="NAudio" Version="2.1.0" />
|
||||||
<PackageReference Include="NvAPIWrapper.Net" Version="0.8.1.101" />
|
<PackageReference Include="NvAPIWrapper.Net" Version="0.8.1.101" />
|
||||||
<PackageReference Include="System.Management" Version="8.0.0" />
|
<PackageReference Include="System.Management" Version="8.0.0" />
|
||||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
<PackageReference Include="TaskScheduler" Version="2.11.0" />
|
||||||
<PackageReference Include="WinForms.DataVisualization" Version="1.8.0" />
|
<PackageReference Include="WinForms.DataVisualization" Version="1.9.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -92,13 +92,16 @@ namespace GHelper.Gpu
|
|||||||
{
|
{
|
||||||
if (AppConfig.NoAutoUltimate())
|
if (AppConfig.NoAutoUltimate())
|
||||||
{
|
{
|
||||||
int standardStatus = Program.acpi.SetGPUEco(0);
|
Program.acpi.SetGPUEco(0);
|
||||||
if (standardStatus == 0)
|
Thread.Sleep(500);
|
||||||
|
|
||||||
|
int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco);
|
||||||
|
Logger.WriteLine("Eco flag : " + eco);
|
||||||
|
if (eco == 1)
|
||||||
{
|
{
|
||||||
settings.VisualiseGPUMode();
|
settings.VisualiseGPUMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Thread.Sleep(100);
|
|
||||||
}
|
}
|
||||||
status = Program.acpi.DeviceSet(AsusACPI.GPUMux, 0, "GPUMux");
|
status = Program.acpi.DeviceSet(AsusACPI.GPUMux, 0, "GPUMux");
|
||||||
restart = true;
|
restart = true;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public static class NvidiaSmi
|
|||||||
public static int GetMaxGPUPower()
|
public static int GetMaxGPUPower()
|
||||||
{
|
{
|
||||||
string output = RunNvidiaSmiCommand("--query-gpu=power.max_limit --format csv,noheader,nounits");
|
string output = RunNvidiaSmiCommand("--query-gpu=power.max_limit --format csv,noheader,nounits");
|
||||||
output = output.Trim().Trim('\n', '\r');
|
output = output.Trim().Trim('\n', '\r').Replace(".00","").Replace(",00", "");
|
||||||
|
|
||||||
if (float.TryParse(output, out float floatValue))
|
if (float.TryParse(output, out float floatValue))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ namespace GHelper
|
|||||||
private void CheckController_CheckedChanged(object? sender, EventArgs e)
|
private void CheckController_CheckedChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
AppConfig.Set("controller_disabled", checkController.Checked ? 1 : 0);
|
AppConfig.Set("controller_disabled", checkController.Checked ? 1 : 0);
|
||||||
AllyControl.ApplyXBoxStatus();
|
AllyControl.DisableXBoxController(checkController.Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ComboBinding(RComboBox combo)
|
private void ComboBinding(RComboBox combo)
|
||||||
|
|||||||
@@ -2,21 +2,31 @@
|
|||||||
|
|
||||||
public static class TouchscreenHelper
|
public static class TouchscreenHelper
|
||||||
{
|
{
|
||||||
public static bool? ToggleTouchscreen()
|
|
||||||
|
public static bool? GetStatus()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ProcessHelper.RunAsAdmin();
|
ProcessHelper.RunAsAdmin();
|
||||||
|
return ProcessHelper.RunCMD("powershell", "(Get-PnpDevice -FriendlyName '*touch*screen*').Status").Contains("OK");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine($"Can't get touchscreen status: {ex.Message}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var status = !ProcessHelper.RunCMD("powershell", "(Get-PnpDevice -FriendlyName '*touch*screen*').Status").Contains("OK");
|
public static void ToggleTouchscreen(bool status)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ProcessHelper.RunAsAdmin();
|
||||||
ProcessHelper.RunCMD("powershell", (status ? "Enable-PnpDevice" : "Disable-PnpDevice") + " -InstanceId (Get-PnpDevice -FriendlyName '*touch*screen*').InstanceId -Confirm:$false");
|
ProcessHelper.RunCMD("powershell", (status ? "Enable-PnpDevice" : "Disable-PnpDevice") + " -InstanceId (Get-PnpDevice -FriendlyName '*touch*screen*').InstanceId -Confirm:$false");
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.WriteLine($"Can't toggle touchscreen: {ex.Message}");
|
Logger.WriteLine($"Can't toggle touchscreen: {ex.Message}");
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,24 +228,31 @@ namespace GHelper.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void SetBrightness(int delta)
|
static void SetBrightness(bool up, bool hotkey = false)
|
||||||
{
|
{
|
||||||
int brightness = -1;
|
int brightness = -1;
|
||||||
|
|
||||||
if (isTUF) brightness = ScreenBrightness.Get();
|
if (isTUF) brightness = ScreenBrightness.Get();
|
||||||
if (AppConfig.SwappedBrightness()) delta = -delta;
|
if (AppConfig.SwappedBrightness() && !hotkey) up = !up;
|
||||||
|
|
||||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, delta > 0 ? AsusACPI.Brightness_Up : AsusACPI.Brightness_Down, "Brightness");
|
int step = AppConfig.Get("brightness_step", 10);
|
||||||
|
if (step != 10)
|
||||||
|
{
|
||||||
|
Program.toast.RunToast(ScreenBrightness.Adjust(up ? step : -step) + "%", up ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.UniversalControl, up ? AsusACPI.Brightness_Up : AsusACPI.Brightness_Down, "Brightness");
|
||||||
|
|
||||||
if (isTUF)
|
if (isTUF)
|
||||||
{
|
{
|
||||||
if (AppConfig.SwappedBrightness()) return;
|
if (AppConfig.SwappedBrightness()) return;
|
||||||
if (delta < 0 && brightness <= 0) return;
|
if (!up && brightness <= 0) return;
|
||||||
if (delta > 0 && brightness >= 100) return;
|
if (up && brightness >= 100) return;
|
||||||
|
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
if (brightness == ScreenBrightness.Get())
|
if (brightness == ScreenBrightness.Get())
|
||||||
Program.toast.RunToast(ScreenBrightness.Adjust(delta) + "%", (delta < 0) ? ToastIcon.BrightnessDown : ToastIcon.BrightnessUp);
|
Program.toast.RunToast(ScreenBrightness.Adjust(up ? step : -step) + "%", up ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -275,7 +282,7 @@ namespace GHelper.Input
|
|||||||
KeyboardHook.KeyPress(Keys.VolumeUp);
|
KeyboardHook.KeyPress(Keys.VolumeUp);
|
||||||
return;
|
return;
|
||||||
case Keys.F4:
|
case Keys.F4:
|
||||||
KeyProcess("m3");
|
ToggleMic();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -294,10 +301,10 @@ namespace GHelper.Input
|
|||||||
HandleEvent(199); // Backlight cycle
|
HandleEvent(199); // Backlight cycle
|
||||||
return;
|
return;
|
||||||
case Keys.F5:
|
case Keys.F5:
|
||||||
SetBrightness(-10);
|
SetBrightness(false);
|
||||||
return;
|
return;
|
||||||
case Keys.F6:
|
case Keys.F6:
|
||||||
SetBrightness(+10);
|
SetBrightness(true);
|
||||||
return;
|
return;
|
||||||
case Keys.F7:
|
case Keys.F7:
|
||||||
KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P);
|
KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P);
|
||||||
@@ -306,7 +313,7 @@ namespace GHelper.Input
|
|||||||
HandleEvent(126); // Emojis
|
HandleEvent(126); // Emojis
|
||||||
return;
|
return;
|
||||||
case Keys.F9:
|
case Keys.F9:
|
||||||
KeyProcess("m3"); // MicMute
|
ToggleMic(); // MicMute
|
||||||
return;
|
return;
|
||||||
case Keys.F10:
|
case Keys.F10:
|
||||||
HandleEvent(133); // Camera Toggle
|
HandleEvent(133); // Camera Toggle
|
||||||
@@ -365,10 +372,10 @@ namespace GHelper.Input
|
|||||||
KeyboardHook.KeyPress(Keys.Snapshot);
|
KeyboardHook.KeyPress(Keys.Snapshot);
|
||||||
break;
|
break;
|
||||||
case Keys.F7:
|
case Keys.F7:
|
||||||
SetBrightness(-10);
|
SetBrightness(false);
|
||||||
break;
|
break;
|
||||||
case Keys.F8:
|
case Keys.F8:
|
||||||
SetBrightness(+10);
|
SetBrightness(true);
|
||||||
break;
|
break;
|
||||||
case Keys.F9:
|
case Keys.F9:
|
||||||
KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P);
|
KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P);
|
||||||
@@ -407,7 +414,7 @@ namespace GHelper.Input
|
|||||||
{
|
{
|
||||||
if (e.Key == keyProfile) modeControl.CyclePerformanceMode();
|
if (e.Key == keyProfile) modeControl.CyclePerformanceMode();
|
||||||
if (e.Key == keyApp) Program.SettingsToggle();
|
if (e.Key == keyApp) Program.SettingsToggle();
|
||||||
if (e.Key == Keys.F20) KeyProcess("m3");
|
if (e.Key == Keys.F20) ToggleMic();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Modifier == (ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt))
|
if (e.Modifier == (ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt))
|
||||||
@@ -417,10 +424,10 @@ namespace GHelper.Input
|
|||||||
switch (e.Key)
|
switch (e.Key)
|
||||||
{
|
{
|
||||||
case Keys.F1:
|
case Keys.F1:
|
||||||
SetBrightness(-10);
|
SetBrightness(false);
|
||||||
break;
|
break;
|
||||||
case Keys.F2:
|
case Keys.F2:
|
||||||
SetBrightness(10);
|
SetBrightness(true);
|
||||||
break;
|
break;
|
||||||
case Keys.F3:
|
case Keys.F3:
|
||||||
Program.settingsForm.gpuControl.ToggleXGM(true);
|
Program.settingsForm.gpuControl.ToggleXGM(true);
|
||||||
@@ -462,11 +469,11 @@ namespace GHelper.Input
|
|||||||
{
|
{
|
||||||
case Keys.VolumeDown:
|
case Keys.VolumeDown:
|
||||||
// Screen brightness down on CTRL+VolDown
|
// Screen brightness down on CTRL+VolDown
|
||||||
SetBrightness(-10);
|
SetBrightness(false);
|
||||||
break;
|
break;
|
||||||
case Keys.VolumeUp:
|
case Keys.VolumeUp:
|
||||||
// Screen brightness up on CTRL+VolUp
|
// Screen brightness up on CTRL+VolUp
|
||||||
SetBrightness(+10);
|
SetBrightness(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -504,6 +511,8 @@ namespace GHelper.Input
|
|||||||
action = "micmute";
|
action = "micmute";
|
||||||
if (name == "fnc")
|
if (name == "fnc")
|
||||||
action = "fnlock";
|
action = "fnlock";
|
||||||
|
if (name == "fnv")
|
||||||
|
action = "visual";
|
||||||
if (name == "fne")
|
if (name == "fne")
|
||||||
action = "calculator";
|
action = "calculator";
|
||||||
}
|
}
|
||||||
@@ -558,15 +567,13 @@ namespace GHelper.Input
|
|||||||
ToggleFnLock();
|
ToggleFnLock();
|
||||||
break;
|
break;
|
||||||
case "micmute":
|
case "micmute":
|
||||||
bool muteStatus = Audio.ToggleMute();
|
ToggleMic();
|
||||||
Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
|
||||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
|
||||||
break;
|
break;
|
||||||
case "brightness_up":
|
case "brightness_up":
|
||||||
SetBrightness(+10);
|
SetBrightness(true);
|
||||||
break;
|
break;
|
||||||
case "brightness_down":
|
case "brightness_down":
|
||||||
SetBrightness(-10);
|
SetBrightness(false);
|
||||||
break;
|
break;
|
||||||
case "screenpad_up":
|
case "screenpad_up":
|
||||||
SetScreenpad(10);
|
SetScreenpad(10);
|
||||||
@@ -584,15 +591,27 @@ namespace GHelper.Input
|
|||||||
Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleModeHotkey);
|
Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleModeHotkey);
|
||||||
break;
|
break;
|
||||||
case "touchscreen":
|
case "touchscreen":
|
||||||
var touchscreenStatus = TouchscreenHelper.ToggleTouchscreen();
|
var status = !TouchscreenHelper.GetStatus();
|
||||||
if (touchscreenStatus is not null)
|
Logger.WriteLine("Touchscreen status: " + status);
|
||||||
Program.toast.RunToast(Properties.Strings.Touchscreen + " " + ((bool)touchscreenStatus ? Properties.Strings.On : Properties.Strings.Off), ToastIcon.Touchpad);
|
if (status is not null)
|
||||||
|
{
|
||||||
|
Program.toast.RunToast(Properties.Strings.Touchscreen + " " + ((bool)status ? Properties.Strings.On : Properties.Strings.Off), ToastIcon.Touchpad);
|
||||||
|
TouchscreenHelper.ToggleTouchscreen((bool)status);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void ToggleMic()
|
||||||
|
{
|
||||||
|
bool muteStatus = Audio.ToggleMute();
|
||||||
|
Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||||
|
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||||
|
}
|
||||||
|
|
||||||
static bool GetTouchpadState()
|
static bool GetTouchpadState()
|
||||||
{
|
{
|
||||||
using (var key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status", false))
|
using (var key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status", false))
|
||||||
@@ -777,7 +796,7 @@ namespace GHelper.Input
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Down, "Brightness");
|
SetBrightness(false, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 32: // FN+F8
|
case 32: // FN+F8
|
||||||
@@ -792,7 +811,7 @@ namespace GHelper.Input
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
|
SetBrightness(true, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 133: // Camera Toggle
|
case 133: // Camera Toggle
|
||||||
|
|||||||
@@ -270,9 +270,6 @@ namespace GHelper.Mode
|
|||||||
var stapmResult = SendCommand.set_stapm_limit((uint)limit_total * 1000);
|
var stapmResult = SendCommand.set_stapm_limit((uint)limit_total * 1000);
|
||||||
if (init) Logger.WriteLine($"STAPM: {limit_total} {stapmResult}");
|
if (init) Logger.WriteLine($"STAPM: {limit_total} {stapmResult}");
|
||||||
|
|
||||||
var stapmResult2 = SendCommand.set_stapm2_limit((uint)limit_total * 1000);
|
|
||||||
if (init) Logger.WriteLine($"STAPM2: {limit_total} {stapmResult2}");
|
|
||||||
|
|
||||||
var slowResult = SendCommand.set_slow_limit((uint)limit_slow * 1000);
|
var slowResult = SendCommand.set_slow_limit((uint)limit_slow * 1000);
|
||||||
if (init) Logger.WriteLine($"SLOW: {limit_slow} {slowResult}");
|
if (init) Logger.WriteLine($"SLOW: {limit_slow} {slowResult}");
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
public override int DPIIncrements()
|
public override int DPIIncrements()
|
||||||
{
|
{
|
||||||
return 100;
|
return 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -256,6 +256,8 @@ namespace GHelper
|
|||||||
settingsForm.AutoKeyboard();
|
settingsForm.AutoKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VisualControl.InitBrightness();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,6 +278,7 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return;
|
if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return;
|
||||||
|
if (AppConfig.Is("disable_power_event")) return;
|
||||||
SetAutoModes(true);
|
SetAutoModes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,13 +250,13 @@
|
|||||||
<value>Pabudęs</value>
|
<value>Pabudęs</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightLow" xml:space="preserve">
|
<data name="BacklightLow" xml:space="preserve">
|
||||||
<value>Low</value>
|
<value>Žem.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightMax" xml:space="preserve">
|
<data name="BacklightMax" xml:space="preserve">
|
||||||
<value>Max</value>
|
<value>Maks.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightMid" xml:space="preserve">
|
<data name="BacklightMid" xml:space="preserve">
|
||||||
<value>Mid</value>
|
<value>Vid.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightOff" xml:space="preserve">
|
<data name="BacklightOff" xml:space="preserve">
|
||||||
<value>Išjungta</value>
|
<value>Išjungta</value>
|
||||||
@@ -265,10 +265,10 @@
|
|||||||
<value>Laiko riba su lizdu / akumuliatoriumi (0 – ĮJUNGTA)</value>
|
<value>Laiko riba su lizdu / akumuliatoriumi (0 – ĮJUNGTA)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
<data name="BacklightTimeoutBattery" xml:space="preserve">
|
||||||
<value>Backlight Timeout when on battery</value>
|
<value>Foninio apšvietimo laikas akumuliatoriaus režimu</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BacklightTimeoutPlugged" xml:space="preserve">
|
<data name="BacklightTimeoutPlugged" xml:space="preserve">
|
||||||
<value>Backlight Timeout when plugged</value>
|
<value>Foninio apšvietimo laikas įkraunant</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Balanced" xml:space="preserve">
|
<data name="Balanced" xml:space="preserve">
|
||||||
<value>Balansuotas</value>
|
<value>Balansuotas</value>
|
||||||
@@ -519,7 +519,7 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Kairiojo jungiklio nejautrumo zonos</value>
|
<value>Kairiojo jungiklio nejautrumo zonos</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LTDeadzones" xml:space="preserve">
|
<data name="LTDeadzones" xml:space="preserve">
|
||||||
<value>Left Trigger Deadzones</value>
|
<value>Kairiojo jungiklio nejautrumo zonos</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MatrixAudio" xml:space="preserve">
|
<data name="MatrixAudio" xml:space="preserve">
|
||||||
<value>Garso vizualizatorius</value>
|
<value>Garso vizualizatorius</value>
|
||||||
@@ -585,13 +585,13 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Sinchronizuoti su pele</value>
|
<value>Sinchronizuoti su pele</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Multizone" xml:space="preserve">
|
<data name="Multizone" xml:space="preserve">
|
||||||
<value>Multi Zone</value>
|
<value>Kelios zonos</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MultizoneStrong" xml:space="preserve">
|
<data name="MultizoneStrong" xml:space="preserve">
|
||||||
<value>Multi Zone Strong</value>
|
<value>Kelių zonų stiprumas</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Muted" xml:space="preserve">
|
<data name="Muted" xml:space="preserve">
|
||||||
<value>Muted</value>
|
<value>Išjungta</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MuteMic" xml:space="preserve">
|
<data name="MuteMic" xml:space="preserve">
|
||||||
<value>Mikrofono nutildymas</value>
|
<value>Mikrofono nutildymas</value>
|
||||||
@@ -615,7 +615,7 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Įjungta</value>
|
<value>Įjungta</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OneZone" xml:space="preserve">
|
<data name="OneZone" xml:space="preserve">
|
||||||
<value>One Zone</value>
|
<value>Viena zona</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OpenGHelper" xml:space="preserve">
|
<data name="OpenGHelper" xml:space="preserve">
|
||||||
<value>Atidaryti G-Helper langą</value>
|
<value>Atidaryti G-Helper langą</value>
|
||||||
@@ -675,16 +675,16 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>RPM</value>
|
<value>RPM</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RSDeadzones" xml:space="preserve">
|
<data name="RSDeadzones" xml:space="preserve">
|
||||||
<value>Right Stick Deadzones</value>
|
<value>Dešiniojo jungiklio nejautrumo zonos</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RTDeadzones" xml:space="preserve">
|
<data name="RTDeadzones" xml:space="preserve">
|
||||||
<value>Right Trigger Deadzones</value>
|
<value>Dešiniojo jungiklio nejautrumo zonos</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RunOnStartup" xml:space="preserve">
|
<data name="RunOnStartup" xml:space="preserve">
|
||||||
<value>Paleisti įjungus sistemą</value>
|
<value>Paleisti įjungus sistemą</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ScalingQuality" xml:space="preserve">
|
<data name="ScalingQuality" xml:space="preserve">
|
||||||
<value>Scaling Quality</value>
|
<value>Mastelio kokybė</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ScreenPadDown" xml:space="preserve">
|
<data name="ScreenPadDown" xml:space="preserve">
|
||||||
<value>Ekrano skydelio ryškumo mažinimas</value>
|
<value>Ekrano skydelio ryškumo mažinimas</value>
|
||||||
@@ -741,10 +741,10 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Perjungti ekraną</value>
|
<value>Perjungti ekraną</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToggleTouchscreen" xml:space="preserve">
|
<data name="ToggleTouchscreen" xml:space="preserve">
|
||||||
<value>Toggle Touchscreen</value>
|
<value>Valdyti jutiklinį ekraną</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Touchscreen" xml:space="preserve">
|
<data name="Touchscreen" xml:space="preserve">
|
||||||
<value>Touchscreen</value>
|
<value>Jutiklinis ekranas</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Turbo" xml:space="preserve">
|
<data name="Turbo" xml:space="preserve">
|
||||||
<value>Turbo</value>
|
<value>Turbo</value>
|
||||||
@@ -765,7 +765,7 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Įtampos mažinimas yra eksperimentinė ir pavojinga funkcija. Jei pritaikytos reikšmės yra per mažos jūsų aparatinei įrangai, ji gali tapti nestabili, išsijungti arba pažeisti duomenų vientisumą. Jei norite pabandyti, iš pirmo pradėkite nuo mažų reikšmių, spustelėkite „Taikyti“ ir išbandykite, kas jums tinka.</value>
|
<value>Įtampos mažinimas yra eksperimentinė ir pavojinga funkcija. Jei pritaikytos reikšmės yra per mažos jūsų aparatinei įrangai, ji gali tapti nestabili, išsijungti arba pažeisti duomenų vientisumą. Jei norite pabandyti, iš pirmo pradėkite nuo mažų reikšmių, spustelėkite „Taikyti“ ir išbandykite, kas jums tinka.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Unmuted" xml:space="preserve">
|
<data name="Unmuted" xml:space="preserve">
|
||||||
<value>Unmuted</value>
|
<value>Įjungta</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Updates" xml:space="preserve">
|
<data name="Updates" xml:space="preserve">
|
||||||
<value>Naujinimai</value>
|
<value>Naujinimai</value>
|
||||||
@@ -798,24 +798,24 @@ Vis tiek norite tęsti?</value>
|
|||||||
<value>Visada rodyti programėlės langą viršuje</value>
|
<value>Visada rodyti programėlės langą viršuje</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Zoom" xml:space="preserve">
|
<data name="Zoom" xml:space="preserve">
|
||||||
<value>Zoom</value>
|
<value>Mastelis</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Donate" xml:space="preserve">
|
<data name="Donate" xml:space="preserve">
|
||||||
<value>Donate</value>
|
<value>Paremti</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Legend" xml:space="preserve">
|
<data name="Legend" xml:space="preserve">
|
||||||
<value>Legend</value>
|
<value>Legenda</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LegendGray" xml:space="preserve">
|
<data name="LegendGray" xml:space="preserve">
|
||||||
<value>Can't check local version</value>
|
<value>Nepavyko patikrinti vietinės versijos</value>
|
||||||
<comment>Can't check local version</comment>
|
<comment>Can't check local version</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="LegendRed" xml:space="preserve">
|
<data name="LegendRed" xml:space="preserve">
|
||||||
<value>Update Available</value>
|
<value>Išleista nauja versija</value>
|
||||||
<comment>Update Available</comment>
|
<comment>Update Available</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="LegendGreen" xml:space="preserve">
|
<data name="LegendGreen" xml:space="preserve">
|
||||||
<value>Updated</value>
|
<value>Atnaujinta</value>
|
||||||
<comment>Updated</comment>
|
<comment>Updated</comment>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<value>程式正在執行</value>
|
<value>程式正在執行</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AppAlreadyRunningText" xml:space="preserve">
|
<data name="AppAlreadyRunningText" xml:space="preserve">
|
||||||
<value>G-Helper正在執行。 請檢查右下系統匣。</value>
|
<value>G-Helper 正在執行。 請檢查右下系統匣。</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Apply" xml:space="preserve">
|
<data name="Apply" xml:space="preserve">
|
||||||
<value>套用</value>
|
<value>套用</value>
|
||||||
@@ -169,10 +169,10 @@
|
|||||||
<value>套用功率限制</value>
|
<value>套用功率限制</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
||||||
<value>自動調整Windows電源模式</value>
|
<value>自動調整 Windows 電源模式</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="APUMemory" xml:space="preserve">
|
<data name="APUMemory" xml:space="preserve">
|
||||||
<value>分配給GPU的記憶體</value>
|
<value>分配給 GPU 的記憶體</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AsusServicesRunning" xml:space="preserve">
|
<data name="AsusServicesRunning" xml:space="preserve">
|
||||||
<value>執行中的華碩服務</value>
|
<value>執行中的華碩服務</value>
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
<value>次要</value>
|
<value>次要</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
<data name="BiosAndDriverUpdates" xml:space="preserve">
|
||||||
<value>BIOS與驅動程式更新</value>
|
<value>BIOS 與驅動程式更新</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>開機時</value>
|
<value>開機時</value>
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ namespace Ryzen
|
|||||||
//PHEONIX - 9
|
//PHEONIX - 9
|
||||||
//RAPHAEL/DRAGON RANGE - 10
|
//RAPHAEL/DRAGON RANGE - 10
|
||||||
//MENDOCINO - 11
|
//MENDOCINO - 11
|
||||||
//HAWKPOINT/STRIXPOINT - 12
|
//HAWKPOINT - 12
|
||||||
|
//STRIXPOINT - 13
|
||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
@@ -129,7 +130,7 @@ namespace Ryzen
|
|||||||
|
|
||||||
if (CPUModel.Contains("Family " + Convert.ToString(26)) && CPUModel.Contains("Model " + Convert.ToString(36)))
|
if (CPUModel.Contains("Family " + Convert.ToString(26)) && CPUModel.Contains("Model " + Convert.ToString(36)))
|
||||||
{
|
{
|
||||||
FAMID = 12; //STRIXPOINT
|
FAMID = 13; //STRIXPOINT
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}");
|
Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}");
|
||||||
@@ -243,6 +244,16 @@ namespace Ryzen
|
|||||||
Smu.PSMU_ADDR_RSP = 0x3B10a80;
|
Smu.PSMU_ADDR_RSP = 0x3B10a80;
|
||||||
Smu.PSMU_ADDR_ARG = 0x3B10a88;
|
Smu.PSMU_ADDR_ARG = 0x3B10a88;
|
||||||
}
|
}
|
||||||
|
else if (FAMID == 13)
|
||||||
|
{
|
||||||
|
Smu.MP1_ADDR_MSG = 0x3B10928;
|
||||||
|
Smu.MP1_ADDR_RSP = 0x3B10978;
|
||||||
|
Smu.MP1_ADDR_ARG = 0x3B10998;
|
||||||
|
|
||||||
|
Smu.PSMU_ADDR_MSG = 0x3B10a20;
|
||||||
|
Smu.PSMU_ADDR_RSP = 0x3B10a80;
|
||||||
|
Smu.PSMU_ADDR_ARG = 0x3B10a88;
|
||||||
|
}
|
||||||
else if (FAMID == 4 || FAMID == 6)
|
else if (FAMID == 4 || FAMID == 6)
|
||||||
{
|
{
|
||||||
Smu.MP1_ADDR_MSG = 0x3B10530;
|
Smu.MP1_ADDR_MSG = 0x3B10530;
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ namespace Ryzen
|
|||||||
//PHEONIX - 9
|
//PHEONIX - 9
|
||||||
//RAPHAEL/DRAGON RANGE - 10
|
//RAPHAEL/DRAGON RANGE - 10
|
||||||
//MENDOCINO - 11
|
//MENDOCINO - 11
|
||||||
//HAWKPOINT/STRIXPOINT - 12
|
//HAWKPOINT - 12
|
||||||
|
//STRIXPOINT - 13
|
||||||
|
|
||||||
public static Smu RyzenAccess = new Smu(false);
|
public static Smu RyzenAccess = new Smu(false);
|
||||||
public static int FAMID = RyzenControl.FAMID;
|
public static int FAMID = RyzenControl.FAMID;
|
||||||
@@ -49,7 +50,8 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
RyzenAccess.SendMp1(0x14, ref Args);
|
case 13:
|
||||||
|
result = RyzenAccess.SendMp1(0x14, ref Args);
|
||||||
result = RyzenAccess.SendPsmu(0x31, ref Args);
|
result = RyzenAccess.SendPsmu(0x31, ref Args);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -61,32 +63,6 @@ namespace Ryzen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//STAMP2 Limit
|
|
||||||
public static Smu.Status? set_stapm2_limit(uint value)
|
|
||||||
{
|
|
||||||
RyzenAccess.Initialize();
|
|
||||||
uint[] Args = new uint[6];
|
|
||||||
Args[0] = value;
|
|
||||||
Smu.Status? result = null;
|
|
||||||
|
|
||||||
switch (FAMID)
|
|
||||||
{
|
|
||||||
case 3:
|
|
||||||
case 5:
|
|
||||||
case 7:
|
|
||||||
case 8:
|
|
||||||
case 9:
|
|
||||||
case 11:
|
|
||||||
case 12:
|
|
||||||
result = RyzenAccess.SendPsmu(0x31, ref Args);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
RyzenAccess.Deinitialize();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Fast Limit
|
//Fast Limit
|
||||||
public static Smu.Status? set_fast_limit(uint value)
|
public static Smu.Status? set_fast_limit(uint value)
|
||||||
{
|
{
|
||||||
@@ -109,7 +85,9 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
|
case 13:
|
||||||
result = RyzenAccess.SendMp1(0x15, ref Args);
|
result = RyzenAccess.SendMp1(0x15, ref Args);
|
||||||
|
result = RyzenAccess.SendPsmu(0x32, ref Args);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -140,7 +118,10 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
|
case 13:
|
||||||
result = RyzenAccess.SendMp1(0x16, ref Args);
|
result = RyzenAccess.SendMp1(0x16, ref Args);
|
||||||
|
result = RyzenAccess.SendPsmu(0x33, ref Args);
|
||||||
|
result = RyzenAccess.SendPsmu(0x34, ref Args);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -176,11 +157,12 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
|
case 13:
|
||||||
result = RyzenAccess.SendMp1(0x19, ref Args);
|
result = RyzenAccess.SendMp1(0x19, ref Args);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
case 6:
|
case 6:
|
||||||
RyzenAccess.SendMp1(0x23, ref Args);
|
result = RyzenAccess.SendMp1(0x23, ref Args);
|
||||||
result = RyzenAccess.SendPsmu(0x56, ref Args);
|
result = RyzenAccess.SendPsmu(0x56, ref Args);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@@ -194,37 +176,6 @@ namespace Ryzen
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Skin Temp limit
|
|
||||||
public static Smu.Status? set_apu_skin_temp_limit(uint value)
|
|
||||||
{
|
|
||||||
RyzenAccess.Initialize();
|
|
||||||
uint[] Args = new uint[6];
|
|
||||||
Args[0] = value;
|
|
||||||
|
|
||||||
Smu.Status? result = null;
|
|
||||||
|
|
||||||
switch (FAMID)
|
|
||||||
{
|
|
||||||
case 5:
|
|
||||||
case 8:
|
|
||||||
case 9:
|
|
||||||
case 11:
|
|
||||||
case 12:
|
|
||||||
result = RyzenAccess.SendMp1(0x33, ref Args);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
case 7:
|
|
||||||
result = RyzenAccess.SendMp1(0x38, ref Args);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
RyzenAccess.Deinitialize();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Set All Core Curve Optimiser
|
//Set All Core Curve Optimiser
|
||||||
public static Smu.Status? set_coall(int value)
|
public static Smu.Status? set_coall(int value)
|
||||||
{
|
{
|
||||||
@@ -241,12 +192,12 @@ namespace Ryzen
|
|||||||
{
|
{
|
||||||
case 3:
|
case 3:
|
||||||
case 7:
|
case 7:
|
||||||
RyzenAccess.SendMp1(0x55, ref Args);
|
result = RyzenAccess.SendMp1(0x55, ref Args);
|
||||||
result = RyzenAccess.SendPsmu(0xB1, ref Args);
|
result = RyzenAccess.SendPsmu(0xB1, ref Args);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
case 6:
|
case 6:
|
||||||
RyzenAccess.SendMp1(0x36, ref Args);
|
result = RyzenAccess.SendMp1(0x36, ref Args);
|
||||||
result = RyzenAccess.SendPsmu(0xB, ref Args);
|
result = RyzenAccess.SendPsmu(0xB, ref Args);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@@ -254,6 +205,7 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
|
case 13:
|
||||||
result = RyzenAccess.SendPsmu(0x5D, ref Args);
|
result = RyzenAccess.SendPsmu(0x5D, ref Args);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@@ -285,7 +237,7 @@ namespace Ryzen
|
|||||||
{
|
{
|
||||||
case 3:
|
case 3:
|
||||||
case 7:
|
case 7:
|
||||||
RyzenAccess.SendMp1(0x64, ref Args);
|
result = RyzenAccess.SendMp1(0x64, ref Args);
|
||||||
result = RyzenAccess.SendPsmu(0x57, ref Args);
|
result = RyzenAccess.SendPsmu(0x57, ref Args);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@@ -293,6 +245,7 @@ namespace Ryzen
|
|||||||
case 9:
|
case 9:
|
||||||
case 11:
|
case 11:
|
||||||
case 12:
|
case 12:
|
||||||
|
case 13:
|
||||||
result = RyzenAccess.SendPsmu(0xb7, ref Args);
|
result = RyzenAccess.SendPsmu(0xb7, ref Args);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ namespace GHelper
|
|||||||
Invoke(delegate
|
Invoke(delegate
|
||||||
{
|
{
|
||||||
sliderGammaIgnore = true;
|
sliderGammaIgnore = true;
|
||||||
sliderGamma.Value = AppConfig.Get("brightness", 100);
|
sliderGamma.Value = VisualControl.GetBrightness();
|
||||||
labelGamma.Text = sliderGamma.Value + "%";
|
labelGamma.Text = sliderGamma.Value + "%";
|
||||||
sliderGammaIgnore = false;
|
sliderGammaIgnore = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -226,13 +226,10 @@ namespace GHelper
|
|||||||
|
|
||||||
public void _VisualiseNewCount(int updatesCount, TableLayoutPanel table)
|
public void _VisualiseNewCount(int updatesCount, TableLayoutPanel table)
|
||||||
{
|
{
|
||||||
Invoke(delegate
|
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
|
||||||
{
|
labelUpdates.ForeColor = colorTurbo;
|
||||||
labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}";
|
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
|
||||||
labelUpdates.ForeColor = colorTurbo;
|
panelBios.AccessibleName = labelUpdates.Text;
|
||||||
labelUpdates.Font = new Font(labelUpdates.Font, FontStyle.Bold);
|
|
||||||
panelBios.AccessibleName = labelUpdates.Text;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static string CleanupDeviceId(string input)
|
static string CleanupDeviceId(string input)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra load and unnecessary services.
|
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra load and unnecessary services.
|
||||||
|
|
||||||
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, DUO, TUF Series, Strix or Scar Series, ProArt, Vivobook, Zenbook, ROG Ally / Ally X and many more!
|
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, DUO, TUF Series, Strix or Scar Series, ProArt, Vivobook, Zenbook, ROG Ally or Ally X and many more!
|
||||||
|
|
||||||
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
|
||||||
**⭐ If you like the app - please spread the word about it online**
|
**⭐ If you like the app - please spread the word about it online**
|
||||||
|
|||||||
Reference in New Issue
Block a user