Compare commits

..

22 Commits

Author SHA1 Message Date
Serge
d3de136dd3 Exception handling 2023-06-17 12:32:58 +02:00
Serge
0b030da41b Undervolting 2023-06-17 10:32:30 +02:00
Serge
05aae069b4 Update README.md 2023-06-15 12:29:44 +02:00
Serge
28e949bee4 Power modes fix 2023-06-15 12:21:48 +02:00
Serge
9a82a54b04 Verion bump 2023-06-15 00:14:08 +02:00
Serge
8aff60546a UI Fixes 2023-06-15 00:09:00 +02:00
Serge Samusya
d5039207ec Rog Ally Aura support 2023-06-15 00:04:33 +02:00
Serge
f940d343c3 Translations update 2023-06-14 09:19:17 +02:00
Serge
1848612434 UI Tweaks 2023-06-14 09:17:45 +02:00
Serge
fe253de0e1 Merge pull request #618 from weslleykawan/patch-2
(PT-BR) Translation Update 2 (Strings.pt-br.resx)
2023-06-14 09:16:52 +02:00
Weslley K
7211fd5f22 (PT-BR) Translation Update 2 (Strings.pt-br.resx)
- Resolved previous translation issues

- Updated:
 
 <data name="AutoRefreshTooltip" xml:space="preserve">
    <value>Menor taxa de atualização quando estiver na bateria</value>
  </data>

  <data name="MinRefreshTooltip" xml:space="preserve">
    <value>Taxa de atualização à 60Hz para economizar bateria</value>
  </data>

  <data name="MaxRefreshTooltip" xml:space="preserve">
    <value>Taxa de atualização máxima e menor latência</value>
  </data>

Please offer a version so I can test if everything is working as it should.

I want to be part of the PT-BR translation of this project from now on.
2023-06-13 20:33:58 -03:00
Serge
c1a8eb12f9 Merge pull request #616 from weslleykawan/patch-1
(PT-BR) Translation update (Strings.pt-br.resx)
2023-06-13 16:51:24 +02:00
Weslley K
0477d03ecc (PT-BR) Translation update (Strings.pt-br.resx)
Added/updated strings:

    <data name="VolumeDown" xml:space="preserve">
    <value>Abaixar o volume</value>
  </data>

  <data name="VolumeUp" xml:space="preserve">
    <value>Aumentar o volume</value>
  </data>

    <data name="VolumeMute" xml:space="preserve">
    <value>Silenciar microfone</value>
  </data>

  <data name="WindowTop" xml:space="preserve">
    <value>Manter a janela do aplicativo sempre no topo</value>
  </data>

   <data name="Updates" xml:space="preserve">
    <value>Atualizações</value>
  </data>

    <data name="FnLock" xml:space="preserve">
    <value>Processar teclas de atalho Fn+F sem pressionar Fn</value>
  </data>

   <data name="KillGpuApps" xml:space="preserve">
    <value>Parar todos os aplicativos que usam a GPU ao alternar para o modo Eco</value>
  </data>

  <data name="Boot" xml:space="preserve">
    <value>Ao ligar</value>
  </data>

  <data name="Brightness" xml:space="preserve">
    <value>Nível do brilho</value>
  </data>

  <data name="BacklightTimeout" xml:space="preserve">
    <value>Tempo limite da iluminação na bateria (em segundos)</value>
  </data>

    <data name="BacklightTimeoutPlugged" xml:space="preserve">
    <value>Tempo limite da iluminação carregando (0 - sempre ligado)</value>
  </data>

  <data name="LaptopBacklight" xml:space="preserve">
    <value>Configurações de iluminação</value>
  </data>

  <data name="ApplyWindowsPowerPlan" xml:space="preserve">
    <value>Ajuste automático dos modos de energia do Windows</value>
  </data>

    <data name="AsusServicesRunning" xml:space="preserve">
    <value>Serviços da Asus em execução</value>
  </data>

<data name="Start" xml:space="preserve">
    <value>Iniciar</value>
  </data>
  <data name="StartingServices" xml:space="preserve">
    <value>Iniciando os serviços</value>
  </data>
  <data name="StartupError" xml:space="preserve">
    <value>Erro de inicialização</value>
  </data>
  <data name="Stop" xml:space="preserve">
    <value>Parar</value>
  </data>
  <data name="StoppingServices" xml:space="preserve">
    <value>Parando os serviços</value>
  </data>
2023-06-13 10:30:31 -03:00
Serge
e923d82732 Update README.md 2023-06-13 12:34:11 +02:00
Serge
6558d66e8d Update README.md 2023-06-13 12:21:21 +02:00
Serge
ec8605dfe6 UI Fixes 2023-06-13 00:54:11 +02:00
Serge
ac462b628f Driver updater fix, new turbo boost modes 2023-06-12 19:07:57 +02:00
Serge
1cd9c30c4a UI Tweaks 2023-06-12 14:41:47 +02:00
Serge
c575b17aba UI Tweaks 2023-06-11 23:32:13 +02:00
Serge
d2e0e6f51e Colors for custom modes 2023-06-11 17:09:17 +02:00
Serge
0dae1c9115 Custom mode renaming 2023-06-11 14:50:01 +02:00
Serge
16e085d9f1 Custom modes 2023-06-11 00:27:58 +02:00
53 changed files with 4380 additions and 965 deletions

View File

@@ -42,10 +42,10 @@ namespace GHelper.AnimeMatrix
if (!IsValid) return;
int brightness = AppConfig.getConfig("matrix_brightness");
int running = AppConfig.getConfig("matrix_running");
int brightness = AppConfig.Get("matrix_brightness");
int running = AppConfig.Get("matrix_running");
bool auto = AppConfig.getConfig("matrix_auto") == 1;
bool auto = AppConfig.Is("matrix_auto");
if (brightness < 0) brightness = 0;
if (running < 0) running = 0;
@@ -75,7 +75,7 @@ namespace GHelper.AnimeMatrix
switch (running)
{
case 2:
SetMatrixPicture(AppConfig.getConfigString("matrix_picture"));
SetMatrixPicture(AppConfig.GetString("matrix_picture"));
break;
case 3:
SetMatrixClock();
@@ -110,7 +110,7 @@ namespace GHelper.AnimeMatrix
{
//if (!IsValid) return;
switch (AppConfig.getConfig("matrix_running"))
switch (AppConfig.Get("matrix_running"))
{
case 2:
mat.PresentNextFrame();

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using GHelper;
using System.Diagnostics;
using System.Management;
using System.Text.Json;
@@ -13,8 +14,18 @@ public static class AppConfig
static AppConfig()
{
string startupPath = Application.StartupPath.Trim('\\');
string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
configFile = appPath + "\\config.json";
string configName = "\\config.json";
if (File.Exists(startupPath + configName))
{
configFile = startupPath + configName;
} else
{
configFile = appPath + configName;
}
if (!System.IO.Directory.Exists(appPath))
System.IO.Directory.CreateDirectory(appPath);
@@ -28,12 +39,13 @@ public static class AppConfig
}
catch
{
initConfig();
Logger.WriteLine("Broken config: " + text);
Init();
}
}
else
{
initConfig();
Init();
}
}
@@ -64,7 +76,7 @@ public static class AppConfig
}
private static void initConfig()
private static void Init()
{
config = new Dictionary<string, object>();
config["performance_mode"] = 0;
@@ -72,41 +84,27 @@ public static class AppConfig
File.WriteAllText(configFile, jsonString);
}
public static int getConfig(string name, int empty = -1)
public static int Get(string name, int empty = -1)
{
if (config.ContainsKey(name))
return int.Parse(config[name].ToString());
else return empty;
}
public static bool isConfig(string name)
public static bool Is(string name)
{
return getConfig(name) == 1;
return Get(name) == 1;
}
public static string getConfigString(string name, string empty = null)
public static string GetString(string name, string empty = null)
{
if (config.ContainsKey(name))
return config[name].ToString();
else return empty;
}
public static void setConfig(string name, int value)
private static void Write()
{
config[name] = value;
string jsonString = JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true });
try
{
File.WriteAllText(configFile, jsonString);
} catch (Exception e)
{
Debug.Write(e.ToString());
}
}
public static void setConfig(string name, string value)
{
config[name] = value;
string jsonString = JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true });
try
{
@@ -118,9 +116,26 @@ public static class AppConfig
}
}
public static string getParamName(AsusFan device, string paramName = "fan_profile")
public static void Set(string name, int value)
{
int mode = getConfig("performance_mode");
config[name] = value;
Write();
}
public static void Set(string name, string value)
{
config[name] = value;
Write();
}
public static void Remove(string name)
{
config.Remove(name);
Write();
}
public static string GgetParamName(AsusFan device, string paramName = "fan_profile")
{
int mode = Modes.GetCurrent();
string name;
switch (device)
@@ -143,9 +158,9 @@ public static class AppConfig
return paramName + "_" + name + "_" + mode;
}
public static byte[] getFanConfig(AsusFan device)
public static byte[] GetFanConfig(AsusFan device)
{
string curveString = getConfigString(getParamName(device));
string curveString = GetString(GgetParamName(device));
byte[] curve = { };
if (curveString is not null)
@@ -154,10 +169,10 @@ public static class AppConfig
return curve;
}
public static void setFanConfig(AsusFan device, byte[] curve)
public static void SetFanConfig(AsusFan device, byte[] curve)
{
string bitCurve = BitConverter.ToString(curve);
setConfig(getParamName(device), bitCurve);
Set(GgetParamName(device), bitCurve);
}
@@ -169,9 +184,9 @@ public static class AppConfig
return array;
}
public static byte[] getDefaultCurve(AsusFan device)
public static byte[] GetDefaultCurve(AsusFan device)
{
int mode = getConfig("performance_mode");
int mode = Modes.GetCurrentBase();
byte[] curve;
switch (mode)
@@ -199,29 +214,29 @@ public static class AppConfig
return curve;
}
public static string getConfigPerfString(string name)
public static string GetModeString(string name)
{
int mode = getConfig("performance_mode");
return getConfigString(name + "_" + mode);
return GetString(name + "_" + Modes.GetCurrent());
}
public static int getConfigPerf(string name)
public static int GetMode(string name, int empty = -1)
{
int mode = getConfig("performance_mode");
return getConfig(name + "_" + mode);
return Get(name + "_" + Modes.GetCurrent(), empty);
}
public static bool isConfigPerf(string name)
public static bool IsMode(string name)
{
int mode = getConfig("performance_mode");
return getConfig(name + "_" + mode) == 1;
return Get(name + "_" + Modes.GetCurrent()) == 1;
}
public static void setConfigPerf(string name, int value)
public static void SetMode(string name, int value)
{
int mode = getConfig("performance_mode");
setConfig(name + "_" + mode, value);
Set(name + "_" + Modes.GetCurrent(), value);
}
public static void SetMode(string name, string value)
{
Set(name + "_" + Modes.GetCurrent(), value);
}
}

View File

@@ -107,11 +107,11 @@ public class AsusACPI
public const int GPUModeUltimate = 2;
public const int MaxTotal = 250;
public const int MaxTotal = 150;
public const int MinTotal = 5;
public const int DefaultTotal = 125;
public const int MaxCPU = 130;
public const int MaxCPU = 100;
public const int MinCPU = 5;
public const int DefaultCPU = 80;
@@ -428,7 +428,6 @@ public class AsusACPI
return DeviceGet(PPT_CPUB0) >= 0 && DeviceGet(PPT_GPUC0) < 0;
}
/*
public void ScanRange()
{
int value;
@@ -446,7 +445,6 @@ public class AsusACPI
}
}
*/
public void TUFKeyboardBrightness(int brightness)
{

View File

@@ -66,7 +66,7 @@ namespace GHelper
static byte[] MESSAGE_SET = { AURA_HID_ID, 0xb5, 0, 0, 0 };
static byte[] MESSAGE_APPLY = { AURA_HID_ID, 0xb4 };
static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6 };
static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6, 0x1abe };
private static int mode = 0;
private static int speed = 1;

View File

@@ -12,6 +12,8 @@ namespace CustomControls
public static Color colorEco = Color.FromArgb(255, 6, 180, 138);
public static Color colorStandard = Color.FromArgb(255, 58, 174, 239);
public static Color colorTurbo = Color.FromArgb(255, 255, 32, 32);
public static Color colorCustom = Color.FromArgb(255, 255, 128, 0);
public static Color buttonMain;
public static Color buttonSecond;

10
app/Extra.Designer.cs generated
View File

@@ -119,8 +119,8 @@ namespace GHelper
groupBindings.Location = new Point(9, 11);
groupBindings.Margin = new Padding(4, 2, 4, 2);
groupBindings.Name = "groupBindings";
groupBindings.Padding = new Padding(4, 2, 50, 2);
groupBindings.Size = new Size(966, 343);
groupBindings.Padding = new Padding(4, 2, 50, 10);
groupBindings.Size = new Size(966, 351);
groupBindings.TabIndex = 0;
groupBindings.TabStop = false;
groupBindings.Text = "Key Bindings";
@@ -380,7 +380,7 @@ namespace GHelper
groupLight.Controls.Add(panelXMG);
groupLight.Controls.Add(tableBacklight);
groupLight.Dock = DockStyle.Top;
groupLight.Location = new Point(9, 354);
groupLight.Location = new Point(9, 362);
groupLight.Margin = new Padding(4, 2, 4, 2);
groupLight.Name = "groupLight";
groupLight.Padding = new Padding(4, 2, 4, 11);
@@ -804,7 +804,7 @@ namespace GHelper
groupOther.Controls.Add(checkGpuApps);
groupOther.Controls.Add(checkFnLock);
groupOther.Dock = DockStyle.Top;
groupOther.Location = new Point(9, 880);
groupOther.Location = new Point(9, 888);
groupOther.Margin = new Padding(4, 2, 4, 2);
groupOther.Name = "groupOther";
groupOther.Padding = new Padding(20, 2, 4, 10);
@@ -903,7 +903,7 @@ namespace GHelper
panelServices.Controls.Add(labelServices);
panelServices.Controls.Add(buttonServices);
panelServices.Dock = DockStyle.Top;
panelServices.Location = new Point(9, 1176);
panelServices.Location = new Point(9, 1184);
panelServices.Name = "panelServices";
panelServices.Size = new Size(966, 72);
panelServices.TabIndex = 3;

View File

@@ -55,7 +55,7 @@ namespace GHelper
combo.DisplayMember = "Value";
combo.ValueMember = "Key";
string action = AppConfig.getConfigString(name);
string action = AppConfig.GetString(name);
combo.SelectedValue = (action is not null) ? action : "";
if (combo.SelectedValue is null) combo.SelectedValue = "";
@@ -63,17 +63,17 @@ namespace GHelper
combo.SelectedValueChanged += delegate
{
if (combo.SelectedValue is not null)
AppConfig.setConfig(name, combo.SelectedValue.ToString());
AppConfig.Set(name, combo.SelectedValue.ToString());
if (name == "m1" || name == "m2")
Program.inputDispatcher.RegisterKeys();
};
txbox.Text = AppConfig.getConfigString(name + "_custom");
txbox.Text = AppConfig.GetString(name + "_custom");
txbox.TextChanged += delegate
{
AppConfig.setConfig(name + "_custom", txbox.Text);
AppConfig.Set(name + "_custom", txbox.Text);
};
}
@@ -130,28 +130,28 @@ namespace GHelper
comboKeyboardSpeed.SelectedValueChanged += ComboKeyboardSpeed_SelectedValueChanged;
// Keyboard
checkAwake.Checked = !(AppConfig.getConfig("keyboard_awake") == 0);
checkBoot.Checked = !(AppConfig.getConfig("keyboard_boot") == 0);
checkSleep.Checked = !(AppConfig.getConfig("keyboard_sleep") == 0);
checkShutdown.Checked = !(AppConfig.getConfig("keyboard_shutdown") == 0);
checkAwake.Checked = !(AppConfig.Get("keyboard_awake") == 0);
checkBoot.Checked = !(AppConfig.Get("keyboard_boot") == 0);
checkSleep.Checked = !(AppConfig.Get("keyboard_sleep") == 0);
checkShutdown.Checked = !(AppConfig.Get("keyboard_shutdown") == 0);
// Lightbar
checkAwakeBar.Checked = !(AppConfig.getConfig("keyboard_awake_bar") == 0);
checkBootBar.Checked = !(AppConfig.getConfig("keyboard_boot_bar") == 0);
checkSleepBar.Checked = !(AppConfig.getConfig("keyboard_sleep_bar") == 0);
checkShutdownBar.Checked = !(AppConfig.getConfig("keyboard_shutdown_bar") == 0);
checkAwakeBar.Checked = !(AppConfig.Get("keyboard_awake_bar") == 0);
checkBootBar.Checked = !(AppConfig.Get("keyboard_boot_bar") == 0);
checkSleepBar.Checked = !(AppConfig.Get("keyboard_sleep_bar") == 0);
checkShutdownBar.Checked = !(AppConfig.Get("keyboard_shutdown_bar") == 0);
// Lid
checkAwakeLid.Checked = !(AppConfig.getConfig("keyboard_awake_lid") == 0);
checkBootLid.Checked = !(AppConfig.getConfig("keyboard_boot_lid") == 0);
checkSleepLid.Checked = !(AppConfig.getConfig("keyboard_sleep_lid") == 0);
checkShutdownLid.Checked = !(AppConfig.getConfig("keyboard_shutdown_lid") == 0);
checkAwakeLid.Checked = !(AppConfig.Get("keyboard_awake_lid") == 0);
checkBootLid.Checked = !(AppConfig.Get("keyboard_boot_lid") == 0);
checkSleepLid.Checked = !(AppConfig.Get("keyboard_sleep_lid") == 0);
checkShutdownLid.Checked = !(AppConfig.Get("keyboard_shutdown_lid") == 0);
// Logo
checkAwakeLogo.Checked = !(AppConfig.getConfig("keyboard_awake_logo") == 0);
checkBootLogo.Checked = !(AppConfig.getConfig("keyboard_boot_logo") == 0);
checkSleepLogo.Checked = !(AppConfig.getConfig("keyboard_sleep_logo") == 0);
checkShutdownLogo.Checked = !(AppConfig.getConfig("keyboard_shutdown_logo") == 0);
checkAwakeLogo.Checked = !(AppConfig.Get("keyboard_awake_logo") == 0);
checkBootLogo.Checked = !(AppConfig.Get("keyboard_boot_logo") == 0);
checkSleepLogo.Checked = !(AppConfig.Get("keyboard_sleep_logo") == 0);
checkShutdownLogo.Checked = !(AppConfig.Get("keyboard_shutdown_logo") == 0);
checkAwake.CheckedChanged += CheckPower_CheckedChanged;
checkBoot.CheckedChanged += CheckPower_CheckedChanged;
@@ -197,35 +197,35 @@ namespace GHelper
}
}
checkTopmost.Checked = (AppConfig.getConfig("topmost") == 1);
checkTopmost.Checked = AppConfig.Is("topmost");
checkTopmost.CheckedChanged += CheckTopmost_CheckedChanged; ;
checkNoOverdrive.Checked = (AppConfig.getConfig("no_overdrive") == 1);
checkNoOverdrive.Checked = AppConfig.Is("no_overdrive");
checkNoOverdrive.CheckedChanged += CheckNoOverdrive_CheckedChanged;
checkUSBC.Checked = (AppConfig.getConfig("optimized_usbc") == 1);
checkUSBC.Checked = AppConfig.Is("optimized_usbc");
checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged;
checkAutoApplyWindowsPowerMode.Checked = (AppConfig.getConfig("auto_apply_power_plan") != 0);
checkAutoApplyWindowsPowerMode.Checked = (AppConfig.Get("auto_apply_power_plan") != 0);
checkAutoApplyWindowsPowerMode.CheckedChanged += checkAutoApplyWindowsPowerMode_CheckedChanged;
trackBrightness.Value = InputDispatcher.GetBacklight();
trackBrightness.Scroll += TrackBrightness_Scroll;
panelXMG.Visible = (Program.acpi.DeviceGet(AsusACPI.GPUXGConnected) == 1);
checkXMG.Checked = !(AppConfig.getConfig("xmg_light") == 0);
checkXMG.Checked = !(AppConfig.Get("xmg_light") == 0);
checkXMG.CheckedChanged += CheckXMG_CheckedChanged;
numericBacklightTime.Value = AppConfig.getConfig("keyboard_timeout", 60);
numericBacklightPluggedTime.Value = AppConfig.getConfig("keyboard_ac_timeout", 0);
numericBacklightTime.Value = AppConfig.Get("keyboard_timeout", 60);
numericBacklightPluggedTime.Value = AppConfig.Get("keyboard_ac_timeout", 0);
numericBacklightTime.ValueChanged += NumericBacklightTime_ValueChanged;
numericBacklightPluggedTime.ValueChanged += NumericBacklightTime_ValueChanged;
checkGpuApps.Checked = AppConfig.isConfig("kill_gpu_apps");
checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps");
checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged;
checkFnLock.Checked = AppConfig.isConfig("fn_lock");
checkFnLock.Checked = AppConfig.Is("fn_lock");
checkFnLock.CheckedChanged += CheckFnLock_CheckedChanged; ;
pictureHelp.Click += PictureHelp_Click;
@@ -325,7 +325,7 @@ namespace GHelper
private void CheckFnLock_CheckedChanged(object? sender, EventArgs e)
{
int fnLock = checkFnLock.Checked ? 1 : 0;
AppConfig.setConfig("fn_lock", fnLock);
AppConfig.Set("fn_lock", fnLock);
Program.acpi.DeviceSet(AsusACPI.FnLock, (fnLock == 1) ? 0 : 1, "FnLock");
Program.inputDispatcher.RegisterKeys();
@@ -333,31 +333,31 @@ namespace GHelper
private void CheckGpuApps_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("kill_gpu_apps", (checkGpuApps.Checked ? 1 : 0));
AppConfig.Set("kill_gpu_apps", (checkGpuApps.Checked ? 1 : 0));
}
private void NumericBacklightTime_ValueChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("keyboard_timeout", (int)numericBacklightTime.Value);
AppConfig.setConfig("keyboard_ac_timeout", (int)numericBacklightPluggedTime.Value);
AppConfig.Set("keyboard_timeout", (int)numericBacklightTime.Value);
AppConfig.Set("keyboard_ac_timeout", (int)numericBacklightPluggedTime.Value);
Program.inputDispatcher.InitBacklightTimer();
}
private void CheckXMG_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("xmg_light", (checkXMG.Checked ? 1 : 0));
AppConfig.Set("xmg_light", (checkXMG.Checked ? 1 : 0));
AsusUSB.ApplyXGMLight(checkXMG.Checked);
}
private void CheckUSBC_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("optimized_usbc", (checkUSBC.Checked ? 1 : 0));
AppConfig.Set("optimized_usbc", (checkUSBC.Checked ? 1 : 0));
}
private void TrackBrightness_Scroll(object? sender, EventArgs e)
{
AppConfig.setConfig("keyboard_brightness", trackBrightness.Value);
AppConfig.setConfig("keyboard_brightness_ac", trackBrightness.Value);
AppConfig.Set("keyboard_brightness", trackBrightness.Value);
AppConfig.Set("keyboard_brightness_ac", trackBrightness.Value);
AsusUSB.ApplyBrightness(trackBrightness.Value, "Slider");
}
@@ -368,38 +368,38 @@ namespace GHelper
private void CheckNoOverdrive_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("no_overdrive", (checkNoOverdrive.Checked ? 1 : 0));
AppConfig.Set("no_overdrive", (checkNoOverdrive.Checked ? 1 : 0));
Program.settingsForm.AutoScreen(true);
}
private void CheckTopmost_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("topmost", (checkTopmost.Checked ? 1 : 0));
AppConfig.Set("topmost", (checkTopmost.Checked ? 1 : 0));
Program.settingsForm.TopMost = checkTopmost.Checked;
}
private void CheckPower_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("keyboard_awake", (checkAwake.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_boot", (checkBoot.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_sleep", (checkSleep.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_shutdown", (checkShutdown.Checked ? 1 : 0));
AppConfig.Set("keyboard_awake", (checkAwake.Checked ? 1 : 0));
AppConfig.Set("keyboard_boot", (checkBoot.Checked ? 1 : 0));
AppConfig.Set("keyboard_sleep", (checkSleep.Checked ? 1 : 0));
AppConfig.Set("keyboard_shutdown", (checkShutdown.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_awake_bar", (checkAwakeBar.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_boot_bar", (checkBootBar.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_sleep_bar", (checkSleepBar.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_shutdown_bar", (checkShutdownBar.Checked ? 1 : 0));
AppConfig.Set("keyboard_awake_bar", (checkAwakeBar.Checked ? 1 : 0));
AppConfig.Set("keyboard_boot_bar", (checkBootBar.Checked ? 1 : 0));
AppConfig.Set("keyboard_sleep_bar", (checkSleepBar.Checked ? 1 : 0));
AppConfig.Set("keyboard_shutdown_bar", (checkShutdownBar.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_awake_lid", (checkAwakeLid.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_boot_lid", (checkBootLid.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_sleep_lid", (checkSleepLid.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_shutdown_lid", (checkShutdownLid.Checked ? 1 : 0));
AppConfig.Set("keyboard_awake_lid", (checkAwakeLid.Checked ? 1 : 0));
AppConfig.Set("keyboard_boot_lid", (checkBootLid.Checked ? 1 : 0));
AppConfig.Set("keyboard_sleep_lid", (checkSleepLid.Checked ? 1 : 0));
AppConfig.Set("keyboard_shutdown_lid", (checkShutdownLid.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_awake_logo", (checkAwakeLogo.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_boot_logo", (checkBootLogo.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_sleep_logo", (checkSleepLogo.Checked ? 1 : 0));
AppConfig.setConfig("keyboard_shutdown_logo", (checkShutdownLogo.Checked ? 1 : 0));
AppConfig.Set("keyboard_awake_logo", (checkAwakeLogo.Checked ? 1 : 0));
AppConfig.Set("keyboard_boot_logo", (checkBootLogo.Checked ? 1 : 0));
AppConfig.Set("keyboard_sleep_logo", (checkSleepLogo.Checked ? 1 : 0));
AppConfig.Set("keyboard_shutdown_logo", (checkShutdownLogo.Checked ? 1 : 0));
List<AuraDev19b6> flags = new List<AuraDev19b6>();
@@ -429,7 +429,7 @@ namespace GHelper
private void ComboKeyboardSpeed_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("aura_speed", (int)comboKeyboardSpeed.SelectedValue);
AppConfig.Set("aura_speed", (int)comboKeyboardSpeed.SelectedValue);
Program.settingsForm.SetAura();
}
@@ -450,7 +450,7 @@ namespace GHelper
private void checkAutoApplyWindowsPowerMode_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0);
AppConfig.Set("auto_apply_power_plan", checkAutoApplyWindowsPowerMode.Checked ? 1 : 0);
}
}
}

800
app/Fans.Designer.cs generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,10 @@
using CustomControls;
using GHelper.Gpu;
using Ryzen;
using System;
using System.Diagnostics;
using System.Net.Sockets;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace GHelper
@@ -19,7 +22,7 @@ namespace GHelper
static int MinRPM, MaxRPM;
static bool powerVisible = true, gpuVisible = true;
static bool gpuVisible = true;
const int fansMax = 100;
@@ -30,9 +33,12 @@ namespace GHelper
InitializeComponent();
//float dpi = ControlHelper.GetDpiScale(this).Value;
//comboModes.Size = new Size(comboModes.Width, (int)dpi * 18);
comboModes.ClientSize = new Size(comboModes.Width, comboModes.Height - 4);
Text = Properties.Strings.FansAndPower;
labelPowerLimits.Text = Properties.Strings.PowerLimits;
labelInfo.Text = Properties.Strings.PPTExperimental;
checkApplyPower.Text = Properties.Strings.ApplyPowerLimits;
labelFans.Text = Properties.Strings.FanCurves;
@@ -47,7 +53,7 @@ namespace GHelper
labelGPUBoostTitle.Text = Properties.Strings.GPUBoost;
labelGPUTempTitle.Text = Properties.Strings.GPUTempTarget;
InitTheme();
InitTheme(true);
MinRPM = 18;
MaxRPM = HardwareControl.GetFanMax();
@@ -124,21 +130,225 @@ namespace GHelper
trackGPUTemp.MouseUp += TrackGPU_MouseUp;
//labelInfo.MaximumSize = new Size(280, 0);
labelInfo.Text = Properties.Strings.PPTExperimental;
labelFansResult.Visible = false;
InitFans();
InitPower();
InitBoost();
InitGPU(true);
FillModes();
InitAll();
comboBoost.SelectedValueChanged += ComboBoost_Changed;
comboModes.SelectionChangeCommitted += ComboModes_SelectedValueChanged;
comboModes.TextChanged += ComboModes_TextChanged;
comboModes.KeyPress += ComboModes_KeyPress;
Shown += Fans_Shown;
buttonAdd.Click += ButtonAdd_Click;
buttonRemove.Click += ButtonRemove_Click;
buttonRename.Click += ButtonRename_Click;
trackUV.Minimum = -30;
trackUV.Maximum = 0;
trackUViGPU.Minimum = -20;
trackUViGPU.Maximum = 0;
trackUV.Scroll += TrackUV_Scroll;
trackUViGPU.Scroll += TrackUV_Scroll;
buttonApplyAdvanced.Click += ButtonApplyAdvanced_Click;
buttonCPU.BorderColor = colorStandard;
buttonGPU.BorderColor = colorTurbo;
buttonAdvanced.BorderColor = Color.Gray;
buttonCPU.Click += ButtonCPU_Click;
buttonGPU.Click += ButtonGPU_Click;
buttonAdvanced.Click += ButtonAdvanced_Click;
checkApplyUV.Click += CheckApplyUV_Click;
ToggleNavigation(0);
}
private void CheckApplyUV_Click(object? sender, EventArgs e)
{
AppConfig.SetMode("auto_uv", checkApplyUV.Checked ? 1 : 0);
}
public void InitAll()
{
InitMode();
InitFans();
InitPower();
InitBoost();
InitUV();
InitGPU();
}
public void ToggleNavigation(int index = 0)
{
SuspendLayout();
buttonCPU.Activated = false;
buttonGPU.Activated = false;
buttonAdvanced.Activated = false;
panelPower.Visible = false;
panelGPU.Visible = false;
panelAdvanced.Visible = false;
switch (index)
{
case 1:
buttonGPU.Activated = true;
panelGPU.Visible = true;
break;
case 2:
buttonAdvanced.Activated = true;
panelAdvanced.Visible = true;
break;
default:
buttonCPU.Activated = true;
panelPower.Visible = true;
break;
}
ResumeLayout(false);
PerformLayout();
}
private void ButtonAdvanced_Click(object? sender, EventArgs e)
{
ToggleNavigation(2);
}
private void ButtonGPU_Click(object? sender, EventArgs e)
{
ToggleNavigation(1);
}
private void ButtonCPU_Click(object? sender, EventArgs e)
{
ToggleNavigation(0);
}
private void ButtonApplyAdvanced_Click(object? sender, EventArgs e)
{
Program.settingsForm.SetUV(true);
checkApplyUV.Enabled = true;
}
public void InitUV()
{
//if (!ProcessHelper.IsUserAdministrator()) return;
int cpuUV = Math.Max(trackUV.Minimum, Math.Min(trackUV.Maximum, AppConfig.GetMode("cpu_uv", 0)));
int igpuUV = Math.Max(trackUViGPU.Minimum, Math.Min(trackUViGPU.Maximum, AppConfig.GetMode("igpu_uv", 0)));
checkApplyUV.Enabled = checkApplyUV.Checked = AppConfig.IsMode("auto_uv");
trackUV.Value = cpuUV;
labelUV.Text = trackUV.Value.ToString();
trackUViGPU.Value = igpuUV;
labelUViGPU.Text = trackUViGPU.Value.ToString();
buttonAdvanced.Visible = Undervolter.IsAMD();
}
private void TrackUV_Scroll(object? sender, EventArgs e)
{
AppConfig.SetMode("auto_uv", 0);
checkApplyUV.Enabled = checkApplyUV.Checked = false;
labelUV.Text = trackUV.Value.ToString();
labelUViGPU.Text = trackUViGPU.Value.ToString();
AppConfig.SetMode("cpu_uv", trackUV.Value);
AppConfig.SetMode("igpu_uv", trackUViGPU.Value);
}
private void ComboModes_KeyPress(object? sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13) RenameToggle();
}
private void ComboModes_TextChanged(object? sender, EventArgs e)
{
if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList) return;
if (!Modes.IsCurrentCustom()) return;
AppConfig.SetMode("mode_name", comboModes.Text);
}
private void RenameToggle()
{
if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList)
comboModes.DropDownStyle = ComboBoxStyle.Simple;
else
{
var mode = Modes.GetCurrent();
FillModes();
comboModes.SelectedValue = mode;
}
}
private void ButtonRename_Click(object? sender, EventArgs e)
{
RenameToggle();
}
private void ButtonRemove_Click(object? sender, EventArgs e)
{
int mode = Modes.GetCurrent();
if (!Modes.IsCurrentCustom()) return;
Modes.Remove(mode);
FillModes();
Program.settingsForm.SetPerformanceMode(AsusACPI.PerformanceBalanced);
}
private void FillModes()
{
comboModes.DropDownStyle = ComboBoxStyle.DropDownList;
comboModes.DataSource = new BindingSource(Modes.GetDictonary(), null);
comboModes.DisplayMember = "Value";
comboModes.ValueMember = "Key";
}
private void ButtonAdd_Click(object? sender, EventArgs e)
{
int mode = Modes.Add();
FillModes();
Program.settingsForm.SetPerformanceMode(mode);
}
public void InitMode()
{
int mode = Modes.GetCurrent();
comboModes.SelectedValue = mode;
buttonRename.Visible = buttonRemove.Visible = Modes.IsCurrentCustom();
}
private void ComboModes_SelectedValueChanged(object? sender, EventArgs e)
{
var selectedMode = comboModes.SelectedValue;
if (selectedMode == null) return;
if ((int)selectedMode == Modes.GetCurrent()) return;
Debug.WriteLine(selectedMode);
Program.settingsForm.SetPerformanceMode((int)selectedMode);
}
private void TrackGPU_MouseUp(object? sender, MouseEventArgs e)
{
@@ -146,12 +356,12 @@ namespace GHelper
Program.settingsForm.SetGPUClocks(true);
}
public void InitGPU(bool readClocks = false)
public void InitGPU()
{
if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1)
{
gpuVisible = panelGPU.Visible = false;
gpuVisible = buttonGPU.Visible = false;
return;
}
@@ -163,18 +373,18 @@ namespace GHelper
}
else
{
gpuVisible = panelGPU.Visible = false;
gpuVisible = buttonGPU.Visible = false;
return;
}
try
{
gpuVisible = panelGPU.Visible = true;
gpuVisible = buttonGPU.Visible = true;
int gpu_boost = AppConfig.getConfigPerf("gpu_boost");
int gpu_temp = AppConfig.getConfigPerf("gpu_temp");
int core = AppConfig.getConfigPerf("gpu_core");
int memory = AppConfig.getConfigPerf("gpu_memory");
int gpu_boost = AppConfig.GetMode("gpu_boost");
int gpu_temp = AppConfig.GetMode("gpu_temp");
int core = AppConfig.GetMode("gpu_core");
int memory = AppConfig.GetMode("gpu_memory");
if (gpu_boost < 0) gpu_boost = AsusACPI.MaxGPUBoost;
if (gpu_temp < 0) gpu_temp = AsusACPI.MaxGPUTemp;
@@ -217,7 +427,7 @@ namespace GHelper
catch (Exception ex)
{
Logger.WriteLine(ex.ToString());
gpuVisible = panelGPU.Visible = false;
gpuVisible = buttonGPU.Visible = false;
}
}
@@ -236,8 +446,8 @@ namespace GHelper
TrackBar track = (TrackBar)sender;
track.Value = (int)Math.Round((float)track.Value / 5) * 5;
AppConfig.setConfigPerf("gpu_core", trackGPUCore.Value);
AppConfig.setConfigPerf("gpu_memory", trackGPUMemory.Value);
AppConfig.SetMode("gpu_core", trackGPUCore.Value);
AppConfig.SetMode("gpu_memory", trackGPUMemory.Value);
VisualiseGPUSettings();
@@ -245,8 +455,8 @@ namespace GHelper
private void trackGPUPower_Scroll(object? sender, EventArgs e)
{
AppConfig.setConfigPerf("gpu_boost", trackGPUBoost.Value);
AppConfig.setConfigPerf("gpu_temp", trackGPUTemp.Value);
AppConfig.SetMode("gpu_boost", trackGPUBoost.Value);
AppConfig.SetMode("gpu_temp", trackGPUTemp.Value);
VisualiseGPUSettings();
}
@@ -279,9 +489,6 @@ namespace GHelper
break;
}
if (Program.settingsForm.perfName.Length > 0)
labelFans.Text = Properties.Strings.FanProfiles + ": " + Program.settingsForm.perfName;
chart.Titles[0].Text = title;
chart.ChartAreas[0].AxisX.Minimum = 10;
@@ -312,8 +519,6 @@ namespace GHelper
public void FormPosition()
{
panelSliders.Visible = gpuVisible || powerVisible;
if (Height > Program.settingsForm.Height)
{
Top = Program.settingsForm.Top + Program.settingsForm.Height - Height;
@@ -349,11 +554,11 @@ namespace GHelper
private void ComboBoost_Changed(object? sender, EventArgs e)
{
if (AppConfig.getConfigPerf("auto_boost") != comboBoost.SelectedIndex)
if (AppConfig.GetMode("auto_boost") != comboBoost.SelectedIndex)
{
NativeMethods.SetCPUBoost(comboBoost.SelectedIndex);
AppConfig.setConfigPerf("auto_boost", comboBoost.SelectedIndex);
}
AppConfig.SetMode("auto_boost", comboBoost.SelectedIndex);
}
private void CheckApplyPower_Click(object? sender, EventArgs e)
@@ -361,7 +566,7 @@ namespace GHelper
if (sender is null) return;
CheckBox chk = (CheckBox)sender;
AppConfig.setConfigPerf("auto_apply_power", chk.Checked ? 1 : 0);
AppConfig.SetMode("auto_apply_power", chk.Checked ? 1 : 0);
Program.settingsForm.SetPerformanceMode();
}
@@ -371,7 +576,7 @@ namespace GHelper
if (sender is null) return;
CheckBox chk = (CheckBox)sender;
AppConfig.setConfigPerf("auto_apply", chk.Checked ? 1 : 0);
AppConfig.SetMode("auto_apply", chk.Checked ? 1 : 0);
Program.settingsForm.SetPerformanceMode();
}
@@ -402,7 +607,7 @@ namespace GHelper
bool modeB0 = Program.acpi.IsAllAmdPPT();
bool modeC1 = Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0;
powerVisible = panelPower.Visible = modeA0;
panelA0.Visible = modeA0;
panelB0.Visible = modeB0;
@@ -424,7 +629,7 @@ namespace GHelper
int limit_cpu;
int limit_fast;
bool apply = AppConfig.isConfigPerf("auto_apply_power");
bool apply = AppConfig.IsMode("auto_apply_power");
if (changed)
{
@@ -434,9 +639,9 @@ namespace GHelper
}
else
{
limit_total = AppConfig.getConfigPerf("limit_total");
limit_cpu = AppConfig.getConfigPerf("limit_cpu");
limit_fast = AppConfig.getConfigPerf("limit_fast");
limit_total = AppConfig.GetMode("limit_total");
limit_cpu = AppConfig.GetMode("limit_cpu");
limit_fast = AppConfig.GetMode("limit_fast");
}
if (limit_total < 0) limit_total = AsusACPI.DefaultTotal;
@@ -462,9 +667,9 @@ namespace GHelper
labelB0.Text = trackB0.Value.ToString() + "W";
labelC1.Text = trackC1.Value.ToString() + "W";
AppConfig.setConfigPerf("limit_total", limit_total);
AppConfig.setConfigPerf("limit_cpu", limit_cpu);
AppConfig.setConfigPerf("limit_fast", limit_fast);
AppConfig.SetMode("limit_total", limit_total);
AppConfig.SetMode("limit_cpu", limit_cpu);
AppConfig.SetMode("limit_fast", limit_fast);
}
@@ -484,7 +689,7 @@ namespace GHelper
// Middle / system fan check
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)))
{
AppConfig.setConfig("mid_fan", 1);
AppConfig.Set("mid_fan", 1);
chartCount++;
chartMid.Visible = true;
SetChart(chartMid, AsusFan.Mid);
@@ -492,13 +697,13 @@ namespace GHelper
}
else
{
AppConfig.setConfig("mid_fan", 0);
AppConfig.Set("mid_fan", 0);
}
// XG Mobile Fan check
if (Program.acpi.IsXGConnected())
{
AppConfig.setConfig("xgm_fan", 1);
AppConfig.Set("xgm_fan", 1);
chartCount++;
chartXGM.Visible = true;
SetChart(chartXGM, AsusFan.XGM);
@@ -506,7 +711,7 @@ namespace GHelper
}
else
{
AppConfig.setConfig("xgm_fan", 0);
AppConfig.Set("xgm_fan", 0);
}
try
@@ -526,9 +731,7 @@ namespace GHelper
LoadProfile(seriesCPU, AsusFan.CPU);
LoadProfile(seriesGPU, AsusFan.GPU);
int auto_apply = AppConfig.getConfigPerf("auto_apply");
checkApplyFans.Checked = (auto_apply == 1);
checkApplyFans.Checked = AppConfig.IsMode("auto_apply");
}
@@ -542,15 +745,14 @@ namespace GHelper
series.Points.Clear();
int mode = AppConfig.getConfig("performance_mode");
byte[] curve = AppConfig.getFanConfig(device);
byte[] curve = AppConfig.GetFanConfig(device);
if (reset || AsusACPI.IsInvalidCurve(curve))
{
curve = Program.acpi.GetFanCurve(device, mode);
curve = Program.acpi.GetFanCurve(device, Modes.GetCurrentBase());
if (AsusACPI.IsInvalidCurve(curve))
curve = AppConfig.getDefaultCurve(device);
curve = AppConfig.GetDefaultCurve(device);
curve = AsusACPI.FixFanCurve(curve);
@@ -581,7 +783,7 @@ namespace GHelper
i++;
}
AppConfig.setFanConfig(device, curve);
AppConfig.SetFanConfig(device, curve);
//Program.wmi.SetFanCurve(device, curve);
}
@@ -593,23 +795,28 @@ namespace GHelper
LoadProfile(seriesCPU, AsusFan.CPU, true);
LoadProfile(seriesGPU, AsusFan.GPU, true);
if (AppConfig.isConfig("mid_fan"))
if (AppConfig.Is("mid_fan"))
LoadProfile(seriesMid, AsusFan.Mid, true);
if (AppConfig.isConfig("xgm_fan"))
if (AppConfig.Is("xgm_fan"))
LoadProfile(seriesXGM, AsusFan.XGM, true);
checkApplyFans.Checked = false;
checkApplyPower.Checked = false;
AppConfig.setConfigPerf("auto_apply", 0);
AppConfig.setConfigPerf("auto_apply_power", 0);
AppConfig.SetMode("auto_apply", 0);
AppConfig.SetMode("auto_apply_power", 0);
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.getConfig("performance_mode"), "Mode");
if (Program.acpi.IsXGConnected())
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Mode");
if (Program.acpi.IsXGConnected())
AsusUSB.ResetXGM();
trackUV.Value = 0;
trackUViGPU.Value = 0;
AppConfig.SetMode("cpu_uv", 0);
AppConfig.SetMode("igpu_uv", 0);
if (gpuVisible)
{
trackGPUCore.Value = 0;
@@ -617,10 +824,10 @@ namespace GHelper
trackGPUBoost.Value = AsusACPI.MaxGPUBoost;
trackGPUTemp.Value = AsusACPI.MaxGPUTemp;
AppConfig.setConfigPerf("gpu_boost", trackGPUBoost.Value);
AppConfig.setConfigPerf("gpu_temp", trackGPUTemp.Value);
AppConfig.setConfigPerf("gpu_core", trackGPUCore.Value);
AppConfig.setConfigPerf("gpu_memory", trackGPUMemory.Value);
AppConfig.SetMode("gpu_boost", trackGPUBoost.Value);
AppConfig.SetMode("gpu_temp", trackGPUTemp.Value);
AppConfig.SetMode("gpu_core", trackGPUCore.Value);
AppConfig.SetMode("gpu_memory", trackGPUMemory.Value);
VisualiseGPUSettings();
Program.settingsForm.SetGPUClocks(true);
@@ -639,10 +846,10 @@ namespace GHelper
SaveProfile(seriesCPU, AsusFan.CPU);
SaveProfile(seriesGPU, AsusFan.GPU);
if (AppConfig.isConfig("mid_fan"))
if (AppConfig.Is("mid_fan"))
SaveProfile(seriesMid, AsusFan.Mid);
if (AppConfig.isConfig("xgm_fan"))
if (AppConfig.Is("xgm_fan"))
SaveProfile(seriesXGM, AsusFan.XGM);
Program.settingsForm.AutoFans();
@@ -734,7 +941,7 @@ namespace GHelper
for (int i = 0; i < series.Points.Count; i++)
{
series.Points[i].XValue = Math.Max(20, Math.Min(100, series.Points[i].XValue + deltaX));
series.Points[i].YValues[0] = Math.Max(0, Math.Min(100, series.Points[i].YValues[0]+deltaY));
series.Points[i].YValues[0] = Math.Max(0, Math.Min(100, series.Points[i].YValues[0] + deltaY));
}
}

View File

@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="labelRisky.Text" xml:space="preserve">
<value>Undervolting is experimental and risky feature. If applied values are too low for your hardware, it can become unstable or shut down. Try small negative values first, click Apply and test what works for you.</value>
</data>
</root>

View File

@@ -16,7 +16,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.82</AssemblyVersion>
<AssemblyVersion>0.87</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -133,6 +133,12 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Update="WinRing0x64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="WinRing0x64.sys">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -111,8 +111,8 @@ public class NvidiaGpuControl : IGpuControl
public int SetClocksFromConfig()
{
int core = AppConfig.getConfig("gpu_core");
int memory = AppConfig.getConfig("gpu_memory");
int core = AppConfig.Get("gpu_core",0);
int memory = AppConfig.Get("gpu_memory",0);
int status = SetClocks(core, memory);
return status;
}

View File

@@ -19,7 +19,7 @@ public static class HardwareControl
public static int GetFanMax()
{
int max = 58;
int configMax = AppConfig.getConfig("fan_max");
int configMax = AppConfig.Get("fan_max");
if (configMax > 100) configMax = 0; // skipping inadvequate settings
if (AppConfig.ContainsModel("401")) max = 72;
@@ -29,7 +29,7 @@ public static class HardwareControl
public static void SetFanMax(int fan)
{
AppConfig.setConfig("fan_max", fan);
AppConfig.Set("fan_max", fan);
}
public static string FormatFan(int fan)
{
@@ -43,7 +43,7 @@ public static class HardwareControl
int fanMax = GetFanMax();
if (fan > fanMax && fan < 110) SetFanMax(fan);
if (AppConfig.getConfig("fan_rpm") == 1)
if (AppConfig.Is("fan_rpm"))
return GHelper.Properties.Strings.FanSpeed + (fan * 100).ToString() + "RPM";
else
return GHelper.Properties.Strings.FanSpeed + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm
@@ -189,7 +189,7 @@ public static class HardwareControl
List<string> tokill = new() { "EADesktop", "RadeonSoftware", "epicgameslauncher", "ASUSSmartDisplayControl" };
if (AppConfig.isConfig("kill_gpu_apps"))
if (AppConfig.Is("kill_gpu_apps"))
{
tokill.Add("nvdisplay.container");
tokill.Add("nvcontainer");
@@ -198,7 +198,7 @@ public static class HardwareControl
foreach (string kill in tokill) ProcessHelper.KillByName(kill);
if (AppConfig.isConfig("kill_gpu_apps") && GpuControl is not null)
if (AppConfig.Is("kill_gpu_apps") && GpuControl is not null)
{
GpuControl.KillGPUApps();
}

View File

@@ -25,7 +25,7 @@ namespace GHelper
while (!cancellationTokenSource.Token.IsCancellationRequested)
{
var data = input.Read().Data;
if (data.Length > 1 && data[0] == AsusUSB.INPUT_HID_ID && data[1] > 0)
if (data.Length > 1 && data[0] == AsusUSB.INPUT_HID_ID && data[1] > 0 && data[1] != 236)
{
Logger.WriteLine($"Key: {data[1]}");
KeyHandler(data[1]);
@@ -86,9 +86,9 @@ namespace GHelper
int kb_timeout;
if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online)
kb_timeout = AppConfig.getConfig("keyboard_ac_timeout", 0);
kb_timeout = AppConfig.Get("keyboard_ac_timeout", 0);
else
kb_timeout = AppConfig.getConfig("keyboard_timeout", 60);
kb_timeout = AppConfig.Get("keyboard_timeout", 60);
if (kb_timeout == 0) return;
@@ -123,8 +123,8 @@ namespace GHelper
public void InitBacklightTimer()
{
timer.Enabled = (AppConfig.getConfig("keyboard_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) ||
(AppConfig.getConfig("keyboard_ac_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online);
timer.Enabled = (AppConfig.Get("keyboard_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) ||
(AppConfig.Get("keyboard_ac_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online);
}
@@ -134,11 +134,11 @@ namespace GHelper
hook.UnregisterAll();
// CTRL + SHIFT + F5 to cycle profiles
if (AppConfig.getConfig("keybind_profile") != -1) keyProfile = (Keys)AppConfig.getConfig("keybind_profile");
if (AppConfig.getConfig("keybind_app") != -1) keyApp = (Keys)AppConfig.getConfig("keybind_app");
if (AppConfig.Get("keybind_profile") != -1) keyProfile = (Keys)AppConfig.Get("keybind_profile");
if (AppConfig.Get("keybind_app") != -1) keyApp = (Keys)AppConfig.Get("keybind_app");
string actionM1 = AppConfig.getConfigString("m1");
string actionM2 = AppConfig.getConfigString("m2");
string actionM1 = AppConfig.GetString("m1");
string actionM2 = AppConfig.GetString("m2");
if (keyProfile != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyProfile);
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
@@ -149,14 +149,14 @@ namespace GHelper
// FN-Lock group
if (AppConfig.isConfig("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
if (AppConfig.Is("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i);
}
static void CustomKey(string configKey = "m3")
{
string command = AppConfig.getConfigString(configKey + "_custom");
string command = AppConfig.GetString(configKey + "_custom");
int intKey;
try
@@ -202,7 +202,7 @@ namespace GHelper
}
}
if (AppConfig.ContainsModel("GA401I"))
if (AppConfig.ContainsModel("GA401I") && !AppConfig.ContainsModel("GA401IHR"))
{
switch (e.Key)
{
@@ -242,21 +242,21 @@ namespace GHelper
case Keys.F7:
if (AppConfig.ContainsModel("TUF"))
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, ScreenBrightness.Adjust(-10) + "%", ToastIcon.BrightnessDown);
HandleEvent(16);
HandleOptimizationEvent(16);
break;
case Keys.F8:
if (AppConfig.ContainsModel("TUF"))
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, ScreenBrightness.Adjust(+10) + "%", ToastIcon.BrightnessUp);
HandleEvent(32);
HandleOptimizationEvent(32);
break;
case Keys.F9:
KeyboardHook.KeyWinPress(Keys.P);
break;
case Keys.F10:
HandleEvent(107);
HandleOptimizationEvent(107);
break;
case Keys.F11:
HandleEvent(108);
HandleOptimizationEvent(108);
break;
case Keys.F12:
KeyboardHook.KeyWinPress(Keys.A);
@@ -284,7 +284,7 @@ namespace GHelper
public static void KeyProcess(string name = "m3")
{
string action = AppConfig.getConfigString(name);
string action = AppConfig.GetString(name);
if (action is null || action.Length <= 1)
{
@@ -312,6 +312,7 @@ namespace GHelper
KeyboardHook.KeyPress(Keys.Snapshot);
break;
case "screen":
Logger.WriteLine("Screen off toggle");
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
break;
case "miniled":
@@ -342,10 +343,10 @@ namespace GHelper
}
break;
case "brightness_up":
HandleEvent(32);
HandleOptimizationEvent(32);
break;
case "brightness_down":
HandleEvent(16);
HandleOptimizationEvent(16);
break;
case "custom":
CustomKey(name);
@@ -366,8 +367,8 @@ namespace GHelper
static void ToggleFnLock()
{
int fnLock = AppConfig.isConfig("fn_lock") ? 0 : 1;
AppConfig.setConfig("fn_lock", fnLock);
int fnLock = AppConfig.Is("fn_lock") ? 0 : 1;
AppConfig.Set("fn_lock", fnLock);
if (AppConfig.ContainsModel("VivoBook"))
Program.acpi.DeviceSet(AsusACPI.FnLock, (fnLock == 1) ? 0 : 1, "FnLock");
@@ -416,19 +417,29 @@ namespace GHelper
return;
case 197: // FN+F2
SetBacklight(-1);
break;
return;
case 196: // FN+F3
SetBacklight(1);
break;
return;
case 199: // ON Z13 - FN+F11 - cycles backlight
SetBacklight(4);
break;
return;
case 53: // FN+F6 on GA-502DU model
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
return;
}
if (OptimizationService.IsRunning()) return;
if (!OptimizationService.IsRunning())
HandleOptimizationEvent(EventID);
// Asus Optimization service Events
}
static void HandleOptimizationEvent(int EventID)
{
switch (EventID)
{
case 16: // FN+F7
@@ -445,21 +456,14 @@ namespace GHelper
case 108: // FN+F11
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.KB_Sleep, "Sleep");
break;
case 106: // Zephyrus DUO special key for turning on/off second display.
//Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.KB_DUO_SecondDisplay, "SecondDisplay");
break;
case 75: // Zephyrus DUO special key for changing between arrows and pgup/pgdn
//Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.KB_DUO_PgUpDn, "PgUpDown");
break;
}
}
public static int GetBacklight()
{
int backlight_power = AppConfig.getConfig("keyboard_brightness", 1);
int backlight_battery = AppConfig.getConfig("keyboard_brightness_ac", 1);
int backlight_power = AppConfig.Get("keyboard_brightness", 1);
int backlight_battery = AppConfig.Get("keyboard_brightness_ac", 1);
bool onBattery = SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online;
int backlight;
@@ -480,8 +484,8 @@ namespace GHelper
public static void SetBacklight(int delta)
{
int backlight_power = AppConfig.getConfig("keyboard_brightness", 1);
int backlight_battery = AppConfig.getConfig("keyboard_brightness_ac", 1);
int backlight_power = AppConfig.Get("keyboard_brightness", 1);
int backlight_battery = AppConfig.Get("keyboard_brightness_ac", 1);
bool onBattery = SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online;
int backlight = onBattery ? backlight_battery : backlight_power;
@@ -492,9 +496,9 @@ namespace GHelper
backlight = Math.Max(Math.Min(3, backlight + delta), 0);
if (onBattery)
AppConfig.setConfig("keyboard_brightness_ac", backlight);
AppConfig.Set("keyboard_brightness_ac", backlight);
else
AppConfig.setConfig("keyboard_brightness", backlight);
AppConfig.Set("keyboard_brightness", backlight);
if (!OptimizationService.IsRunning())
{

156
app/Modes.cs Normal file
View File

@@ -0,0 +1,156 @@
using Microsoft.VisualBasic.Devices;
namespace GHelper
{
internal class Modes
{
const int maxModes = 20;
public static Dictionary<int, string> GetDictonary()
{
Dictionary<int, string> modes = new Dictionary<int, string>
{
{2, Properties.Strings.Silent},
{0, Properties.Strings.Balanced},
{1, Properties.Strings.Turbo}
};
for (int i = 3; i < maxModes; i++)
{
if (Exists(i)) modes.Add(i, GetName(i));
}
return modes;
}
public static List<int> GetList()
{
List<int> modes = new() { 2, 0, 1 };
for (int i = 3; i < maxModes; i++)
{
if (Exists(i)) modes.Add(i);
}
return modes;
}
public static void Remove(int mode)
{
List<string> cleanup = new() {
"mode_base",
"mode_name",
"limit_total",
"limit_fast",
"limit_cpu",
"limit_total",
"fan_profile_cpu",
"fan_profile_gpu",
"fan_profile_mid",
"gpu_boost",
"gpu_temp",
"gpu_core",
"gpu_memory",
"auto_boost",
"auto_apply",
"auto_apply_power"
};
foreach (string clean in cleanup)
{
AppConfig.Remove(clean + "_" + mode);
}
}
public static int Add()
{
for (int i = 3; i < maxModes; i++)
{
if (!Exists(i))
{
int modeBase = GetCurrentBase();
string nameName = "Custom " + (i - 2);
AppConfig.Set("mode_base_" + i, modeBase);
AppConfig.Set("mode_name_" + i, nameName);
return i;
}
}
return -1;
}
public static int GetCurrent()
{
return AppConfig.Get("performance_mode");
}
public static bool IsCurrentCustom()
{
return GetCurrent() > 2;
}
public static void SetCurrent(int mode)
{
AppConfig.Set("performance_" + (int)SystemInformation.PowerStatus.PowerLineStatus, mode);
AppConfig.Set("performance_mode", mode);
}
public static int GetCurrentBase()
{
return GetBase(GetCurrent());
}
public static string GetCurrentName()
{
return GetName(GetCurrent());
}
public static bool Exists(int mode)
{
return GetBase(mode) >= 0;
}
public static int GetBase(int mode)
{
if (mode >= 0 && mode <= 2)
return mode;
else
return AppConfig.Get("mode_base_" + mode);
}
public static string GetName(int mode)
{
switch (mode)
{
case 0:
return Properties.Strings.Balanced;
case 1:
return Properties.Strings.Turbo;
case 2:
return Properties.Strings.Silent;
default:
return AppConfig.GetString("mode_name_" + mode);
}
}
public static int GetNext(bool back = false)
{
var modes = GetList();
int index = modes.IndexOf(GetCurrent());
if (back)
{
index--;
if (index < 0) index = modes.Count - 1;
return modes[index];
}
else
{
index++;
if (index > modes.Count - 1) index = 0;
return modes[index];
}
}
}
}

View File

@@ -636,7 +636,7 @@ public class NativeMethods
var devices = GetAllDevices().ToArray();
int count = 0, displayNum = -1;
string internalName = AppConfig.getConfigString("internal_display");
string internalName = AppConfig.GetString("internal_display");
foreach (var device in devices)
{
@@ -645,7 +645,7 @@ public class NativeMethods
device.monitorFriendlyDeviceName == internalName)
{
displayNum = count;
AppConfig.setConfig("internal_display", device.monitorFriendlyDeviceName);
AppConfig.Set("internal_display", device.monitorFriendlyDeviceName);
}
count++;
//Logger.WriteLine(device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString());
@@ -724,6 +724,14 @@ public class NativeMethods
int iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet));
//Fallback scenario
if (iRet != 0)
{
Thread.Sleep(300);
iRet = NativeMethods.ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero);
Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet));
}
return iRet;
}
@@ -796,9 +804,25 @@ public class NativeMethods
public static void SetPowerScheme(string scheme)
{
PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme));
PowerSetActiveOverlayScheme(new Guid(scheme));
Logger.WriteLine(scheme);
List<string> overlays = new() {
"00000000-0000-0000-0000-000000000000",
"ded574b5-45a0-4f42-8737-46345c09c238",
"961cc777-2547-4f9d-8174-7d86181b8a7a",
"3af9B8d9-7c97-431d-ad78-34a8bfea439f"
};
if (overlays.Contains(scheme))
{
PowerSetActiveOverlayScheme(new Guid(scheme));
Logger.WriteLine("Power mode:" + scheme);
}
else
{
PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme));
Logger.WriteLine("Power plan:" + scheme);
}
}
public static void SetPowerScheme(int mode)

View File

@@ -57,8 +57,14 @@ namespace GHelper
startInfo.FileName = Application.ExecutablePath;
startInfo.Arguments = param;
startInfo.Verb = "runas";
Process.Start(startInfo);
Application.Exit();
try
{
Process.Start(startInfo);
Application.Exit();
} catch (Exception ex)
{
Logger.WriteLine(ex.Message);
}
}
}

View File

@@ -1,9 +1,8 @@
using Microsoft.Win32;
using Ryzen;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Security.Principal;
using System.Windows.Forms;
using static NativeMethods;
namespace GHelper
@@ -38,15 +37,18 @@ namespace GHelper
string action = "";
if (args.Length > 0) action = args[0];
string language = AppConfig.getConfigString("language");
string language = AppConfig.GetString("language");
if (language != null && language.Length > 0)
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(language);
else
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
{
var culture = CultureInfo.CurrentUICulture;
if (culture.ToString() == "kr") culture = CultureInfo.GetCultureInfo("ko");
Thread.CurrentThread.CurrentUICulture = culture;
}
Debug.WriteLine(CultureInfo.CurrentUICulture);
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr");
ProcessHelper.CheckAlreadyRunning();
@@ -72,6 +74,7 @@ namespace GHelper
Application.EnableVisualStyles();
HardwareControl.RecreateGpuControl();
Undervolter.Init();
var ds = settingsForm.Handle;
@@ -147,7 +150,7 @@ namespace GHelper
inputDispatcher.Init();
settingsForm.SetBatteryChargeLimit(AppConfig.getConfig("charge_limit"));
settingsForm.SetBatteryChargeLimit(AppConfig.Get("charge_limit"));
settingsForm.AutoPerformance(powerChanged);
bool switched = settingsForm.AutoGPUMode();
@@ -176,15 +179,23 @@ namespace GHelper
if (settingsForm.Visible) settingsForm.HideAll();
else
{
settingsForm.Left = Screen.FromControl(settingsForm).WorkingArea.Width - 10 - settingsForm.Width;
settingsForm.Top = Screen.FromControl(settingsForm).WorkingArea.Height - 10 - settingsForm.Height;
settingsForm.Show();
settingsForm.Activate();
settingsForm.Left = Screen.FromControl(settingsForm).WorkingArea.Width - 10 - settingsForm.Width;
settingsForm.Top = Screen.FromControl(settingsForm).WorkingArea.Height - 10 - settingsForm.Height;
settingsForm.VisualiseGPUMode();
switch (action)
{
case "gpu":
Startup.ReScheduleAdmin();
settingsForm.FansToggle();
settingsForm.FansToggle(1);
break;
case "gpurestart":
settingsForm.RestartGPU(false);
@@ -194,6 +205,11 @@ namespace GHelper
settingsForm.keyb.Show();
settingsForm.keyb.ServiesToggle();
break;
case "uv":
Startup.ReScheduleAdmin();
settingsForm.FansToggle(2);
settingsForm.SetUV();
break;
}
}
}

View File

@@ -110,6 +110,16 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_add_64 {
get {
object obj = ResourceManager.GetObject("icons8_add_64", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -130,6 +140,16 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_boost_30 {
get {
object obj = ResourceManager.GetObject("icons8-boost-30", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -153,9 +173,19 @@ namespace GHelper.Properties {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_electrical_96 {
internal static System.Drawing.Bitmap icons8_charging_battery_96 {
get {
object obj = ResourceManager.GetObject("icons8_electrical_96", resourceCulture);
object obj = ResourceManager.GetObject("icons8_charging_battery_96", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_edit_32 {
get {
object obj = ResourceManager.GetObject("icons8_edit_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -360,6 +390,16 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_remove_64 {
get {
object obj = ResourceManager.GetObject("icons8_remove_64", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -370,6 +410,26 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_save_32 {
get {
object obj = ResourceManager.GetObject("icons8-save-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_share_32 {
get {
object obj = ResourceManager.GetObject("icons8_share_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -450,6 +510,16 @@ namespace GHelper.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_voltage_60 {
get {
object obj = ResourceManager.GetObject("icons8-voltage-60", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@@ -121,14 +121,17 @@
<data name="brightness_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-software-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-software-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-leaf-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-leaf-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-launch-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-launch-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8_mute_unmute_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-organic-food-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-organic-food-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -139,8 +142,8 @@
<data name="icons8_microphone_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-bicycle-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -154,29 +157,50 @@
<data name="icons8-processor-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-processor-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-fan-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_add_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-add-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-game-controller-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-spa-flower-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-spa-flower-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_edit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_share_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-share-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_charged_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charged-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-voltage-60" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-voltage-60.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-keyboard-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-keyboard-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="brightness_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-save-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-save-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-fan-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-fan-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-help-64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8_charging_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -184,11 +208,11 @@
<data name="icons8-laptop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-laptop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-project-management-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-charging-battery-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charging-battery-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="backlight_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -196,8 +220,8 @@
<data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-organic-food-961" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-organic-food-961.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-speed-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-speed-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_function" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -205,14 +229,14 @@
<data name="icons8-balance-symbol-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-balance-symbol-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-fan-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-organic-food-961" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-organic-food-961.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-matrix-desktop-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-matrix-desktop-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_mute_unmute_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8_remove_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-xbox-controller-96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-xbox-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -220,8 +244,8 @@
<data name="icons8-project-management-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-project-management-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_video_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-video-card-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-video-card-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-leaf-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-leaf-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -235,13 +259,10 @@
<data name="icons8-speed-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-speed-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-software-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-software-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8_video_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_charged_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charged-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_electrical_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-electrical-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="icons8-boost-30" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-boost-30.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -160,7 +160,7 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized string similar to Apply Power Limits.
/// Looks up a localized string similar to Apply.
/// </summary>
internal static string ApplyPowerLimits {
get {
@@ -916,7 +916,7 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized string similar to Performance Mode.
/// Looks up a localized string similar to Mode.
/// </summary>
internal static string PerformanceMode {
get {
@@ -943,7 +943,7 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized string similar to Power Limits (PPT).
/// Looks up a localized string similar to Power Limits.
/// </summary>
internal static string PowerLimits {
get {
@@ -952,7 +952,7 @@ namespace GHelper.Properties {
}
/// <summary>
/// Looks up a localized string similar to Power Limits (PPT) is experimental feature. Use carefully and on your own risk!.
/// Looks up a localized string similar to Power Limits is experimental feature. Use carefully and on your own risk!.
/// </summary>
internal static string PPTExperimental {
get {

View File

@@ -1,5 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
@@ -314,10 +373,10 @@
<value>Wiedergabe / Pause</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Leistungsbegrenzung (PPT)</value>
<value>Leistungsbegrenzung</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Leistungsbegrenzung (PPT) ist experimentell. Nutzung erfolgt auf eigene Gefahr!</value>
<value>Leistungsbegrenzung ist experimentell. Nutzung erfolgt auf eigene Gefahr!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Druck</value>

View File

@@ -291,7 +291,7 @@
<data name="GPUChanging" xml:space="preserve">
<value>Cargando</value>
</data>
<data name="GPUCoreClockOffset" xml:space="preserve">
<data name="GPUCoreClockOffset" xml:space="preserve">
<value>Core Clock Offset</value>
</data>
<data name="GPUMemoryClockOffset" xml:space="preserve">
@@ -312,7 +312,7 @@
<data name="GPUSettings" xml:space="preserve">
<value>Ajustes de GPU</value>
</data>
<data name="GPUTempTarget" xml:space="preserve">
<data name="GPUTempTarget" xml:space="preserve">
<value>Temperatura objetivo</value>
</data>
<data name="KeyBindings" xml:space="preserve">
@@ -345,7 +345,7 @@
<data name="Logo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="MatrixAudio" xml:space="preserve">
<data name="MatrixAudio" xml:space="preserve">
<value>Visualizador de audio</value>
</data>
<data name="MatrixBanner" xml:space="preserve">
@@ -412,10 +412,10 @@
<value>Reproducir / Pausar</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Límites de energía (PPT)</value>
<value>Límites de energía</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Los límites de energía (PPT) son una característica experimental. ¡Úselo con cuidado y bajo su propio riesgo!</value>
<value>Los límites de energía son una característica experimental. ¡Úselo con cuidado y bajo su propio riesgo!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Capturar pantalla</value>
@@ -424,7 +424,7 @@
<value>Quitar</value>
</data>
<data name="RestartGPU" xml:space="preserve">
<value>Algo está usando la dGPU e impide usar Modo Eco. ¿Reiniciar dGPU en administrador de dispositivos? * Proceda bajo su propio riesgo.</value>
<value>Algo está usando la dGPU e impide usar Modo Eco. ¿Reiniciar dGPU en administrador de dispositivos? * Proceda bajo su propio riesgo.</value>
</data>
<data name="RPM" xml:space="preserve">
<value>RPM</value>

View File

@@ -388,10 +388,10 @@
<value>Lecture / Pause</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Limites de puissance (PPT)</value>
<value>Limites de puissance</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Limites de puissance (PPT) est une fonctionnalité expérimentale. Faire attention, à utiliser à vos risques !</value>
<value>Limites de puissance est une fonctionnalité expérimentale. Faire attention, à utiliser à vos risques !</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Capture d'écran</value>

View File

@@ -1,5 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
@@ -287,10 +346,10 @@
<value>Play / Pause</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Power Limits (PPT)</value>
<value>Power Limits</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Power Limits (PPT) is experimental feature. Use carefully and on your own risk!</value>
<value>Power Limits is experimental feature. Use carefully and on your own risk!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>PrintScreen</value>

View File

@@ -412,10 +412,10 @@
<value>재생 / 정지</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>전력 제한 (PPT)</value>
<value>전력 제한</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>전력 제한 (PPT)은 실험적인 기능입니다. 주의하여 사용하세요!</value>
<value>전력 제한 은 실험적인 기능입니다. 주의하여 사용하세요!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>PrintScreen</value>
@@ -507,4 +507,4 @@
<data name="WindowTop" xml:space="preserve">
<value>창을 항상 맨 위로 유지</value>
</data>
</root>
</root>

View File

@@ -391,10 +391,10 @@
<value>Odtwórz / Pauza</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Limit mocy (PPT)</value>
<value>Limit mocy</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Ustawienie limitu mocy (PPT) jest funkcją eksperymentalną. Używaj ostrożnie, na własną odpowiedzialność!</value>
<value>Ustawienie limitu mocy jest funkcją eksperymentalną. Używaj ostrożnie, na własną odpowiedzialność!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Zrzut ekranu</value>
@@ -468,4 +468,4 @@
<data name="WindowTop" xml:space="preserve">
<value>Zachowaj okno aplikacji zawsze na wierzchu</value>
</data>
</root>
</root>

View File

@@ -1,350 +1,492 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ACPIError" xml:space="preserve">
<value>Não foi possível conectar ao ASUS ACPI. O applicativo não pode funcionar sem isso. Tente instalar Asus System Controle Interface</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Parece que o GPU está em uso pesado.</value>
</data>
<data name="AlertDGPUTitle" xml:space="preserve">
<value>Modo econômico</value>
</data>
<data name="AlertUltimateOff" xml:space="preserve">
<value>Passar ao Modo Final implica na reinicialização do sistema</value>
</data>
<data name="AlertUltimateOn" xml:space="preserve">
<value>Modo Ultimado necessita de reinicialização.</value>
</data>
<data name="AlertUltimateTitle" xml:space="preserve">
<value>Reiniciar agora ?</value>
</data>
<data name="AnimationSpeed" xml:space="preserve">
<value>Velocidade da Animação</value>
</data>
<data name="AnimeMatrix" xml:space="preserve">
<value>Anime Matrix</value>
</data>
<data name="AppAlreadyRunning" xml:space="preserve">
<value>O applicativo já está em execução</value>
</data>
<data name="AppAlreadyRunningText" xml:space="preserve">
<value>G-Helper já está em execução. Verifique a barra de sistema</value>
</data>
<data name="ApplyFanCurve" xml:space="preserve">
<value>Aplicar a curva de ventilador personalizada</value>
</data>
<data name="ApplyPowerLimits" xml:space="preserve">
<value>Aplicar as limitações de energia</value>
</data>
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Automaticamente ajustar os Modos de Energia Windows</value>
</data>
<data name="AuraBreathe" xml:space="preserve">
<value>Repiração</value>
</data>
<data name="AuraColorCycle" xml:space="preserve">
<value>Ciclo de cores</value>
</data>
<data name="AuraFast" xml:space="preserve">
<value>Rápido</value>
</data>
<data name="AuraNormal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="AuraRainbow" xml:space="preserve">
<value>Arco-íris</value>
</data>
<data name="AuraSlow" xml:space="preserve">
<value>Lento</value>
</data>
<data name="AuraStatic" xml:space="preserve">
<value>Estático</value>
</data>
<data name="AuraStrobe" xml:space="preserve">
<value>Estroboscópio</value>
</data>
<data name="AutoMode" xml:space="preserve">
<value>Automático</value>
</data>
<data name="AutoRefreshTooltip" xml:space="preserve">
<value>Estabelece 60Hz para economizar energia</value>
</data>
<data name="Awake" xml:space="preserve">
<value>Acordado</value>
</data>
<data name="BacklightTimeout" xml:space="preserve">
<value>Números de segundos para desligar a luz de fundo</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
</data>
<data name="BatteryChargeLimit" xml:space="preserve">
<value>Limite de carga da bateria</value>
</data>
<data name="Boot" xml:space="preserve">
<value>Durante o lançamento</value>
</data>
<data name="Brightness" xml:space="preserve">
<value>Luminosidade</value>
</data>
<data name="Color" xml:space="preserve">
<value>Cor</value>
</data>
<data name="CPUBoost" xml:space="preserve">
<value>CPU Boost</value>
</data>
<data name="Custom" xml:space="preserve">
<value>Personalizado</value>
</data>
<data name="Default" xml:space="preserve">
<value>Padrão</value>
</data>
<data name="DisableOverdrive" xml:space="preserve">
<value>Desativar o overdrive da tela</value>
</data>
<data name="Discharging" xml:space="preserve">
<value>Descarregando</value>
</data>
<data name="DownloadUpdate" xml:space="preserve">
<value>Baixar a atualização</value>
</data>
<data name="EcoGPUTooltip" xml:space="preserve">
<value>Desativar o dGPU para economisar a energía</value>
</data>
<data name="EcoMode" xml:space="preserve">
<value>Econômico</value>
</data>
<data name="Extra" xml:space="preserve">
<value>Adicional</value>
</data>
<data name="ExtraSettings" xml:space="preserve">
<value>Configurações adicionais</value>
</data>
<data name="FactoryDefaults" xml:space="preserve">
<value>Padrão de fábrica</value>
</data>
<data name="FanCurves" xml:space="preserve">
<value>Curvas de ventilador</value>
</data>
<data name="FanProfileCPU" xml:space="preserve">
<value>Perfil de ventilador CPU</value>
</data>
<data name="FanProfileGPU" xml:space="preserve">
<value>Perfil de ventilador GPU</value>
</data>
<data name="FanProfileMid" xml:space="preserve">
<value>Perfil de ventilador central</value>
</data>
<data name="FanProfiles" xml:space="preserve">
<value>Perfis de ventilador</value>
</data>
<data name="FansAndPower" xml:space="preserve">
<value>Ventiladores e Energía</value>
</data>
<data name="FanSpeed" xml:space="preserve">
<value>Ventilador</value>
</data>
<data name="FansPower" xml:space="preserve">
<value>Ventiladores + Energía</value>
</data>
<data name="GPUBoost" xml:space="preserve">
<value>Boost dinâmico</value>
</data>
<data name="GPUChanging" xml:space="preserve">
<value>Carregando</value>
</data>
<data name="GPUMode" xml:space="preserve">
<value>Modo de GPU</value>
</data>
<data name="GPUModeEco" xml:space="preserve">
<value>Só iGPU</value>
</data>
<data name="GPUModeStandard" xml:space="preserve">
<value>iGPU + dGPU</value>
</data>
<data name="GPUModeUltimate" xml:space="preserve">
<value>Exclusivamente dGPU</value>
</data>
<data name="GPUSettings" xml:space="preserve">
<value>Parâmetros de GPU</value>
</data>
<data name="GPUTempTarget" xml:space="preserve">
<value>Alvo de temperatura</value>
</data>
<data name="Keyboard" xml:space="preserve">
<value>Teclado</value>
</data>
<data name="KeyboardAuto" xml:space="preserve">
<value>Abaixar a luz de fundo na bateria e voltar quando carregando</value>
</data>
<data name="KeyboardBacklight" xml:space="preserve">
<value>Luz de fundo do teclado</value>
</data>
<data name="LaptopBacklight" xml:space="preserve">
<value>Luz de fundo do computador</value>
</data>
<data name="LaptopKeyboard" xml:space="preserve">
<value>Teclado do computador</value>
</data>
<data name="LaptopScreen" xml:space="preserve">
<value>Tela do computador</value>
</data>
<data name="Lid" xml:space="preserve">
<value>Tampa</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="MatrixBanner" xml:space="preserve">
<value>Bandeira Binária</value>
</data>
<data name="MatrixBright" xml:space="preserve">
<value>Brilho</value>
</data>
<data name="MatrixClock" xml:space="preserve">
<value>Relógio</value>
</data>
<data name="MatrixDim" xml:space="preserve">
<value>Escuro</value>
</data>
<data name="MatrixLogo" xml:space="preserve">
<value>Logo ROG</value>
</data>
<data name="MatrixMedium" xml:space="preserve">
<value>Médio</value>
</data>
<data name="MatrixOff" xml:space="preserve">
<value>Desligado</value>
</data>
<data name="MatrixPicture" xml:space="preserve">
<value>Imagem</value>
</data>
<data name="MaxRefreshTooltip" xml:space="preserve">
<value>Taxa de atualização maxíma para abaixar a latência</value>
</data>
<data name="MinRefreshTooltip" xml:space="preserve">
<value>Taxa de atualização à 60Hz para salvar energía</value>
</data>
<data name="Multizone" xml:space="preserve">
<value>Multizona</value>
</data>
<data name="OpenGHelper" xml:space="preserve">
<value>Abrir G-Helper</value>
</data>
<data name="Optimized" xml:space="preserve">
<value>Otimizado</value>
</data>
<data name="OptimizedGPUTooltip" xml:space="preserve">
<value>Passar ao Ecônomico em bateria e voltar quando carregando</value>
</data>
<data name="OptimizedUSBC" xml:space="preserve">
<value>Manter o GPU desligado com um carregador USB-C no Modo Otimizado</value>
</data>
<data name="Other" xml:space="preserve">
<value>Outro</value>
</data>
<data name="Overdrive" xml:space="preserve">
<value>Overdrive</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Modo Desempenho</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Imagem / Gif</value>
</data>
<data name="PlayPause" xml:space="preserve">
<value>Reproduzir / Pausar</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Limitações de Energia (PPT)</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Limitações de Energia (PPT) é uma funcionalidade experimental. Usar isso com cuidado </value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Captura de tela</value>
</data>
<data name="Quit" xml:space="preserve">
<value>Sair</value>
</data>
<data name="GPUCoreClockOffset" xml:space="preserve">
<value>Aumento da frequência básica</value>
</data>
<data name="GPUMemoryClockOffset" xml:space="preserve">
<value>Aumento da frequência da memória</value>
</data>
<data name="KeyBindings" xml:space="preserve">
<value>Combinações de teclas</value>
</data>
<data name="RPM" xml:space="preserve">
<value>RPM</value>
</data>
<data name="RestartGPU" xml:space="preserve">
<value>Algum processo está usando o dGPU e impedindo o modo Econômico. Reinicialize o dGPU no gerenciador de dispositivos. Por favor, proceda por sua conta e risco. </value>
</data>
<data name="RunOnStartup" xml:space="preserve">
<value>Executar ao iniciar</value>
</data>
<data name="Shutdown" xml:space="preserve">
<value>Desligar</value>
</data>
<data name="Silent" xml:space="preserve">
<value>Silencioso</value>
</data>
<data name="Sleep" xml:space="preserve">
<value>Hibernação</value>
</data>
<data name="StandardGPUTooltip" xml:space="preserve">
<value>Liga o dGPU para uso padrão</value>
</data>
<data name="StandardMode" xml:space="preserve">
<value>Padrão</value>
</data>
<data name="StartupError" xml:space="preserve">
<value>Erro ao iniciar</value>
</data>
<data name="ToggleAura" xml:space="preserve">
<value>Alternar Aura</value>
</data>
<data name="ToggleMiniled" xml:space="preserve">
<value>Alternar Miniled (se suportado) </value>
</data>
<data name="ToggleScreen" xml:space="preserve">
<value>Alternar Tela</value>
</data>
<data name="Turbo" xml:space="preserve">
<value>Turbo</value>
</data>
<data name="TurnedOff" xml:space="preserve">
<value>Desligado</value>
</data>
<data name="TurnOffOnBattery" xml:space="preserve">
<value>Desligar em bateria</value>
</data>
<data name="UltimateGPUTooltip" xml:space="preserve">
<value>Direciona a tela do computador ao dGPU</value>
</data>
<data name="UltimateMode" xml:space="preserve">
<value>Ultimate</value>
</data>
<data name="VersionLabel" xml:space="preserve">
<value>Versão</value>
</data>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ACPIError" xml:space="preserve">
<value>Não foi possível conectar ao ASUS ACPI. O applicativo não pode funcionar sem isso. Tente instalar Asus System Controle Interface</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Parece que o GPU está em uso pesado.</value>
</data>
<data name="AlertDGPUTitle" xml:space="preserve">
<value>Modo econômico</value>
</data>
<data name="AlertUltimateOff" xml:space="preserve">
<value>Passar ao Modo Final implica na reinicialização do sistema</value>
</data>
<data name="AlertUltimateOn" xml:space="preserve">
<value>Modo Ultimado necessita de reinicialização.</value>
</data>
<data name="AlertUltimateTitle" xml:space="preserve">
<value>Reiniciar agora ?</value>
</data>
<data name="AnimationSpeed" xml:space="preserve">
<value>Velocidade da Animação</value>
</data>
<data name="AnimeMatrix" xml:space="preserve">
<value>Anime Matrix</value>
</data>
<data name="AppAlreadyRunning" xml:space="preserve">
<value>O applicativo já está em execução</value>
</data>
<data name="AppAlreadyRunningText" xml:space="preserve">
<value>G-Helper já está em execução. Verifique a barra de sistema</value>
</data>
<data name="ApplyFanCurve" xml:space="preserve">
<value>Aplicar a curva personalizada</value>
</data>
<data name="ApplyPowerLimits" xml:space="preserve">
<value>Aplicar as limitações de energia</value>
</data>
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Ajuste automático dos modos de energia do Windows</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Serviços da Asus em execução</value>
</data>
<data name="AuraBreathe" xml:space="preserve">
<value>Repiração</value>
</data>
<data name="AuraColorCycle" xml:space="preserve">
<value>Ciclo de cores</value>
</data>
<data name="AuraFast" xml:space="preserve">
<value>Rápido</value>
</data>
<data name="AuraNormal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="AuraRainbow" xml:space="preserve">
<value>Arco-íris</value>
</data>
<data name="AuraSlow" xml:space="preserve">
<value>Lento</value>
</data>
<data name="AuraStatic" xml:space="preserve">
<value>Estático</value>
</data>
<data name="AuraStrobe" xml:space="preserve">
<value>Estroboscópio</value>
</data>
<data name="AutoMode" xml:space="preserve">
<value>Automático</value>
</data>
<data name="AutoRefreshTooltip" xml:space="preserve">
<value>Menor taxa de atualização quando estiver na bateria</value>
</data>
<data name="Awake" xml:space="preserve">
<value>Acordado</value>
</data>
<data name="BacklightTimeout" xml:space="preserve">
<value>Tempo limite da iluminação na bateria (em segundos)</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Tempo limite da iluminação carregando (0 - sempre ligado)</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Equilibrado</value>
</data>
<data name="BatteryChargeLimit" xml:space="preserve">
<value>Limite de carga</value>
</data>
<data name="Boot" xml:space="preserve">
<value>Ao ligar</value>
</data>
<data name="Brightness" xml:space="preserve">
<value>Nível do brilho</value>
</data>
<data name="Color" xml:space="preserve">
<value>Cor</value>
</data>
<data name="CPUBoost" xml:space="preserve">
<value>CPU Boost</value>
</data>
<data name="Custom" xml:space="preserve">
<value>Personalizado</value>
</data>
<data name="Default" xml:space="preserve">
<value>Padrão</value>
</data>
<data name="DisableOverdrive" xml:space="preserve">
<value>Desativar o overdrive da tela</value>
</data>
<data name="Discharging" xml:space="preserve">
<value>Descarregando</value>
</data>
<data name="DownloadUpdate" xml:space="preserve">
<value>Baixar a atualização</value>
</data>
<data name="EcoGPUTooltip" xml:space="preserve">
<value>Desativar o dGPU para economisar a energía</value>
</data>
<data name="EcoMode" xml:space="preserve">
<value>Econômico</value>
</data>
<data name="Extra" xml:space="preserve">
<value>Adicional</value>
</data>
<data name="ExtraSettings" xml:space="preserve">
<value>Configurações adicionais</value>
</data>
<data name="FactoryDefaults" xml:space="preserve">
<value>Padrão de fábrica</value>
</data>
<data name="FanCurves" xml:space="preserve">
<value>Curvas de ventilador</value>
</data>
<data name="FanProfileCPU" xml:space="preserve">
<value>Perfil de ventilador CPU</value>
</data>
<data name="FanProfileGPU" xml:space="preserve">
<value>Perfil de ventilador GPU</value>
</data>
<data name="FanProfileMid" xml:space="preserve">
<value>Perfil de ventilador central</value>
</data>
<data name="FanProfiles" xml:space="preserve">
<value>Perfis de ventilador</value>
</data>
<data name="FansAndPower" xml:space="preserve">
<value>Ventiladores e Energía</value>
</data>
<data name="FanSpeed" xml:space="preserve">
<value>Vent</value>
</data>
<data name="FansPower" xml:space="preserve">
<value>Ventiladores + Energía</value>
</data>
<data name="FnLock" xml:space="preserve">
<value>Processar teclas de atalho Fn+F sem pressionar Fn</value>
</data>
<data name="GPUBoost" xml:space="preserve">
<value>Boost dinâmico</value>
</data>
<data name="GPUChanging" xml:space="preserve">
<value>Carregando</value>
</data>
<data name="GPUMode" xml:space="preserve">
<value>Modo de GPU</value>
</data>
<data name="GPUModeEco" xml:space="preserve">
<value>Só iGPU</value>
</data>
<data name="GPUModeStandard" xml:space="preserve">
<value>iGPU + dGPU</value>
</data>
<data name="GPUModeUltimate" xml:space="preserve">
<value>Exclusivamente dGPU</value>
</data>
<data name="GPUSettings" xml:space="preserve">
<value>Parâmetros de GPU</value>
</data>
<data name="GPUTempTarget" xml:space="preserve">
<value>Alvo de temperatura</value>
</data>
<data name="Keyboard" xml:space="preserve">
<value>Teclado</value>
</data>
<data name="KeyboardAuto" xml:space="preserve">
<value>Abaixar a luz de fundo na bateria e voltar quando carregando</value>
</data>
<data name="KeyboardBacklight" xml:space="preserve">
<value>Luz de fundo do teclado</value>
</data>
<data name="KillGpuApps" xml:space="preserve">
<value>Parar todos os aplicativos que usam a GPU ao alternar para o modo Eco</value>
</data>
<data name="LaptopBacklight" xml:space="preserve">
<value>Configurações de iluminação</value>
</data>
<data name="LaptopKeyboard" xml:space="preserve">
<value>Teclado</value>
</data>
<data name="LaptopScreen" xml:space="preserve">
<value>Tela</value>
</data>
<data name="Lid" xml:space="preserve">
<value>Tampa</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="MatrixBanner" xml:space="preserve">
<value>Bandeira Binária</value>
</data>
<data name="MatrixBright" xml:space="preserve">
<value>Brilho</value>
</data>
<data name="MatrixClock" xml:space="preserve">
<value>Relógio</value>
</data>
<data name="MatrixDim" xml:space="preserve">
<value>Escuro</value>
</data>
<data name="MatrixLogo" xml:space="preserve">
<value>Logo ROG</value>
</data>
<data name="MatrixMedium" xml:space="preserve">
<value>Médio</value>
</data>
<data name="MatrixOff" xml:space="preserve">
<value>Desligado</value>
</data>
<data name="MatrixPicture" xml:space="preserve">
<value>Imagem</value>
</data>
<data name="MaxRefreshTooltip" xml:space="preserve">
<value>Taxa de atualização máxima e menor latência</value>
</data>
<data name="MinRefreshTooltip" xml:space="preserve">
<value>Taxa de atualização à 60Hz para economizar bateria</value>
</data>
<data name="Multizone" xml:space="preserve">
<value>Multizona</value>
</data>
<data name="MuteMic" xml:space="preserve">
<value>Desligar microfone</value>
</data>
<data name="OpenGHelper" xml:space="preserve">
<value>Abrir G-Helper</value>
</data>
<data name="Optimized" xml:space="preserve">
<value>Otimizado</value>
</data>
<data name="OptimizedGPUTooltip" xml:space="preserve">
<value>Passar ao Ecônomico em bateria e voltar quando carregando</value>
</data>
<data name="OptimizedUSBC" xml:space="preserve">
<value>Manter a GPU desativada ao usar um carregador USB-C no modo Otimizado</value>
</data>
<data name="Other" xml:space="preserve">
<value>Outro</value>
</data>
<data name="Overdrive" xml:space="preserve">
<value>Overdrive</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Modo</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Imagem / Gif</value>
</data>
<data name="PlayPause" xml:space="preserve">
<value>Reproduzir / Pausar</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Limitações de Energia</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Limitações de Energia é uma funcionalidade experimental. Use com cuidado.</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Captura de tela</value>
</data>
<data name="Quit" xml:space="preserve">
<value>Sair</value>
</data>
<data name="GPUCoreClockOffset" xml:space="preserve">
<value>Aumento da frequência básica</value>
</data>
<data name="GPUMemoryClockOffset" xml:space="preserve">
<value>Aumento da frequência da memória</value>
</data>
<data name="KeyBindings" xml:space="preserve">
<value>Combinações de teclas</value>
</data>
<data name="RPM" xml:space="preserve">
<value>RPM</value>
</data>
<data name="RestartGPU" xml:space="preserve">
<value>Algum processo está usando o dGPU e impedindo o modo Econômico. Reinicialize o dGPU no gerenciador de dispositivos. Por favor, proceda por sua conta e risco. </value>
</data>
<data name="RunOnStartup" xml:space="preserve">
<value>Executar ao iniciar</value>
</data>
<data name="Shutdown" xml:space="preserve">
<value>Desligar</value>
</data>
<data name="Silent" xml:space="preserve">
<value>Silencioso</value>
</data>
<data name="Sleep" xml:space="preserve">
<value>Hibernação</value>
</data>
<data name="StandardGPUTooltip" xml:space="preserve">
<value>Liga o dGPU para uso padrão</value>
</data>
<data name="StandardMode" xml:space="preserve">
<value>Padrão</value>
</data>
<data name="StartupError" xml:space="preserve">
<value>Erro de inicialização</value>
</data>
<data name="Start" xml:space="preserve">
<value>Iniciar</value>
</data>
<data name="StartingServices" xml:space="preserve">
<value>Iniciando os serviços</value>
</data>
<data name="Stop" xml:space="preserve">
<value>Parar</value>
</data>
<data name="StoppingServices" xml:space="preserve">
<value>Parando os serviços</value>
</data>
<data name="ToggleAura" xml:space="preserve">
<value>Alternar Aura</value>
</data>
<data name="ToggleMiniled" xml:space="preserve">
<value>Alternar Miniled (se suportado) </value>
</data>
<data name="ToggleScreen" xml:space="preserve">
<value>Alternar Tela</value>
</data>
<data name="Turbo" xml:space="preserve">
<value>Turbo</value>
</data>
<data name="TurnedOff" xml:space="preserve">
<value>Desligado</value>
</data>
<data name="TurnOffOnBattery" xml:space="preserve">
<value>Desligar em bateria</value>
</data>
<data name="UltimateGPUTooltip" xml:space="preserve">
<value>Direciona a tela do computador ao dGPU</value>
</data>
<data name="UltimateMode" xml:space="preserve">
<value>Ultimate</value>
</data>
<data name="Updates" xml:space="preserve">
<value>Atualizações</value>
</data>
<data name="VersionLabel" xml:space="preserve">
<value>Versão</value>
</data>
<data name="VolumeDown" xml:space="preserve">
<value>Abaixar o volume</value>
</data>
<data name="VolumeUp" xml:space="preserve">
<value>Aumentar o volume</value>
</data>
<data name="VolumeMute" xml:space="preserve">
<value>Mudo</value>
</data>
<data name="WindowTop" xml:space="preserve">
<value>Manter o app em primeiro plano</value>
</data>
<value>Mudo</value>
</data>
<data name="WindowTop" xml:space="preserve">
<value>Manter a janela do aplicativo sempre no topo</value>
</data>
</root>

View File

@@ -403,7 +403,7 @@
<value>Overdrive</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Performance Mode</value>
<value>Mode</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Picture / Gif</value>
@@ -412,10 +412,10 @@
<value>Play / Pause</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Power Limits (PPT)</value>
<value>Power Limits</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Power Limits (PPT) is experimental feature. Use carefully and on your own risk!</value>
<value>Power Limits is experimental feature. Use carefully and on your own risk!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>PrintScreen</value>

View File

@@ -364,10 +364,10 @@
<value>Oynat / Duraklat</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Güç Sınırları (PPT)</value>
<value>Güç Sınırları</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Güç Sınırları (PPT) deneysel bir özelliktir. Riski göze alarak dikkatli kullanın!</value>
<value>Güç Sınırları deneysel bir özelliktir. Riski göze alarak dikkatli kullanın!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Ekran Görüntüsü Al</value>

View File

@@ -156,6 +156,9 @@
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Автоматично застосовувати Windows Power Modes</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Кількість запущених сервісів Asus</value>
</data>
<data name="AuraBreathe" xml:space="preserve">
<value>Дихання</value>
</data>
@@ -210,6 +213,12 @@
<data name="Brightness" xml:space="preserve">
<value>Яскравість</value>
</data>
<data name="BrightnessDown" xml:space="preserve">
<value>Зменшити яскравість</value>
</data>
<data name="BrightnessUp" xml:space="preserve">
<value>Підвищити яскравість</value>
</data>
<data name="Color" xml:space="preserve">
<value>Колір</value>
</data>
@@ -367,7 +376,7 @@
<value>Овердрайв</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Режим Роботи</value>
<value>Режим</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Картинка / GIF</value>
@@ -376,10 +385,10 @@
<value>Відтворення / Пауза</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Ліміти Потужності (PPT)</value>
<value>Ліміти Потужності</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Налаштування лімітів потужності (PPT) є експериментальною функцією. Використовуйте обережно та на свій страх і ризик!</value>
<value>Налаштування лімітів потужності є експериментальною функцією. Використовуйте обережно та на свій страх і ризик!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Print Screen</value>
@@ -408,9 +417,21 @@
<data name="StandardMode" xml:space="preserve">
<value>Стандартний</value>
</data>
<data name="Start" xml:space="preserve">
<value>Запустити</value>
</data>
<data name="StartingServices" xml:space="preserve">
<value>Запускаються сервіси</value>
</data>
<data name="StartupError" xml:space="preserve">
<value>Помилка запуску</value>
</data>
<data name="Stop" xml:space="preserve">
<value>Зупинити</value>
</data>
<data name="StoppingServices" xml:space="preserve">
<value>Зупиняються сервіси</value>
</data>
<data name="ToggleAura" xml:space="preserve">
<value>Аура</value>
</data>

View File

@@ -388,10 +388,10 @@
<value>Phát / Dừng</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Giới hạn công suất (PPT)</value>
<value>Giới hạn công suất</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Giới hạn công suất (PPT) là tính năng thử nghiệm. Sử dụng nó cẩn thận và tự chịu mọi rủi ro!</value>
<value>Giới hạn công suất là tính năng thử nghiệm. Sử dụng nó cẩn thận và tự chịu mọi rủi ro!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>Chụp màn hình</value>

View File

@@ -367,10 +367,10 @@
<value>播放/暂停</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>功率限制 (PPT)</value>
<value>功率限制</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>功率限制 (PPT) 是实验性功能。 谨慎使用,风险自负!</value>
<value>功率限制 是实验性功能。 谨慎使用,风险自负!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>截图</value>

View File

@@ -403,7 +403,7 @@
<value>播放/暫停</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>功率限制 (PPT)</value>
<value>功率限制</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>功率限制是實驗性功能。謹慎使用,風險自負!</value>

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

446
app/Ryzen/OpenLibSys.cs Normal file
View File

@@ -0,0 +1,446 @@
//-----------------------------------------------------------------------------
// Author : hiyohiyo
// Mail : hiyohiyo@crystalmark.info
// Web : http://openlibsys.org/
// License : The modified BSD license
//
// Copyright 2007-2009 OpenLibSys.org. All rights reserved.
//-----------------------------------------------------------------------------
// This is support library for WinRing0 1.3.x.
using System.Runtime.InteropServices;
namespace Ryzen
{
public class Ols : IDisposable
{
const string dllNameX64 = "WinRing0x64.dll";
const string dllName = "WinRing0.dll";
// for this support library
public enum Status
{
NO_ERROR = 0,
DLL_NOT_FOUND = 1,
DLL_INCORRECT_VERSION = 2,
DLL_INITIALIZE_ERROR = 3,
}
// for WinRing0
public enum OlsDllStatus
{
OLS_DLL_NO_ERROR = 0,
OLS_DLL_UNSUPPORTED_PLATFORM = 1,
OLS_DLL_DRIVER_NOT_LOADED = 2,
OLS_DLL_DRIVER_NOT_FOUND = 3,
OLS_DLL_DRIVER_UNLOADED = 4,
OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK = 5,
OLS_DLL_UNKNOWN_ERROR = 9
}
// for WinRing0
public enum OlsDriverType
{
OLS_DRIVER_TYPE_UNKNOWN = 0,
OLS_DRIVER_TYPE_WIN_9X = 1,
OLS_DRIVER_TYPE_WIN_NT = 2,
OLS_DRIVER_TYPE_WIN_NT4 = 3, // Obsolete
OLS_DRIVER_TYPE_WIN_NT_X64 = 4,
OLS_DRIVER_TYPE_WIN_NT_IA64 = 5
}
// for WinRing0
public enum OlsErrorPci : uint
{
OLS_ERROR_PCI_BUS_NOT_EXIST = 0xE0000001,
OLS_ERROR_PCI_NO_DEVICE = 0xE0000002,
OLS_ERROR_PCI_WRITE_CONFIG = 0xE0000003,
OLS_ERROR_PCI_READ_CONFIG = 0xE0000004
}
// Bus Number, Device Number and Function Number to PCI Device Address
public uint PciBusDevFunc(uint bus, uint dev, uint func)
{
return (bus & 0xFF) << 8 | (dev & 0x1F) << 3 | func & 7;
}
// PCI Device Address to Bus Number
public uint PciGetBus(uint address)
{
return address >> 8 & 0xFF;
}
// PCI Device Address to Device Number
public uint PciGetDev(uint address)
{
return address >> 3 & 0x1F;
}
// PCI Device Address to Function Number
public uint PciGetFunc(uint address)
{
return address & 7;
}
[DllImport("kernel32")]
public extern static nint LoadLibrary(string lpFileName);
[DllImport("kernel32", SetLastError = true)]
private static extern bool FreeLibrary(nint hModule);
[DllImport("kernel32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = false)]
private static extern nint GetProcAddress(nint hModule, [MarshalAs(UnmanagedType.LPStr)] string lpProcName);
private nint module = nint.Zero;
private uint status = (uint)Status.NO_ERROR;
public Ols()
{
string fileName;
if (nint.Size == 8)
{
fileName = dllNameX64;
}
else
{
fileName = dllName;
}
module = LoadLibrary(fileName);
if (module == nint.Zero)
{
status = (uint)Status.DLL_NOT_FOUND;
}
else
{
GetDllStatus = (_GetDllStatus)GetDelegate("GetDllStatus", typeof(_GetDllStatus));
GetDllVersion = (_GetDllVersion)GetDelegate("GetDllVersion", typeof(_GetDllVersion));
GetDriverVersion = (_GetDriverVersion)GetDelegate("GetDriverVersion", typeof(_GetDriverVersion));
GetDriverType = (_GetDriverType)GetDelegate("GetDriverType", typeof(_GetDriverType));
InitializeOls = (_InitializeOls)GetDelegate("InitializeOls", typeof(_InitializeOls));
DeinitializeOls = (_DeinitializeOls)GetDelegate("DeinitializeOls", typeof(_DeinitializeOls));
IsCpuid = (_IsCpuid)GetDelegate("IsCpuid", typeof(_IsCpuid));
IsMsr = (_IsMsr)GetDelegate("IsMsr", typeof(_IsMsr));
IsTsc = (_IsTsc)GetDelegate("IsTsc", typeof(_IsTsc));
Hlt = (_Hlt)GetDelegate("Hlt", typeof(_Hlt));
HltTx = (_HltTx)GetDelegate("HltTx", typeof(_HltTx));
HltPx = (_HltPx)GetDelegate("HltPx", typeof(_HltPx));
Rdmsr = (_Rdmsr)GetDelegate("Rdmsr", typeof(_Rdmsr));
RdmsrTx = (_RdmsrTx)GetDelegate("RdmsrTx", typeof(_RdmsrTx));
RdmsrPx = (_RdmsrPx)GetDelegate("RdmsrPx", typeof(_RdmsrPx));
Wrmsr = (_Wrmsr)GetDelegate("Wrmsr", typeof(_Wrmsr));
WrmsrTx = (_WrmsrTx)GetDelegate("WrmsrTx", typeof(_WrmsrTx));
WrmsrPx = (_WrmsrPx)GetDelegate("WrmsrPx", typeof(_WrmsrPx));
Rdpmc = (_Rdpmc)GetDelegate("Rdpmc", typeof(_Rdpmc));
RdpmcTx = (_RdpmcTx)GetDelegate("RdpmcTx", typeof(_RdpmcTx));
RdpmcPx = (_RdpmcPx)GetDelegate("RdpmcPx", typeof(_RdpmcPx));
Cpuid = (_Cpuid)GetDelegate("Cpuid", typeof(_Cpuid));
CpuidTx = (_CpuidTx)GetDelegate("CpuidTx", typeof(_CpuidTx));
CpuidPx = (_CpuidPx)GetDelegate("CpuidPx", typeof(_CpuidPx));
Rdtsc = (_Rdtsc)GetDelegate("Rdtsc", typeof(_Rdtsc));
RdtscTx = (_RdtscTx)GetDelegate("RdtscTx", typeof(_RdtscTx));
RdtscPx = (_RdtscPx)GetDelegate("RdtscPx", typeof(_RdtscPx));
ReadIoPortByte = (_ReadIoPortByte)GetDelegate("ReadIoPortByte", typeof(_ReadIoPortByte));
ReadIoPortWord = (_ReadIoPortWord)GetDelegate("ReadIoPortWord", typeof(_ReadIoPortWord));
ReadIoPortDword = (_ReadIoPortDword)GetDelegate("ReadIoPortDword", typeof(_ReadIoPortDword));
ReadIoPortByteEx = (_ReadIoPortByteEx)GetDelegate("ReadIoPortByteEx", typeof(_ReadIoPortByteEx));
ReadIoPortWordEx = (_ReadIoPortWordEx)GetDelegate("ReadIoPortWordEx", typeof(_ReadIoPortWordEx));
ReadIoPortDwordEx = (_ReadIoPortDwordEx)GetDelegate("ReadIoPortDwordEx", typeof(_ReadIoPortDwordEx));
WriteIoPortByte = (_WriteIoPortByte)GetDelegate("WriteIoPortByte", typeof(_WriteIoPortByte));
WriteIoPortWord = (_WriteIoPortWord)GetDelegate("WriteIoPortWord", typeof(_WriteIoPortWord));
WriteIoPortDword = (_WriteIoPortDword)GetDelegate("WriteIoPortDword", typeof(_WriteIoPortDword));
WriteIoPortByteEx = (_WriteIoPortByteEx)GetDelegate("WriteIoPortByteEx", typeof(_WriteIoPortByteEx));
WriteIoPortWordEx = (_WriteIoPortWordEx)GetDelegate("WriteIoPortWordEx", typeof(_WriteIoPortWordEx));
WriteIoPortDwordEx = (_WriteIoPortDwordEx)GetDelegate("WriteIoPortDwordEx", typeof(_WriteIoPortDwordEx));
SetPciMaxBusIndex = (_SetPciMaxBusIndex)GetDelegate("SetPciMaxBusIndex", typeof(_SetPciMaxBusIndex));
ReadPciConfigByte = (_ReadPciConfigByte)GetDelegate("ReadPciConfigByte", typeof(_ReadPciConfigByte));
ReadPciConfigWord = (_ReadPciConfigWord)GetDelegate("ReadPciConfigWord", typeof(_ReadPciConfigWord));
ReadPciConfigDword = (_ReadPciConfigDword)GetDelegate("ReadPciConfigDword", typeof(_ReadPciConfigDword));
ReadPciConfigByteEx = (_ReadPciConfigByteEx)GetDelegate("ReadPciConfigByteEx", typeof(_ReadPciConfigByteEx));
ReadPciConfigWordEx = (_ReadPciConfigWordEx)GetDelegate("ReadPciConfigWordEx", typeof(_ReadPciConfigWordEx));
ReadPciConfigDwordEx = (_ReadPciConfigDwordEx)GetDelegate("ReadPciConfigDwordEx", typeof(_ReadPciConfigDwordEx));
ReadPciConfigDwordEx64 = (_ReadPciConfigDwordEx64)GetDelegate("ReadPciConfigDwordEx", typeof(_ReadPciConfigDwordEx64));
WritePciConfigByte = (_WritePciConfigByte)GetDelegate("WritePciConfigByte", typeof(_WritePciConfigByte));
WritePciConfigWord = (_WritePciConfigWord)GetDelegate("WritePciConfigWord", typeof(_WritePciConfigWord));
WritePciConfigDword = (_WritePciConfigDword)GetDelegate("WritePciConfigDword", typeof(_WritePciConfigDword));
WritePciConfigByteEx = (_WritePciConfigByteEx)GetDelegate("WritePciConfigByteEx", typeof(_WritePciConfigByteEx));
WritePciConfigWordEx = (_WritePciConfigWordEx)GetDelegate("WritePciConfigWordEx", typeof(_WritePciConfigWordEx));
WritePciConfigDwordEx = (_WritePciConfigDwordEx)GetDelegate("WritePciConfigDwordEx", typeof(_WritePciConfigDwordEx));
WritePciConfigDwordEx64 = (_WritePciConfigDwordEx64)GetDelegate("WritePciConfigDwordEx", typeof(_WritePciConfigDwordEx64));
FindPciDeviceById = (_FindPciDeviceById)GetDelegate("FindPciDeviceById", typeof(_FindPciDeviceById));
FindPciDeviceByClass = (_FindPciDeviceByClass)GetDelegate("FindPciDeviceByClass", typeof(_FindPciDeviceByClass));
/*
ReadDmiMemory = (_ReadDmiMemory)GetDelegate("ReadDmiMemory", typeof(_ReadDmiMemory));
ReadPhysicalMemory = (_ReadPhysicalMemory)GetDelegate("ReadPhysicalMemory", typeof(_ReadPhysicalMemory));
WritePhysicalMemory = (_WritePhysicalMemory)GetDelegate("WritePhysicalMemory", typeof(_WritePhysicalMemory));
*/
if (!(
GetDllStatus != null
&& GetDllVersion != null
&& GetDriverVersion != null
&& GetDriverType != null
&& InitializeOls != null
&& DeinitializeOls != null
&& IsCpuid != null
&& IsMsr != null
&& IsTsc != null
&& Hlt != null
&& HltTx != null
&& HltPx != null
&& Rdmsr != null
&& RdmsrTx != null
&& RdmsrPx != null
&& Wrmsr != null
&& WrmsrTx != null
&& WrmsrPx != null
&& Rdpmc != null
&& RdpmcTx != null
&& RdpmcPx != null
&& Cpuid != null
&& CpuidTx != null
&& CpuidPx != null
&& Rdtsc != null
&& RdtscTx != null
&& RdtscPx != null
&& ReadIoPortByte != null
&& ReadIoPortWord != null
&& ReadIoPortDword != null
&& ReadIoPortByteEx != null
&& ReadIoPortWordEx != null
&& ReadIoPortDwordEx != null
&& WriteIoPortByte != null
&& WriteIoPortWord != null
&& WriteIoPortDword != null
&& WriteIoPortByteEx != null
&& WriteIoPortWordEx != null
&& WriteIoPortDwordEx != null
&& SetPciMaxBusIndex != null
&& ReadPciConfigByte != null
&& ReadPciConfigWord != null
&& ReadPciConfigDword != null
&& ReadPciConfigByteEx != null
&& ReadPciConfigWordEx != null
&& ReadPciConfigDwordEx != null
&& ReadPciConfigDwordEx64 != null
&& WritePciConfigByte != null
&& WritePciConfigWord != null
&& WritePciConfigDword != null
&& WritePciConfigByteEx != null
&& WritePciConfigWordEx != null
&& WritePciConfigDwordEx != null
&& WritePciConfigDwordEx64 != null
&& FindPciDeviceById != null
&& FindPciDeviceByClass != null
/*&& ReadDmiMemory != null
&& ReadPhysicalMemory != null
&& WritePhysicalMemory != null
*/
))
{
status = (uint)Status.DLL_INCORRECT_VERSION;
}
if (InitializeOls() == 0)
{
status = (uint)Status.DLL_INITIALIZE_ERROR;
}
}
}
public uint GetStatus()
{
return status;
}
public void Dispose()
{
if (module != nint.Zero)
{
DeinitializeOls();
FreeLibrary(module);
module = nint.Zero;
}
}
public Delegate GetDelegate(string procName, Type delegateType)
{
nint ptr = GetProcAddress(module, procName);
if (ptr != nint.Zero)
{
Delegate d = Marshal.GetDelegateForFunctionPointer(ptr, delegateType);
return d;
}
int result = Marshal.GetHRForLastWin32Error();
throw Marshal.GetExceptionForHR(result);
}
//-----------------------------------------------------------------------------
// DLL Information
//-----------------------------------------------------------------------------
public delegate uint _GetDllStatus();
public delegate uint _GetDllVersion(ref byte major, ref byte minor, ref byte revision, ref byte release);
public delegate uint _GetDriverVersion(ref byte major, ref byte minor, ref byte revision, ref byte release);
public delegate uint _GetDriverType();
public delegate int _InitializeOls();
public delegate void _DeinitializeOls();
public _GetDllStatus GetDllStatus = null;
public _GetDriverType GetDriverType = null;
public _GetDllVersion GetDllVersion = null;
public _GetDriverVersion GetDriverVersion = null;
public _InitializeOls InitializeOls = null;
public _DeinitializeOls DeinitializeOls = null;
//-----------------------------------------------------------------------------
// CPU
//-----------------------------------------------------------------------------
public delegate int _IsCpuid();
public delegate int _IsMsr();
public delegate int _IsTsc();
public delegate int _Hlt();
public delegate int _HltTx(nuint threadAffinityMask);
public delegate int _HltPx(nuint processAffinityMask);
public delegate int _Rdmsr(uint index, ref uint eax, ref uint edx);
public delegate int _RdmsrTx(uint index, ref uint eax, ref uint edx, nuint threadAffinityMask);
public delegate int _RdmsrPx(uint index, ref uint eax, ref uint edx, nuint processAffinityMask);
public delegate int _Wrmsr(uint index, uint eax, uint edx);
public delegate int _WrmsrTx(uint index, uint eax, uint edx, nuint threadAffinityMask);
public delegate int _WrmsrPx(uint index, uint eax, uint edx, nuint processAffinityMask);
public delegate int _Rdpmc(uint index, ref uint eax, ref uint edx);
public delegate int _RdpmcTx(uint index, ref uint eax, ref uint edx, nuint threadAffinityMask);
public delegate int _RdpmcPx(uint index, ref uint eax, ref uint edx, nuint processAffinityMask);
public delegate int _Cpuid(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx);
public delegate int _CpuidTx(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx, nuint threadAffinityMask);
public delegate int _CpuidPx(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx, nuint processAffinityMask);
public delegate int _Rdtsc(ref uint eax, ref uint edx);
public delegate int _RdtscTx(ref uint eax, ref uint edx, nuint threadAffinityMask);
public delegate int _RdtscPx(ref uint eax, ref uint edx, nuint processAffinityMask);
public _IsCpuid IsCpuid = null;
public _IsMsr IsMsr = null;
public _IsTsc IsTsc = null;
public _Hlt Hlt = null;
public _HltTx HltTx = null;
public _HltPx HltPx = null;
public _Rdmsr Rdmsr = null;
public _RdmsrTx RdmsrTx = null;
public _RdmsrPx RdmsrPx = null;
public _Wrmsr Wrmsr = null;
public _WrmsrTx WrmsrTx = null;
public _WrmsrPx WrmsrPx = null;
public _Rdpmc Rdpmc = null;
public _RdpmcTx RdpmcTx = null;
public _RdpmcPx RdpmcPx = null;
public _Cpuid Cpuid = null;
public _CpuidTx CpuidTx = null;
public _CpuidPx CpuidPx = null;
public _Rdtsc Rdtsc = null;
public _RdtscTx RdtscTx = null;
public _RdtscPx RdtscPx = null;
//-----------------------------------------------------------------------------
// I/O
//-----------------------------------------------------------------------------
public delegate byte _ReadIoPortByte(ushort port);
public delegate ushort _ReadIoPortWord(ushort port);
public delegate uint _ReadIoPortDword(ushort port);
public _ReadIoPortByte ReadIoPortByte;
public _ReadIoPortWord ReadIoPortWord;
public _ReadIoPortDword ReadIoPortDword;
public delegate int _ReadIoPortByteEx(ushort port, ref byte value);
public delegate int _ReadIoPortWordEx(ushort port, ref ushort value);
public delegate int _ReadIoPortDwordEx(ushort port, ref uint value);
public _ReadIoPortByteEx ReadIoPortByteEx;
public _ReadIoPortWordEx ReadIoPortWordEx;
public _ReadIoPortDwordEx ReadIoPortDwordEx;
public delegate void _WriteIoPortByte(ushort port, byte value);
public delegate void _WriteIoPortWord(ushort port, ushort value);
public delegate void _WriteIoPortDword(ushort port, uint value);
public _WriteIoPortByte WriteIoPortByte;
public _WriteIoPortWord WriteIoPortWord;
public _WriteIoPortDword WriteIoPortDword;
public delegate int _WriteIoPortByteEx(ushort port, byte value);
public delegate int _WriteIoPortWordEx(ushort port, ushort value);
public delegate int _WriteIoPortDwordEx(ushort port, uint value);
public _WriteIoPortByteEx WriteIoPortByteEx;
public _WriteIoPortWordEx WriteIoPortWordEx;
public _WriteIoPortDwordEx WriteIoPortDwordEx;
//-----------------------------------------------------------------------------
// PCI
//-----------------------------------------------------------------------------
public delegate void _SetPciMaxBusIndex(byte max);
public _SetPciMaxBusIndex SetPciMaxBusIndex;
public delegate byte _ReadPciConfigByte(uint pciAddress, byte regAddress);
public delegate ushort _ReadPciConfigWord(uint pciAddress, byte regAddress);
public delegate uint _ReadPciConfigDword(uint pciAddress, byte regAddress);
public _ReadPciConfigByte ReadPciConfigByte;
public _ReadPciConfigWord ReadPciConfigWord;
public _ReadPciConfigDword ReadPciConfigDword;
public delegate int _ReadPciConfigByteEx(uint pciAddress, uint regAddress, ref byte value);
public delegate int _ReadPciConfigWordEx(uint pciAddress, uint regAddress, ref ushort value);
public delegate int _ReadPciConfigDwordEx(uint pciAddress, uint regAddress, ref uint value);
public _ReadPciConfigByteEx ReadPciConfigByteEx;
public _ReadPciConfigWordEx ReadPciConfigWordEx;
public _ReadPciConfigDwordEx ReadPciConfigDwordEx;
public delegate int _ReadPciConfigDwordEx64(uint pciAddress, uint regAddress, ref ulong value);
public _ReadPciConfigDwordEx64 ReadPciConfigDwordEx64;
public delegate void _WritePciConfigByte(uint pciAddress, byte regAddress, byte value);
public delegate void _WritePciConfigWord(uint pciAddress, byte regAddress, ushort value);
public delegate void _WritePciConfigDword(uint pciAddress, byte regAddress, uint value);
public _WritePciConfigByte WritePciConfigByte;
public _WritePciConfigWord WritePciConfigWord;
public _WritePciConfigDword WritePciConfigDword;
public delegate int _WritePciConfigByteEx(uint pciAddress, uint regAddress, byte value);
public delegate int _WritePciConfigWordEx(uint pciAddress, uint regAddress, ushort value);
public delegate int _WritePciConfigDwordEx(uint pciAddress, uint regAddress, uint value);
public _WritePciConfigByteEx WritePciConfigByteEx;
public _WritePciConfigWordEx WritePciConfigWordEx;
public _WritePciConfigDwordEx WritePciConfigDwordEx;
public delegate int _WritePciConfigDwordEx64(uint pciAddress, uint regAddress, ulong value);
public _WritePciConfigDwordEx64 WritePciConfigDwordEx64;
public delegate uint _FindPciDeviceById(ushort vendorId, ushort deviceId, byte index);
public delegate uint _FindPciDeviceByClass(byte baseClass, byte subClass, byte programIf, byte index);
public _FindPciDeviceById FindPciDeviceById;
public _FindPciDeviceByClass FindPciDeviceByClass;
//-----------------------------------------------------------------------------
// Physical Memory (unsafe)
//-----------------------------------------------------------------------------
/*public unsafe delegate uint _ReadDmiMemory(byte* buffer, uint count, uint unitSize);
public _ReadDmiMemory ReadDmiMemory;
public unsafe delegate uint _ReadPhysicalMemory(UIntPtr address, byte* buffer, uint count, uint unitSize);
public unsafe delegate uint _WritePhysicalMemory(UIntPtr address, byte* buffer, uint count, uint unitSize);
public _ReadPhysicalMemory ReadPhysicalMemory;
public _WritePhysicalMemory WritePhysicalMemory;
*/
}
}

239
app/Ryzen/RyzenSmu.cs Normal file
View File

@@ -0,0 +1,239 @@
//
// This is a optimised/simplified version of Ryzen System Management Unit from https://github.com/JamesCJ60/Universal-x86-Tuning-Utility
// I do not take credit for the full functionality of the code (c)
//
[assembly: CLSCompliant(false)]
namespace Ryzen
{
class Smu
{
public enum Status : int
{
BAD = 0x0,
OK = 0x1,
FAILED = 0xFF,
UNKNOWN_CMD = 0xFE,
CMD_REJECTED_PREREQ = 0xFD,
CMD_REJECTED_BUSY = 0xFC
}
private static readonly Dictionary<Status, string> status = new Dictionary<Status, string>()
{
{ Status.BAD, "BAD" },
{ Status.OK, "OK" },
{ Status.FAILED, "Failed" },
{ Status.UNKNOWN_CMD, "Unknown Command" },
{ Status.CMD_REJECTED_PREREQ, "CMD Rejected Prereq" },
{ Status.CMD_REJECTED_BUSY, "CMD Rejected Busy" }
};
Ols RyzenNbAccesss;
public Smu(bool EnableDebug)
{
ShowDebug = EnableDebug;
RyzenNbAccesss = new Ols();
// Check WinRing0 status
switch (RyzenNbAccesss.GetDllStatus())
{
case (uint)Ols.OlsDllStatus.OLS_DLL_NO_ERROR:
if (ShowDebug)
{
//MessageBox.Show("Ols Dll is OK.", "Ols.OlsDllStatus:");
}
break;
case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED:
//MessageBox.Show("WinRing OLS_DRIVER_NOT_LOADED", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing OLS_DRIVER_NOT_LOADED");
case (uint)Ols.OlsDllStatus.OLS_DLL_UNSUPPORTED_PLATFORM:
//MessageBox.Show("WinRing OLS_UNSUPPORTED_PLATFORM", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing OLS_UNSUPPORTED_PLATFORM");
case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_FOUND:
//MessageBox.Show("WinRing OLS_DLL_DRIVER_NOT_FOUND", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing OLS_DLL_DRIVER_NOT_FOUND");
case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_UNLOADED:
//MessageBox.Show("WinRing OLS_DLL_DRIVER_UNLOADED", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing OLS_DLL_DRIVER_UNLOADED");
case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK:
//MessageBox.Show("WinRing DRIVER_NOT_LOADED_ON_NETWORK", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing DRIVER_NOT_LOADED_ON_NETWORK");
case (uint)Ols.OlsDllStatus.OLS_DLL_UNKNOWN_ERROR:
//MessageBox.Show("WinRing OLS_DLL_UNKNOWN_ERROR", "Ols.OlsDllStatus:");
throw new ApplicationException("WinRing OLS_DLL_UNKNOWN_ERROR");
}
}
public void Initialize()
{
amdSmuMutex = new Mutex();
RyzenNbAccesss.InitializeOls();
// Check WinRing0 status
switch (RyzenNbAccesss.GetStatus())
{
case (uint)Ols.Status.NO_ERROR:
if (ShowDebug)
{
//MessageBox.Show("Ols is OK.", "Ols.Status:");
ShowDebug = false;
}
break;
case (uint)Ols.Status.DLL_NOT_FOUND:
//MessageBox.Show("WinRing Status: DLL_NOT_FOUND", "Ols.Status:");
throw new ApplicationException("WinRing DLL_NOT_FOUND");
break;
case (uint)Ols.Status.DLL_INCORRECT_VERSION:
//MessageBox.Show("WinRing Status: DLL_INCORRECT_VERSION", "Ols.Status:");
throw new ApplicationException("WinRing DLL_INCORRECT_VERSION");
break;
case (uint)Ols.Status.DLL_INITIALIZE_ERROR:
//MessageBox.Show("WinRing Status: DLL_INITIALIZE_ERROR", "Ols.Status:");
throw new ApplicationException("WinRing DLL_INITIALIZE_ERROR");
break;
default:
break;
}
}
public void Deinitialize()
{
RyzenNbAccesss.DeinitializeOls();
}
public static uint SMU_PCI_ADDR { get; set; }
public static uint SMU_OFFSET_ADDR { get; set; }
public static uint SMU_OFFSET_DATA { get; set; }
public static uint MP1_ADDR_MSG { get; set; }
public static uint MP1_ADDR_RSP { get; set; }
public static uint MP1_ADDR_ARG { get; set; }
public static uint PSMU_ADDR_MSG { get; set; }
public static uint PSMU_ADDR_RSP { get; set; }
public static uint PSMU_ADDR_ARG { get; set; }
public static uint[] args { get; set; }
public bool ShowDebug { get; set; }
private static Mutex amdSmuMutex;
private const ushort SMU_TIMEOUT = 8192;
public Status SendMp1(uint message, ref uint[] arguments)
{
return SendMsg(MP1_ADDR_MSG, MP1_ADDR_RSP, MP1_ADDR_ARG, message, ref arguments);
}
public Status SendPsmu(uint message, ref uint[] arguments)
{
return SendMsg(PSMU_ADDR_MSG, PSMU_ADDR_RSP, PSMU_ADDR_ARG, message, ref arguments);
}
public Status SendMsg(uint SMU_ADDR_MSG, uint SMU_ADDR_RSP, uint SMU_ADDR_ARG, uint msg, ref uint[] args)
{
ushort timeout = SMU_TIMEOUT;
uint[] cmdArgs = new uint[6];
int argsLength = args.Length;
uint status = 0;
if (argsLength > cmdArgs.Length)
argsLength = cmdArgs.Length;
for (int i = 0; i < argsLength; ++i)
cmdArgs[i] = args[i];
if (amdSmuMutex.WaitOne(5000))
{
// Clear response register
bool temp;
do
temp = SmuWriteReg(SMU_ADDR_RSP, 0);
while (!temp && --timeout > 0);
if (timeout == 0)
{
amdSmuMutex.ReleaseMutex();
SmuReadReg(SMU_ADDR_RSP, ref status);
return (Status)status;
}
// Write data
for (int i = 0; i < cmdArgs.Length; ++i)
SmuWriteReg(SMU_ADDR_ARG + (uint)(i * 4), cmdArgs[i]);
// Send message
SmuWriteReg(SMU_ADDR_MSG, msg);
// Wait done
if (!SmuWaitDone(SMU_ADDR_RSP))
{
amdSmuMutex.ReleaseMutex();
SmuReadReg(SMU_ADDR_RSP, ref status);
return (Status)status;
}
// Read back args
for (int i = 0; i < args.Length; ++i)
SmuReadReg(SMU_ADDR_ARG + (uint)(i * 4), ref args[i]);
}
amdSmuMutex.ReleaseMutex();
SmuReadReg(SMU_ADDR_RSP, ref status);
return (Status)status;
}
public bool SmuWaitDone(uint SMU_ADDR_RSP)
{
bool res;
ushort timeout = SMU_TIMEOUT;
uint data = 0;
do
res = SmuReadReg(SMU_ADDR_RSP, ref data);
while ((!res || data != 1) && --timeout > 0);
if (timeout == 0 || data != 1) res = false;
return res;
}
private bool SmuWriteReg(uint addr, uint data)
{
if (RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_ADDR, addr) == 1)
{
return RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_DATA, data) == 1;
}
return false;
}
private bool SmuReadReg(uint addr, ref uint data)
{
if (RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_ADDR, addr) == 1)
{
return RyzenNbAccesss.ReadPciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_DATA, ref data) == 1;
}
return false;
}
}
}

1198
app/Ryzen/SendCommand.cs Normal file

File diff suppressed because it is too large Load Diff

199
app/Ryzen/Undervolter.cs Normal file
View File

@@ -0,0 +1,199 @@
//
// This is a optimised/simplified version of Ryzen System Management Unit from https://github.com/JamesCJ60/Universal-x86-Tuning-Utility
// I do not take credit for the full functionality of the code (c)
//
using System.Management;
namespace Ryzen
{
internal class Undervolter
{
public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" };
public static int FAMID { get; protected set; }
public static string CPUModel = "";
public static string CPUName = "";
//Zen1/+ - -1
//RAVEN - 0
//PICASSO - 1
//DALI - 2
//RENOIR/LUCIENNE - 3
//MATISSE - 4
//VANGOGH - 5
//VERMEER - 6
//CEZANNE/BARCELO - 7
//REMBRANDT - 8
//PHEONIX - 9
//RAPHAEL/DRAGON RANGE - 10
//MENDOCINO - 11
public static void Init()
{
//Get CPU name
try
{
ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor");
foreach (ManagementObject obj in myProcessorObject.Get())
{
CPUName = obj["Name"].ToString();
CPUModel = obj["Caption"].ToString();
}
} catch (Exception ex)
{
Logger.WriteLine(ex.Message);
}
FAMID = 99999;
if (CPUModel.Contains("Model " + Convert.ToString(1)) || CPUModel.Contains("Model " + Convert.ToString(8)))
{
FAMID = -1; //Zen1/+ DT
}
if (CPUModel.Contains("Model " + Convert.ToString(17)))
{
FAMID = 0; //RAVEN
}
if (CPUModel.Contains("Model " + Convert.ToString(24)))
{
FAMID = 1; //PICASSO
}
if (CPUModel.Contains("Model " + Convert.ToString(32)))
{
FAMID = 2; //DALI
}
if (CPUModel.Contains("Model " + Convert.ToString(33)))
{
FAMID = 6; //VERMEER
}
if (CPUModel.Contains("Model " + Convert.ToString(96)) || CPUModel.Contains("Model " + Convert.ToString(104)))
{
FAMID = 3; //RENOIR/LUCIENNE
}
if (CPUModel.Contains("Model " + Convert.ToString(144)))
{
FAMID = 5; //VANGOGH
}
if (CPUModel.Contains("Model " + Convert.ToString(80)))
{
FAMID = 7; //CEZANNE/BARCELO
}
if (CPUModel.Contains("Model " + Convert.ToString(64)) || CPUModel.Contains("Model " + Convert.ToString(68)))
{
FAMID = 8; //REMBRANDT
}
if (CPUModel.Contains("Model " + Convert.ToString(116)))
{
FAMID = 9; //PHEONIX
}
if (CPUModel.Contains("Model " + Convert.ToString(97)))
{
FAMID = 10; //RAPHAEL/DRAGON RANGE
}
if (CPUModel.Contains("Model " + Convert.ToString(160)))
{
FAMID = 11; //MENDOCINO
}
Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}");
SetAddresses();
}
public static bool IsAMD()
{
if (CPUName.Length == 0) Init();
return CPUName.Contains("AMD") || CPUName.Contains("Ryzen") || CPUName.Contains("Athlon") || CPUName.Contains("Radeon") || CPUName.Contains("AMD Custom APU 0405");
}
public static void SetAddresses()
{
Smu.SMU_PCI_ADDR = 0x00000000;
Smu.SMU_OFFSET_ADDR = 0xB8;
Smu.SMU_OFFSET_DATA = 0xBC;
if (FAMID == -1)
{
Smu.MP1_ADDR_MSG = 0X3B10528;
Smu.MP1_ADDR_RSP = 0X3B10564;
Smu.MP1_ADDR_ARG = 0X3B10598;
Smu.PSMU_ADDR_MSG = 0x3B1051C;
Smu.PSMU_ADDR_RSP = 0X3B10568;
Smu.PSMU_ADDR_ARG = 0X3B10590;
}
if (FAMID == 0 || FAMID == 1 || FAMID == 2 || FAMID == 3 || FAMID == 7)
{
Smu.MP1_ADDR_MSG = 0x3B10528;
Smu.MP1_ADDR_RSP = 0x3B10564;
Smu.MP1_ADDR_ARG = 0x3B10998;
Smu.PSMU_ADDR_MSG = 0x3B10A20;
Smu.PSMU_ADDR_RSP = 0x3B10A80;
Smu.PSMU_ADDR_ARG = 0x3B10A88;
}
else if (FAMID == 5 || FAMID == 8 || FAMID == 9 || FAMID == 11)
{
Smu.MP1_ADDR_MSG = 0x3B10528;
Smu.MP1_ADDR_RSP = 0x3B10578;
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)
{
Smu.MP1_ADDR_MSG = 0x3B10530;
Smu.MP1_ADDR_RSP = 0x3B1057C;
Smu.MP1_ADDR_ARG = 0x3B109C4;
Smu.PSMU_ADDR_MSG = 0x3B10524;
Smu.PSMU_ADDR_RSP = 0x3B10570;
Smu.PSMU_ADDR_ARG = 0x3B10A40;
}
else if (FAMID == 10)
{
Smu.MP1_ADDR_MSG = 0x3010508;
Smu.MP1_ADDR_RSP = 0x3010988;
Smu.MP1_ADDR_ARG = 0x3010984;
Smu.PSMU_ADDR_MSG = 0x3B10524;
Smu.PSMU_ADDR_RSP = 0x3B10570;
Smu.PSMU_ADDR_ARG = 0x3B10A40;
}
else
{
Smu.MP1_ADDR_MSG = 0;
Smu.MP1_ADDR_RSP = 0;
Smu.MP1_ADDR_ARG = 0;
Smu.PSMU_ADDR_MSG = 0;
Smu.PSMU_ADDR_RSP = 0;
Smu.PSMU_ADDR_ARG = 0;
}
}
}
}

View File

@@ -310,7 +310,7 @@ namespace GHelper
//
pictureBattery.BackgroundImage = (Image)resources.GetObject("pictureBattery.BackgroundImage");
pictureBattery.BackgroundImageLayout = ImageLayout.Zoom;
pictureBattery.Location = new Point(6, 0);
pictureBattery.Location = new Point(4, 1);
pictureBattery.Margin = new Padding(4);
pictureBattery.Name = "pictureBattery";
pictureBattery.Size = new Size(32, 32);
@@ -320,7 +320,7 @@ namespace GHelper
// labelBatteryTitle
//
labelBatteryTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelBatteryTitle.Location = new Point(34, 0);
labelBatteryTitle.Location = new Point(42, 0);
labelBatteryTitle.Margin = new Padding(8, 0, 8, 0);
labelBatteryTitle.Name = "labelBatteryTitle";
labelBatteryTitle.Size = new Size(393, 32);

View File

@@ -1,6 +1,7 @@
using CustomControls;
using GHelper.AnimeMatrix;
using GHelper.Gpu;
using Ryzen;
using System.Diagnostics;
using System.Net;
using System.Reflection;
@@ -23,7 +24,7 @@ namespace GHelper
public string versionUrl = "http://github.com/seerge/g-helper/releases";
public string perfName = "Balanced";
public string modeName = "Balanced";
public AniMatrix matrix;
public Fans fans;
@@ -79,6 +80,7 @@ namespace GHelper
buttonSilent.BorderColor = colorEco;
buttonBalanced.BorderColor = colorStandard;
buttonTurbo.BorderColor = colorTurbo;
buttonFans.BorderColor = colorCustom;
buttonEco.BorderColor = colorEco;
buttonStandard.BorderColor = colorStandard;
@@ -176,7 +178,7 @@ namespace GHelper
labelModel.Text = model + (ProcessHelper.IsUserAdministrator() ? "." : "");
TopMost = AppConfig.isConfig("topmost");
TopMost = AppConfig.Is("topmost");
SetContextMenu();
@@ -188,6 +190,16 @@ namespace GHelper
}
private void SettingsForm_VisibleChanged(object? sender, EventArgs e)
{
aTimer.Enabled = this.Visible;
if (this.Visible)
{
InitScreen();
InitXGM();
}
}
private void ButtonUpdates_Click(object? sender, EventArgs e)
{
if (updates == null || updates.Text == "")
@@ -247,7 +259,7 @@ namespace GHelper
public void SetContextMenu()
{
var mode = AppConfig.getConfig("performance_mode");
var mode = Modes.GetCurrent();
contextMenuStrip.Items.Clear();
Padding padding = new Padding(15, 5, 5, 5);
@@ -354,12 +366,12 @@ namespace GHelper
else
{
Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM");
AsusUSB.ApplyXGMLight(AppConfig.isConfig("xmg_light"));
AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light"));
await Task.Delay(TimeSpan.FromSeconds(15));
if (AppConfig.isConfigPerf("auto_apply"))
AsusUSB.SetXGMFan(AppConfig.getFanConfig(AsusFan.XGM));
if (AppConfig.IsMode("auto_apply"))
AsusUSB.SetXGMFan(AppConfig.GetFanConfig(AsusFan.XGM));
}
BeginInvoke(delegate
@@ -410,13 +422,13 @@ namespace GHelper
if (gitVersion.CompareTo(appVersion) > 0)
{
SetVersionLabel(Properties.Strings.DownloadUpdate + ": " + tag, url);
if (AppConfig.getConfigString("skip_version") != tag)
if (AppConfig.GetString("skip_version") != tag)
{
DialogResult dialogResult = MessageBox.Show(Properties.Strings.DownloadUpdate + ": G-Helper " + tag + "?", "Update", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
AutoUpdate(url);
else
AppConfig.setConfig("skip_version", tag);
AppConfig.Set("skip_version", tag);
}
}
@@ -557,14 +569,14 @@ namespace GHelper
private void ButtonOptimized_Click(object? sender, EventArgs e)
{
AppConfig.setConfig("gpu_auto", (AppConfig.getConfig("gpu_auto") == 1) ? 0 : 1);
AppConfig.Set("gpu_auto", (AppConfig.Get("gpu_auto") == 1) ? 0 : 1);
VisualiseGPUMode();
AutoGPUMode();
}
private void ButtonScreenAuto_Click(object? sender, EventArgs e)
{
AppConfig.setConfig("screen_auto", 1);
AppConfig.Set("screen_auto", 1);
InitScreen();
AutoScreen();
}
@@ -589,7 +601,7 @@ namespace GHelper
{
if (sender is null) return;
CheckBox check = (CheckBox)sender;
AppConfig.setConfig("matrix_auto", check.Checked ? 1 : 0);
AppConfig.Set("matrix_auto", check.Checked ? 1 : 0);
matrix?.SetMatrix();
}
@@ -616,8 +628,8 @@ namespace GHelper
if (fileName is not null)
{
AppConfig.setConfig("matrix_picture", fileName);
AppConfig.setConfig("matrix_running", 2);
AppConfig.Set("matrix_picture", fileName);
AppConfig.Set("matrix_running", 2);
matrix?.SetMatrixPicture(fileName);
BeginInvoke(delegate
@@ -631,21 +643,21 @@ namespace GHelper
private void ComboMatrixRunning_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("matrix_running", comboMatrixRunning.SelectedIndex);
AppConfig.Set("matrix_running", comboMatrixRunning.SelectedIndex);
matrix?.SetMatrix();
}
private void ComboMatrix_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("matrix_brightness", comboMatrix.SelectedIndex);
AppConfig.Set("matrix_brightness", comboMatrix.SelectedIndex);
matrix?.SetMatrix();
}
private void LabelCPUFan_Click(object? sender, EventArgs e)
{
AppConfig.setConfig("fan_rpm", (AppConfig.getConfig("fan_rpm") == 1) ? 0 : 1);
AppConfig.Set("fan_rpm", (AppConfig.Get("fan_rpm") == 1) ? 0 : 1);
RefreshSensors(true);
}
@@ -658,7 +670,7 @@ namespace GHelper
if (colorDlg.ShowDialog() == DialogResult.OK)
{
AppConfig.setConfig("aura_color2", colorDlg.Color.ToArgb());
AppConfig.Set("aura_color2", colorDlg.Color.ToArgb());
SetAura();
}
}
@@ -681,7 +693,7 @@ namespace GHelper
}
}
public void FansToggle()
public void FansToggle(int index = 0)
{
if (fans == null || fans.Text == "")
{
@@ -696,6 +708,7 @@ namespace GHelper
{
fans.FormPosition();
fans.Show();
fans.ToggleNavigation(index);
}
}
@@ -714,17 +727,17 @@ namespace GHelper
if (colorDlg.ShowDialog() == DialogResult.OK)
{
AppConfig.setConfig("aura_color", colorDlg.Color.ToArgb());
AppConfig.Set("aura_color", colorDlg.Color.ToArgb());
SetAura();
}
}
public void InitAura()
{
AsusUSB.Mode = AppConfig.getConfig("aura_mode");
AsusUSB.Speed = AppConfig.getConfig("aura_speed");
AsusUSB.SetColor(AppConfig.getConfig("aura_color"));
AsusUSB.SetColor2(AppConfig.getConfig("aura_color2"));
AsusUSB.Mode = AppConfig.Get("aura_mode");
AsusUSB.Speed = AppConfig.Get("aura_speed");
AsusUSB.SetColor(AppConfig.Get("aura_color"));
AsusUSB.SetColor2(AppConfig.Get("aura_color2"));
comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList;
comboKeyboard.DataSource = new BindingSource(AsusUSB.GetModes(), null);
@@ -760,13 +773,13 @@ namespace GHelper
return;
}
int brightness = AppConfig.getConfig("matrix_brightness");
int running = AppConfig.getConfig("matrix_running");
int brightness = AppConfig.Get("matrix_brightness");
int running = AppConfig.Get("matrix_running");
comboMatrix.SelectedIndex = (brightness != -1) ? Math.Min(brightness, comboMatrix.Items.Count - 1) : 0;
comboMatrixRunning.SelectedIndex = (running != -1) ? Math.Min(running, comboMatrixRunning.Items.Count - 1) : 0;
checkMatrix.Checked = (AppConfig.getConfig("matrix_auto") == 1);
checkMatrix.Checked = (AppConfig.Get("matrix_auto") == 1);
checkMatrix.CheckedChanged += CheckMatrix_CheckedChanged;
}
@@ -774,10 +787,10 @@ namespace GHelper
public void SetAura()
{
AsusUSB.Mode = AppConfig.getConfig("aura_mode");
AsusUSB.Speed = AppConfig.getConfig("aura_speed");
AsusUSB.SetColor(AppConfig.getConfig("aura_color"));
AsusUSB.SetColor2(AppConfig.getConfig("aura_color2"));
AsusUSB.Mode = AppConfig.Get("aura_mode");
AsusUSB.Speed = AppConfig.Get("aura_speed");
AsusUSB.SetColor(AppConfig.Get("aura_color"));
AsusUSB.SetColor2(AppConfig.Get("aura_color2"));
pictureColor.BackColor = AsusUSB.Color1;
pictureColor2.BackColor = AsusUSB.Color2;
@@ -797,27 +810,27 @@ namespace GHelper
private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.setConfig("aura_mode", (int)comboKeyboard.SelectedValue);
AppConfig.Set("aura_mode", (int)comboKeyboard.SelectedValue);
SetAura();
}
private void Button120Hz_Click(object? sender, EventArgs e)
{
AppConfig.setConfig("screen_auto", 0);
AppConfig.Set("screen_auto", 0);
SetScreen(1000, 1);
}
private void Button60Hz_Click(object? sender, EventArgs e)
{
AppConfig.setConfig("screen_auto", 0);
AppConfig.Set("screen_auto", 0);
SetScreen(60, 0);
}
public void ToogleMiniled()
{
int miniled = (AppConfig.getConfig("miniled") == 1) ? 0 : 1;
AppConfig.setConfig("miniled", miniled);
int miniled = (AppConfig.Get("miniled") == 1) ? 0 : 1;
AppConfig.Set("miniled", miniled);
SetScreen(-1, -1, miniled);
}
@@ -847,7 +860,7 @@ namespace GHelper
if (overdrive >= 0)
{
if (AppConfig.getConfig("no_overdrive") == 1) overdrive = 0;
if (AppConfig.Get("no_overdrive") == 1) overdrive = 0;
Program.acpi.DeviceSet(AsusACPI.ScreenOverdrive, overdrive, "ScreenOverdrive");
}
@@ -867,8 +880,8 @@ namespace GHelper
int frequency = NativeMethods.GetRefreshRate();
int maxFrequency = NativeMethods.GetRefreshRate(true);
bool screenAuto = (AppConfig.getConfig("screen_auto") == 1);
bool overdriveSetting = (AppConfig.getConfig("no_overdrive") != 1);
bool screenAuto = (AppConfig.Get("screen_auto") == 1);
bool overdriveSetting = (AppConfig.Get("no_overdrive") != 1);
int overdrive = Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive);
int miniled = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled);
@@ -914,15 +927,15 @@ namespace GHelper
if (miniled >= 0)
{
buttonMiniled.Activated = (miniled == 1);
AppConfig.setConfig("miniled", miniled);
AppConfig.Set("miniled", miniled);
}
else
{
buttonMiniled.Visible = false;
}
AppConfig.setConfig("frequency", frequency);
AppConfig.setConfig("overdrive", overdrive);
AppConfig.Set("frequency", frequency);
AppConfig.Set("overdrive", overdrive);
}
private void ButtonQuit_Click(object? sender, EventArgs e)
@@ -1011,38 +1024,17 @@ namespace GHelper
}
private void SettingsForm_VisibleChanged(object? sender, EventArgs e)
{
if (this.Visible)
{
InitScreen();
InitXGM();
this.Left = Screen.FromControl(this).WorkingArea.Width - 10 - this.Width;
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
this.Activate();
aTimer.Enabled = true;
}
else
{
aTimer.Enabled = false;
}
}
private void SetPerformanceLabel()
{
labelPerf.Text = Properties.Strings.PerformanceMode + (customFans ? "+" : "") + ((customPower > 0) ? " " + customPower + "W" : "");
labelPerf.Text = Properties.Strings.PerformanceMode + ": " + Modes.GetCurrentName() + (customFans ? "+" : "") + ((customPower > 0) ? " " + customPower + "W" : "");
}
public void SetPower()
{
int limit_total = AppConfig.getConfigPerf("limit_total");
int limit_cpu = AppConfig.getConfigPerf("limit_cpu");
int limit_fast = AppConfig.getConfigPerf("limit_fast");
int limit_total = AppConfig.GetMode("limit_total");
int limit_cpu = AppConfig.GetMode("limit_cpu");
int limit_fast = AppConfig.GetMode("limit_fast");
if (limit_total > AsusACPI.MaxTotal) return;
if (limit_total < AsusACPI.MinTotal) return;
@@ -1081,8 +1073,8 @@ namespace GHelper
public void SetGPUClocks(bool launchAsAdmin = true)
{
int gpu_core = AppConfig.getConfigPerf("gpu_core");
int gpu_memory = AppConfig.getConfigPerf("gpu_memory");
int gpu_core = AppConfig.GetMode("gpu_core");
int gpu_memory = AppConfig.GetMode("gpu_memory");
if (gpu_core == -1 && gpu_memory == -1) return;
@@ -1114,8 +1106,8 @@ namespace GHelper
public void SetGPUPower()
{
int gpu_boost = AppConfig.getConfigPerf("gpu_boost");
int gpu_temp = AppConfig.getConfigPerf("gpu_temp");
int gpu_boost = AppConfig.GetMode("gpu_boost");
int gpu_temp = AppConfig.GetMode("gpu_temp");
if (gpu_boost < AsusACPI.MinGPUBoost || gpu_boost > AsusACPI.MaxGPUBoost) return;
@@ -1133,6 +1125,45 @@ namespace GHelper
}
public void AutoUV()
{
if (!AppConfig.IsMode("auto_uv")) return;
SetUV();
}
public void SetUV(bool launchAsAdmin = false)
{
if (!ProcessHelper.IsUserAdministrator())
{
if (launchAsAdmin) ProcessHelper.RunAsAdmin("uv");
return;
}
if (!Undervolter.IsAMD()) return;
int cpuUV = AppConfig.GetMode("cpu_uv", 0);
int igpuUV = AppConfig.GetMode("igpu_uv", 0);
try
{
if (cpuUV >= -40 && cpuUV <= 0)
{
SendCommand.set_coall(cpuUV);
}
if (igpuUV >= -40 && igpuUV <= 0)
{
SendCommand.set_cogfx(igpuUV);
}
} catch (Exception ex)
{
Logger.WriteLine("UV Error: " + ex.ToString());
}
}
protected void LabelFansResult(string text)
{
if (fans != null && fans.Text != "")
@@ -1144,28 +1175,28 @@ namespace GHelper
{
customFans = false;
if (AppConfig.isConfigPerf("auto_apply") || force)
if (AppConfig.IsMode("auto_apply") || force)
{
bool xgmFan = false;
if (AppConfig.isConfig("xgm_fan") && Program.acpi.IsXGConnected())
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected())
{
AsusUSB.SetXGMFan(AppConfig.getFanConfig(AsusFan.XGM));
AsusUSB.SetXGMFan(AppConfig.GetFanConfig(AsusFan.XGM));
xgmFan = true;
}
int cpuResult = Program.acpi.SetFanCurve(AsusFan.CPU, AppConfig.getFanConfig(AsusFan.CPU));
int gpuResult = Program.acpi.SetFanCurve(AsusFan.GPU, AppConfig.getFanConfig(AsusFan.GPU));
int cpuResult = Program.acpi.SetFanCurve(AsusFan.CPU, AppConfig.GetFanConfig(AsusFan.CPU));
int gpuResult = Program.acpi.SetFanCurve(AsusFan.GPU, AppConfig.GetFanConfig(AsusFan.GPU));
if (AppConfig.isConfig("mid_fan"))
Program.acpi.SetFanCurve(AsusFan.Mid, AppConfig.getFanConfig(AsusFan.Mid));
if (AppConfig.Is("mid_fan"))
Program.acpi.SetFanCurve(AsusFan.Mid, AppConfig.GetFanConfig(AsusFan.Mid));
// something went wrong, resetting to default profile
if (cpuResult != 1 || gpuResult != 1)
{
int mode = AppConfig.getConfig("performance_mode");
int mode = Modes.GetCurrentBase();
Logger.WriteLine("ASUS BIOS rejected fan curve, resetting mode to " + mode);
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, mode, "Reset Mode");
LabelFansResult("ASUS BIOS rejected fan curve");
@@ -1177,7 +1208,7 @@ namespace GHelper
}
// force set PPTs for missbehaving bios on FX507/517 series
if ((AppConfig.ContainsModel("FX507") || AppConfig.ContainsModel("FX517") || xgmFan) && !AppConfig.isConfigPerf("auto_apply_power"))
if ((AppConfig.ContainsModel("FX507") || AppConfig.ContainsModel("FX517") || xgmFan) && !AppConfig.IsMode("auto_apply_power"))
{
Task.Run(async () =>
{
@@ -1195,11 +1226,11 @@ namespace GHelper
private static bool isManualModeRequired()
{
if (!AppConfig.isConfigPerf("auto_apply_power"))
if (!AppConfig.IsMode("auto_apply_power"))
return false;
return
AppConfig.isConfig("manual_mode") ||
AppConfig.Is("manual_mode") ||
AppConfig.ContainsModel("GU604") ||
AppConfig.ContainsModel("FX517") ||
AppConfig.ContainsModel("G733");
@@ -1210,8 +1241,8 @@ namespace GHelper
customPower = 0;
bool applyPower = AppConfig.isConfigPerf("auto_apply_power");
bool applyFans = AppConfig.isConfigPerf("auto_apply");
bool applyPower = AppConfig.IsMode("auto_apply_power");
bool applyFans = AppConfig.IsMode("auto_apply");
//bool applyGPU = true;
if (applyPower)
@@ -1237,8 +1268,10 @@ namespace GHelper
{
timer.Stop();
timer.Dispose();
if (applyPower) SetPower();
SetGPUPower();
AutoUV();
};
timer.Start();
}
@@ -1246,62 +1279,84 @@ namespace GHelper
{
if (applyPower) SetPower();
SetGPUPower();
AutoUV();
}
}
public void SetPerformanceMode(int PerformanceMode = -1, bool notify = false)
public void SetPerformanceMode(int mode = -1, bool notify = false)
{
int oldMode = AppConfig.getConfig("performance_mode");
if (PerformanceMode < 0) PerformanceMode = oldMode;
int oldMode = Modes.GetCurrent();
if (mode < 0) mode = oldMode;
buttonSilent.Activated = false;
buttonBalanced.Activated = false;
buttonTurbo.Activated = false;
buttonFans.Activated = false;
menuSilent.Checked = false;
menuBalanced.Checked = false;
menuTurbo.Checked = false;
switch (PerformanceMode)
switch (mode)
{
case AsusACPI.PerformanceSilent:
buttonSilent.Activated = true;
menuSilent.Checked = true;
perfName = Properties.Strings.Silent;
break;
case AsusACPI.PerformanceTurbo:
buttonTurbo.Activated = true;
menuTurbo.Checked = true;
perfName = Properties.Strings.Turbo;
break;
default:
case AsusACPI.PerformanceBalanced:
buttonBalanced.Activated = true;
menuBalanced.Checked = true;
perfName = Properties.Strings.Balanced;
PerformanceMode = AsusACPI.PerformanceBalanced;
break;
default:
if (Modes.Exists(mode))
{
buttonFans.Activated = true;
switch (Modes.GetBase(mode))
{
case AsusACPI.PerformanceSilent:
buttonFans.BorderColor = colorEco;
break;
case AsusACPI.PerformanceTurbo:
buttonFans.BorderColor = colorTurbo;
break;
default:
buttonFans.BorderColor = colorStandard;
break;
}
}
else
{
buttonBalanced.Activated = true;
menuBalanced.Checked = true;
mode = AsusACPI.PerformanceBalanced;
}
break;
}
var powerStatus = SystemInformation.PowerStatus.PowerLineStatus;
AppConfig.setConfig("performance_" + (int)powerStatus, PerformanceMode);
AppConfig.setConfig("performance_mode", PerformanceMode);
Modes.SetCurrent(mode);
SetPerformanceLabel();
if (isManualModeRequired())
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AsusACPI.PerformanceManual, "Manual Mode");
else
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, PerformanceMode, "Mode");
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetBase(mode), "Mode");
if (AppConfig.isConfig("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) AsusUSB.ResetXGM();
if (notify)
{
try
{
toast.RunToast(perfName, powerStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
}
catch
{
@@ -1314,17 +1369,17 @@ namespace GHelper
AutoFans();
AutoPower(1000);
if (AppConfig.getConfig("auto_apply_power_plan") != 0)
if (AppConfig.Get("auto_apply_power_plan") != 0)
{
if (AppConfig.getConfigPerfString("scheme") is not null)
NativeMethods.SetPowerScheme(AppConfig.getConfigPerfString("scheme"));
if (AppConfig.GetModeString("scheme") is not null)
NativeMethods.SetPowerScheme(AppConfig.GetModeString("scheme"));
else
NativeMethods.SetPowerScheme(PerformanceMode);
NativeMethods.SetPowerScheme(Modes.GetBase(mode));
}
if (AppConfig.getConfigPerf("auto_boost") != -1)
if (AppConfig.GetMode("auto_boost") != -1)
{
NativeMethods.SetCPUBoost(AppConfig.getConfigPerf("auto_boost"));
NativeMethods.SetCPUBoost(AppConfig.GetMode("auto_boost"));
}
if (NativeMethods.PowerGetEffectiveOverlayScheme(out Guid activeScheme) == 0)
@@ -1334,24 +1389,14 @@ namespace GHelper
if (fans != null && fans.Text != "")
{
fans.InitFans();
fans.InitPower();
fans.InitBoost();
fans.InitGPU();
fans.InitAll();
}
}
public void CyclePerformanceMode()
{
int mode = AppConfig.getConfig("performance_mode");
if (Control.ModifierKeys == Keys.Shift)
mode = (mode == 0) ? 2 : mode - 1;
else
mode++;
SetPerformanceMode(mode, true);
SetPerformanceMode(Modes.GetNext(Control.ModifierKeys == Keys.Shift), true);
}
@@ -1359,8 +1404,8 @@ namespace GHelper
{
InputDispatcher.SetBacklightAuto(true);
if (Program.acpi.IsXGConnected())
AsusUSB.ApplyXGMLight(AppConfig.isConfig("xmg_light"));
if (Program.acpi.IsXGConnected())
AsusUSB.ApplyXGMLight(AppConfig.Is("xmg_light"));
if (AppConfig.ContainsModel("X16") || AppConfig.ContainsModel("X13")) InputDispatcher.TabletMode();
@@ -1370,17 +1415,17 @@ namespace GHelper
{
var Plugged = SystemInformation.PowerStatus.PowerLineStatus;
int mode = AppConfig.getConfig("performance_" + (int)Plugged);
int mode = AppConfig.Get("performance_" + (int)Plugged);
if (mode != -1)
SetPerformanceMode(mode, powerChanged);
else
SetPerformanceMode(AppConfig.getConfig("performance_mode"));
SetPerformanceMode(Modes.GetCurrent());
}
public void AutoScreen(bool force = false)
{
if (force || AppConfig.getConfig("screen_auto") == 1)
if (force || AppConfig.Is("screen_auto"))
{
if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online)
SetScreen(1000, 1);
@@ -1389,7 +1434,7 @@ namespace GHelper
}
else
{
SetScreen(overdrive: AppConfig.getConfig("overdrive"));
SetScreen(overdrive: AppConfig.Get("overdrive"));
}
@@ -1398,7 +1443,7 @@ namespace GHelper
public static bool IsPlugged()
{
bool optimizedUSBC = AppConfig.getConfig("optimized_usbc") != 1;
bool optimizedUSBC = AppConfig.Get("optimized_usbc") != 1;
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) < AsusACPI.ChargerUSB);
@@ -1408,10 +1453,10 @@ namespace GHelper
public bool AutoGPUMode()
{
bool GpuAuto = AppConfig.getConfig("gpu_auto") == 1;
bool GpuAuto = AppConfig.Is("gpu_auto");
bool ForceGPU = AppConfig.ContainsModel("503");
int GpuMode = AppConfig.getConfig("gpu_mode");
int GpuMode = AppConfig.Get("gpu_mode");
if (!GpuAuto && !ForceGPU) return false;
@@ -1453,7 +1498,7 @@ namespace GHelper
public bool ReEnableGPU()
{
if (AppConfig.getConfig("gpu_reenable") != 1) return false;
if (AppConfig.Get("gpu_reenable") != 1) return false;
if (Screen.AllScreens.Length <= 1) return false;
Logger.WriteLine("Re-enabling gpu for 503 model");
@@ -1481,8 +1526,10 @@ namespace GHelper
public void InitXGM()
{
bool connected = Program.acpi.IsXGConnected();
buttonXGM.Enabled = buttonXGM.Visible = connected;
buttonXGM.Enabled = buttonXGM.Visible = Program.acpi.IsXGConnected();
if (!connected) return;
int activated = Program.acpi.DeviceGet(AsusACPI.GPUXG);
if (activated < 0) return;
@@ -1538,7 +1585,7 @@ namespace GHelper
}
AppConfig.setConfig("gpu_mode", GpuMode);
AppConfig.Set("gpu_mode", GpuMode);
ButtonEnabled(buttonOptimized, true);
ButtonEnabled(buttonEco, true);
@@ -1640,8 +1687,8 @@ namespace GHelper
public void SetGPUMode(int GPUMode)
{
int CurrentGPU = AppConfig.getConfig("gpu_mode");
AppConfig.setConfig("gpu_auto", 0);
int CurrentGPU = AppConfig.Get("gpu_mode");
AppConfig.Set("gpu_auto", 0);
if (CurrentGPU == GPUMode)
{
@@ -1688,7 +1735,7 @@ namespace GHelper
if (changed)
{
AppConfig.setConfig("gpu_mode", GPUMode);
AppConfig.Set("gpu_mode", GPUMode);
}
if (restart)
@@ -1704,9 +1751,9 @@ namespace GHelper
{
if (GPUMode == -1)
GPUMode = AppConfig.getConfig("gpu_mode");
GPUMode = AppConfig.Get("gpu_mode");
bool GPUAuto = (AppConfig.getConfig("gpu_auto") == 1);
bool GPUAuto = AppConfig.Is("gpu_auto");
buttonEco.Activated = false;
buttonStandard.Activated = false;
@@ -1802,7 +1849,7 @@ namespace GHelper
Debug.WriteLine(ex);
}
AppConfig.setConfig("charge_limit", limit);
AppConfig.Set("charge_limit", limit);
}

View File

@@ -1,7 +1,6 @@
using System.Diagnostics;
using System.Drawing;
using OSD;
using System.Diagnostics;
using System.Drawing.Drawing2D;
using OSD;
namespace GHelper
@@ -57,7 +56,7 @@ namespace GHelper
Charger
}
public class ToastForm : OSDNativeForm
public class ToastForm : OSDNativeForm
{
protected static string toastText = "Balanced";
@@ -74,7 +73,7 @@ namespace GHelper
protected override void PerformPaint(PaintEventArgs e)
{
Brush brush = new SolidBrush(Color.FromArgb(150,Color.Black));
Brush brush = new SolidBrush(Color.FromArgb(150, Color.Black));
Drawing.FillRoundedRectangle(e.Graphics, brush, this.Bound, 10);
StringFormat format = new StringFormat();
@@ -113,7 +112,7 @@ namespace GHelper
icon = Properties.Resources.icons8_charged_battery_96;
break;
case ToastIcon.Charger:
icon = Properties.Resources.icons8_electrical_96;
icon = Properties.Resources.icons8_charging_battery_96;
break;
}
@@ -144,9 +143,9 @@ namespace GHelper
Screen screen1 = Screen.FromHandle(base.Handle);
Width = 300;
Width = Math.Max(300, 100 + toastText.Length * 22);
Height = 100;
X = (screen1.Bounds.Width - this.Width)/2;
X = (screen1.Bounds.Width - this.Width) / 2;
Y = screen1.Bounds.Height - 300 - this.Height;
Show();

View File

@@ -145,7 +145,7 @@ namespace GHelper
driver.hardwares = file.GetProperty("HardwareInfoList");
drivers.Add(driver);
BeginInvoke(delegate
Invoke(delegate
{
string versionText = driver.version.Replace("latest version at the ", "");
Label versionLabel = new Label { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true };
@@ -170,7 +170,7 @@ namespace GHelper
}
}
BeginInvoke(delegate
Invoke(delegate
{
table.Visible = true;
ResumeLayout(false);
@@ -206,7 +206,7 @@ namespace GHelper
var label = table.GetControlFromPosition(2, count) as Label;
if (label != null)
{
BeginInvoke(delegate
Invoke(delegate
{
label.Font = new Font(label.Font, FontStyle.Underline | FontStyle.Bold);
label.ForeColor = colorTurbo;

BIN
app/WinRing0x64.dll Normal file

Binary file not shown.

BIN
app/WinRing0x64.sys Normal file

Binary file not shown.

View File

@@ -21,7 +21,7 @@ Lightweight Armoury Crate alternative for Asus laptops. A small utility that all
## [:floppy_disk: Download App](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
If you like this app, please [star :star: it on Github](https://github.com/seerge/g-helper) and spread a word about it!
### [:euro: Donate EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 Donate USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | [:credit_card: Donate via Stripe](https://buy.stripe.com/00gaFJ9Lf79v7WobII)
#### Support project in [:euro: EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | [:credit_card: Stripe](https://buy.stripe.com/00gaFJ9Lf79v7WobII)
_If you post about the app - please include a link. Thanks._
@@ -177,17 +177,18 @@ By default app will use your windows language setting. But you can set language
Add following line to ``%AppData%\GHelper\config.json`` : ``"language" : "en"`` (by replacing "en" with language of your choice)
### Custom power plans with each mode
### Custom windows power plans with each mode
In ``%AppData%\GHelper\config.json`` you can manually add custom power plan GUID (it can be either "real" power plan that can be switched or "overlay" power plan like the ones g-helper sets by default)
In ``%AppData%\GHelper\config.json`` you can manually add custom power plan (or power mode) GUID. It can be either "real" power plan that can be switched or "overlay" power plan like the ones g-helper sets by default.
Format is following : ``"scheme_<mode>" : "GUID" ``
Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)``
Default behaviour is :
```
"scheme_0": "2ac1d0e0-17a7-44ed-8091-d88ef75a4eb0",
"scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e"
"scheme_0": "00000000-0000-0000-0000-000000000000",
"scheme_1": "ded574b5-45a0-4f42-8737-46345c09c238",
"scheme_2": "961cc777-2547-4f9d-8174-7d86181b8a7a",
```
Make sure to keep json structure (i.e. not to break it with extra or missing comas, etc) - or app will fail to read it and will just recreate a new config instead.
@@ -216,6 +217,9 @@ To enable this custom workaround you need to add an extra line in config.json (u
By default app will toggle performance modes with Ctr+Shift+F5. You can change this binding by adding ``"keybind_profile": 116`` in config.json (under ``%AppData%\GHelper``), where 116 is [numerical code for desired key](https://www.oreilly.com/library/view/javascript-dhtml/9780596514082/apb.html). Put 0 to completely disable this binding.
### Keybinding to open G-helper from external keyboards
Ctrl + Shift + F12
------------
**Disclaimers**