mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f395c706f6 | ||
|
|
444fdcdd97 | ||
|
|
b874900393 | ||
|
|
05aad0f1ad | ||
|
|
a34cc1cb03 | ||
|
|
8c557344db | ||
|
|
5b2a4cb065 | ||
|
|
51bcad8bbe | ||
|
|
125aa44e6c | ||
|
|
9e6ca7c2e2 | ||
|
|
252cc9d868 | ||
|
|
0b03b62a2d | ||
|
|
ff7a5463d6 | ||
|
|
5134aaca9d | ||
|
|
2a5c2e02ac |
@@ -10,22 +10,23 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
public class AniMatrix
|
||||
{
|
||||
static System.Timers.Timer matrixTimer = default!;
|
||||
static AnimeMatrixDevice mat;
|
||||
System.Timers.Timer matrixTimer = default!;
|
||||
AnimeMatrixDevice mat;
|
||||
|
||||
static double[] AudioValues;
|
||||
static WasapiCapture AudioDevice;
|
||||
double[] AudioValues;
|
||||
WasapiCapture AudioDevice;
|
||||
|
||||
public static bool IsValid => mat != null;
|
||||
public bool IsValid => mat != null;
|
||||
|
||||
private static long lastPresent;
|
||||
private static List<double> maxes = new List<double>();
|
||||
private long lastPresent;
|
||||
private List<double> maxes = new List<double>();
|
||||
|
||||
public AniMatrix()
|
||||
{
|
||||
try
|
||||
{
|
||||
mat = new AnimeMatrixDevice();
|
||||
Task.Run(mat.WakeUp);
|
||||
matrixTimer = new System.Timers.Timer(100);
|
||||
matrixTimer.Elapsed += MatrixTimer_Elapsed;
|
||||
}
|
||||
@@ -77,8 +78,7 @@ namespace GHelper.AnimeMatrix
|
||||
SetMatrixPicture(AppConfig.getConfigString("matrix_picture"));
|
||||
break;
|
||||
case 3:
|
||||
StartMatrixTimer(1000);
|
||||
Logger.WriteLine("Matrix Clock");
|
||||
SetMatrixClock();
|
||||
break;
|
||||
case 4:
|
||||
SetMatrixAudio();
|
||||
@@ -94,21 +94,21 @@ namespace GHelper.AnimeMatrix
|
||||
}
|
||||
|
||||
}
|
||||
private static void StartMatrixTimer(int interval = 100)
|
||||
private void StartMatrixTimer(int interval = 100)
|
||||
{
|
||||
matrixTimer.Interval = interval;
|
||||
matrixTimer.Enabled = true;
|
||||
matrixTimer.Start();
|
||||
}
|
||||
|
||||
private static void StopMatrixTimer()
|
||||
private void StopMatrixTimer()
|
||||
{
|
||||
matrixTimer.Enabled = false;
|
||||
matrixTimer.Stop();
|
||||
}
|
||||
|
||||
|
||||
private static void MatrixTimer_Elapsed(object? sender, ElapsedEventArgs e)
|
||||
private void MatrixTimer_Elapsed(object? sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (!IsValid) return;
|
||||
//if (!IsValid) return;
|
||||
|
||||
switch (AppConfig.getConfig("matrix_running"))
|
||||
{
|
||||
@@ -122,6 +122,19 @@ namespace GHelper.AnimeMatrix
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void SetMatrixClock()
|
||||
{
|
||||
mat.SetBuiltInAnimation(false);
|
||||
StartMatrixTimer(1000);
|
||||
Logger.WriteLine("Matrix Clock");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
StopMatrixAudio();
|
||||
}
|
||||
|
||||
void StopMatrixAudio()
|
||||
{
|
||||
if (AudioDevice is not null)
|
||||
|
||||
@@ -32,6 +32,7 @@ public class AsusACPI
|
||||
|
||||
const uint DSTS = 0x53545344;
|
||||
const uint DEVS = 0x53564544;
|
||||
const uint INIT = 0x54494E49;
|
||||
|
||||
public const uint UniversalControl = 0x00100021;
|
||||
public const int KB_Light_Up = 0xc4;
|
||||
@@ -161,7 +162,7 @@ public class AsusACPI
|
||||
public void RunListener()
|
||||
{
|
||||
|
||||
eventHandle = CreateEvent(IntPtr.Zero, false, false, "ATK Event");
|
||||
eventHandle = CreateEvent(IntPtr.Zero, false, false, "ATK4001");
|
||||
|
||||
byte[] outBuffer = new byte[16];
|
||||
byte[] data = new byte[8];
|
||||
@@ -171,14 +172,14 @@ public class AsusACPI
|
||||
data[1] = BitConverter.GetBytes(eventHandle.ToInt32())[1];
|
||||
|
||||
result = Control(0x222400, data, outBuffer);
|
||||
Debug.WriteLine(result + ":" + BitConverter.ToString(data) + "|" + BitConverter.ToString(outBuffer));
|
||||
Logger.WriteLine("ACPI " + result + ":" + BitConverter.ToString(data) + "|" + BitConverter.ToString(outBuffer));
|
||||
|
||||
while (true)
|
||||
{
|
||||
WaitForSingleObject(eventHandle, Timeout.Infinite);
|
||||
Control(0x222408, new byte[0], outBuffer);
|
||||
int code = BitConverter.ToInt32(outBuffer);
|
||||
Logger.WriteLine("Code: " + code);
|
||||
Logger.WriteLine("ACPI Code: " + code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,6 +241,13 @@ public class AsusACPI
|
||||
|
||||
}
|
||||
|
||||
public byte[] DeviceInit()
|
||||
{
|
||||
byte[] args = new byte[8];
|
||||
return CallMethod(INIT, args);
|
||||
|
||||
}
|
||||
|
||||
public int DeviceSet(uint DeviceID, int Status, string logName)
|
||||
{
|
||||
byte[] args = new byte[8];
|
||||
|
||||
127
app/AsusUSB.cs
127
app/AsusUSB.cs
@@ -1,6 +1,5 @@
|
||||
using HidLibrary;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace GHelper
|
||||
@@ -54,16 +53,19 @@ namespace GHelper
|
||||
public static class AsusUSB
|
||||
{
|
||||
|
||||
public const byte HID_ID = 0x5a;
|
||||
public const int ASUS_ID = 0x0b05;
|
||||
|
||||
public static readonly byte[] LED_INIT1 = new byte[] { 0x5d, 0xb9 };
|
||||
public const byte INPUT_HID_ID = 0x5a;
|
||||
public const byte AURA_HID_ID = 0x5d;
|
||||
|
||||
public static readonly byte[] LED_INIT1 = new byte[] { AURA_HID_ID, 0xb9 };
|
||||
public static readonly byte[] LED_INIT2 = Encoding.ASCII.GetBytes("]ASUS Tech.Inc.");
|
||||
public static readonly byte[] LED_INIT3 = new byte[] { 0x5d, 0x05, 0x20, 0x31, 0, 0x08 };
|
||||
public static readonly byte[] LED_INIT3 = new byte[] { AURA_HID_ID, 0x05, 0x20, 0x31, 0, 0x08 };
|
||||
public static readonly byte[] LED_INIT4 = Encoding.ASCII.GetBytes("^ASUS Tech.Inc.");
|
||||
public static readonly byte[] LED_INIT5 = new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x08 };
|
||||
|
||||
static byte[] MESSAGE_SET = { 0x5d, 0xb5, 0, 0, 0 };
|
||||
static byte[] MESSAGE_APPLY = { 0x5d, 0xb4 };
|
||||
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 };
|
||||
|
||||
@@ -175,64 +177,42 @@ namespace GHelper
|
||||
|
||||
private static IEnumerable<HidDevice> GetHidDevices(int[] deviceIds, int minInput = 18)
|
||||
{
|
||||
HidDevice[] HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
||||
HidDevice[] HidDeviceList = HidDevices.Enumerate(ASUS_ID, deviceIds).ToArray();
|
||||
foreach (HidDevice device in HidDeviceList)
|
||||
if (device.IsConnected
|
||||
&& device.Capabilities.FeatureReportByteLength > 0
|
||||
&& device.Capabilities.InputReportByteLength >= minInput) //
|
||||
&& device.Capabilities.InputReportByteLength >= minInput)
|
||||
yield return device;
|
||||
}
|
||||
|
||||
private static HidDevice? GetInputDevice()
|
||||
public static HidDevice? GetDevice(byte reportID = INPUT_HID_ID)
|
||||
{
|
||||
HidDevice[] HidDeviceList = HidDevices.Enumerate(0x0b05, deviceIds).ToArray();
|
||||
HidDevice[] HidDeviceList = HidDevices.Enumerate(ASUS_ID, deviceIds).ToArray();
|
||||
HidDevice input = null;
|
||||
|
||||
foreach (HidDevice device in HidDeviceList)
|
||||
if (device.ReadFeatureData(out byte[] data, HID_ID))
|
||||
return device;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void TouchpadToggle()
|
||||
{
|
||||
HidDevice? input = GetInputDevice();
|
||||
if (input != null) input.WriteFeatureData(new byte[] { HID_ID,0xf4,0x6b});
|
||||
}
|
||||
|
||||
public static void RunListener(Action<int> KeyHandler)
|
||||
{
|
||||
HidDevice? input = GetInputDevice();
|
||||
if (input == null) return;
|
||||
|
||||
Logger.WriteLine("Input Events " + input.DevicePath);
|
||||
|
||||
var task = Task.Run(() =>
|
||||
{
|
||||
try
|
||||
if (device.ReadFeatureData(out byte[] data, reportID))
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var data = input.Read().Data;
|
||||
if (data.Length > 1 && data[0] == HID_ID && data[1] > 0)
|
||||
{
|
||||
Logger.WriteLine("Key:" + data[1]);
|
||||
KeyHandler(data[1]);
|
||||
}
|
||||
}
|
||||
input = device;
|
||||
//Logger.WriteLine("HID Device("+ reportID + ")" + + device.Capabilities.FeatureReportByteLength + "|" + device.Capabilities.InputReportByteLength + device.DevicePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
});
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
public static bool TouchpadToggle()
|
||||
{
|
||||
HidDevice? input = GetDevice();
|
||||
if (input != null) return input.WriteFeatureData(new byte[] { INPUT_HID_ID, 0xf4, 0x6b });
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static byte[] AuraMessage(int mode, Color color, Color color2, int speed)
|
||||
{
|
||||
|
||||
byte[] msg = new byte[17];
|
||||
msg[0] = 0x5d;
|
||||
msg[0] = AURA_HID_ID;
|
||||
msg[1] = 0xb3;
|
||||
msg[2] = 0x00; // Zone
|
||||
msg[3] = (byte)mode; // Aura Mode
|
||||
@@ -249,45 +229,42 @@ namespace GHelper
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
var devices = GetHidDevices(deviceIds);
|
||||
foreach (HidDevice device in devices)
|
||||
Task.Run(async () =>
|
||||
{
|
||||
device.OpenDevice();
|
||||
device.WriteFeatureData(LED_INIT1);
|
||||
device.WriteFeatureData(LED_INIT2);
|
||||
device.WriteFeatureData(LED_INIT3);
|
||||
device.WriteFeatureData(LED_INIT4);
|
||||
device.WriteFeatureData(LED_INIT5);
|
||||
device.CloseDevice();
|
||||
}
|
||||
var devices = GetHidDevices(deviceIds, 0);
|
||||
foreach (HidDevice device in devices)
|
||||
{
|
||||
device.OpenDevice();
|
||||
device.WriteFeatureData(LED_INIT1);
|
||||
device.WriteFeatureData(LED_INIT2);
|
||||
device.WriteFeatureData(LED_INIT3);
|
||||
device.WriteFeatureData(LED_INIT4);
|
||||
device.WriteFeatureData(LED_INIT5);
|
||||
device.CloseDevice();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static void ApplyBrightness(int brightness)
|
||||
{
|
||||
byte[] msg = { 0x5d, 0xba, 0xc5, 0xc4, (byte)brightness };
|
||||
|
||||
var devices = GetHidDevices(deviceIds);
|
||||
foreach (HidDevice device in devices)
|
||||
Task.Run(async () =>
|
||||
{
|
||||
|
||||
byte[] msg = { INPUT_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
||||
Logger.WriteLine("KB Backlight:" + BitConverter.ToString(msg));
|
||||
|
||||
device.OpenDevice();
|
||||
var devices = GetHidDevices(deviceIds, 0);
|
||||
foreach (HidDevice device in devices)
|
||||
{
|
||||
device.OpenDevice();
|
||||
device.WriteFeatureData(msg);
|
||||
device.CloseDevice();
|
||||
}
|
||||
|
||||
device.WriteFeatureData(LED_INIT1);
|
||||
device.WriteFeatureData(LED_INIT2);
|
||||
device.WriteFeatureData(LED_INIT3);
|
||||
device.WriteFeatureData(LED_INIT4);
|
||||
device.WriteFeatureData(LED_INIT5);
|
||||
|
||||
device.WriteFeatureData(msg);
|
||||
Logger.WriteLine("USB-KB " + device.Capabilities.FeatureReportByteLength + ":" + BitConverter.ToString(msg));
|
||||
device.CloseDevice();
|
||||
}
|
||||
|
||||
if (AppConfig.ContainsModel("TUF"))
|
||||
Program.acpi.TUFKeyboardBrightness(brightness);
|
||||
if (AppConfig.ContainsModel("TUF"))
|
||||
Program.acpi.TUFKeyboardBrightness(brightness);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
10
app/Extra.cs
10
app/Extra.cs
@@ -319,7 +319,15 @@ namespace GHelper
|
||||
|
||||
private void Keyboard_Shown(object? sender, EventArgs e)
|
||||
{
|
||||
Top = Program.settingsForm.Top;
|
||||
if (Height > Program.settingsForm.Height)
|
||||
{
|
||||
Top = Program.settingsForm.Top + Program.settingsForm.Height - Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
Top = Program.settingsForm.Top;
|
||||
}
|
||||
|
||||
Left = Program.settingsForm.Left - Width - 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.66</AssemblyVersion>
|
||||
<AssemblyVersion>0.68</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -182,7 +182,7 @@ public class NvidiaGpuControl : IGpuControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
Debug.WriteLine(ex.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public static class HardwareControl
|
||||
if (fan > fanMax && fan < 110) SetFanMax(fan);
|
||||
|
||||
if (AppConfig.getConfig("fan_rpm") == 1)
|
||||
return GHelper.Properties.Strings.FanSpeed + (fan * 100).ToString() + GHelper.Properties.Strings.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
|
||||
}
|
||||
@@ -151,6 +151,7 @@ public static class HardwareControl
|
||||
GpuControl?.Dispose();
|
||||
|
||||
IGpuControl _gpuControl = new NvidiaGpuControl();
|
||||
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
GpuControl = _gpuControl;
|
||||
|
||||
@@ -1,20 +1,66 @@
|
||||
using Microsoft.Win32;
|
||||
using HidLibrary;
|
||||
using Microsoft.Win32;
|
||||
using NAudio.CoreAudioApi;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using Tools;
|
||||
using static NativeMethods;
|
||||
|
||||
namespace GHelper
|
||||
{
|
||||
public class KeyboardListener
|
||||
{
|
||||
|
||||
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
public KeyboardListener(Action<int> KeyHandler)
|
||||
{
|
||||
HidDevice? input = AsusUSB.GetDevice();
|
||||
if (input == null) return;
|
||||
|
||||
Logger.WriteLine($"Input: {input.DevicePath}");
|
||||
|
||||
var task = Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
while (!cancellationTokenSource.Token.IsCancellationRequested)
|
||||
{
|
||||
var data = input.Read().Data;
|
||||
if (data.Length > 1 && data[0] == AsusUSB.INPUT_HID_ID && data[1] > 0)
|
||||
{
|
||||
Logger.WriteLine($"Key: {data[1]}");
|
||||
KeyHandler(data[1]);
|
||||
}
|
||||
}
|
||||
Logger.WriteLine("Listener stopped");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
cancellationTokenSource?.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class InputDispatcher
|
||||
{
|
||||
|
||||
private static bool isOptimizationRunning = OptimizationService.IsRunning();
|
||||
private static nint windowHandle;
|
||||
|
||||
public static Keys keyProfile = Keys.F5;
|
||||
|
||||
KeyboardListener listener;
|
||||
|
||||
KeyHandler m1, m2, togggle;
|
||||
|
||||
public InputDispatcher(nint handle)
|
||||
@@ -22,9 +68,12 @@ namespace GHelper
|
||||
|
||||
windowHandle = handle;
|
||||
|
||||
Program.acpi.SubscribeToEvents(WatcherEventArrived);
|
||||
byte[] result = Program.acpi.DeviceInit();
|
||||
Debug.WriteLine($"Init: {BitConverter.ToString(result)}");
|
||||
|
||||
Program.acpi.SubscribeToEvents(WatcherEventArrived);
|
||||
//Task.Run(Program.acpi.RunListener);
|
||||
|
||||
if (!isOptimizationRunning) AsusUSB.RunListener(HandleEvent);
|
||||
|
||||
// CTRL + SHIFT + F5 to cycle profiles
|
||||
if (AppConfig.getConfig("keybind_profile") != -1) keyProfile = (Keys)AppConfig.getConfig("keybind_profile");
|
||||
@@ -34,8 +83,20 @@ namespace GHelper
|
||||
m2 = new KeyHandler(KeyHandler.NOMOD, Keys.VolumeUp, windowHandle);
|
||||
|
||||
RegisterKeys();
|
||||
|
||||
}
|
||||
|
||||
public void InitListener()
|
||||
{
|
||||
if (listener is not null) listener.Dispose();
|
||||
|
||||
if (!OptimizationService.IsRunning())
|
||||
listener = new KeyboardListener(HandleEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void RegisterKeys()
|
||||
{
|
||||
|
||||
@@ -97,7 +158,7 @@ namespace GHelper
|
||||
action = "aura";
|
||||
if (name == "fnf5")
|
||||
action = "performance";
|
||||
if (name == "m3" && !isOptimizationRunning)
|
||||
if (name == "m3" && !OptimizationService.IsRunning())
|
||||
action = "micmute";
|
||||
}
|
||||
|
||||
@@ -188,16 +249,13 @@ namespace GHelper
|
||||
return;
|
||||
}
|
||||
|
||||
if (isOptimizationRunning) return;
|
||||
if (OptimizationService.IsRunning()) return;
|
||||
|
||||
// Asus Optimization service Events
|
||||
|
||||
int backlight = AppConfig.getConfig("keyboard_brightness");
|
||||
|
||||
string[] backlightNames = new string[] { "Off", "Low", "Mid", "Max" };
|
||||
|
||||
int brightness;
|
||||
|
||||
switch (EventID)
|
||||
{
|
||||
case 197: // FN+F2
|
||||
@@ -212,13 +270,17 @@ namespace GHelper
|
||||
AsusUSB.ApplyBrightness(backlight);
|
||||
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, backlightNames[backlight], ToastIcon.BacklightUp);
|
||||
break;
|
||||
case 199: // ON Z13 - FN+F11 - cycles backlight
|
||||
if (++backlight > 3) backlight = 0;
|
||||
AppConfig.setConfig("keyboard_brightness", backlight);
|
||||
AsusUSB.ApplyBrightness(backlight);
|
||||
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, backlightNames[backlight], ToastIcon.BacklightUp);
|
||||
break;
|
||||
case 16: // FN+F7
|
||||
brightness = ScreenBrightness.Adjust(-10);
|
||||
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, brightness + "%", ToastIcon.BrightnessDown);
|
||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, 0x10, "Brightness");
|
||||
break;
|
||||
case 32: // FN+F8
|
||||
brightness = ScreenBrightness.Adjust(+10);
|
||||
Program.settingsForm.BeginInvoke(Program.settingsForm.RunToast, brightness + "%", ToastIcon.BrightnessUp);
|
||||
Program.acpi.DeviceSet(AsusACPI.UniversalControl, 0x20, "Brightness");
|
||||
break;
|
||||
case 107: // FN+F10
|
||||
bool touchpadState = GetTouchpadState();
|
||||
|
||||
@@ -709,6 +709,7 @@ public class NativeMethods
|
||||
dm.dmDisplayFrequency = frequency;
|
||||
int 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace GHelper
|
||||
{
|
||||
return (Process.GetProcessesByName("AsusOptimization").Count() > 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
using Microsoft.Win32;
|
||||
using NAudio.CoreAudioApi;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Management;
|
||||
using System.Reflection;
|
||||
using System.Security.Principal;
|
||||
using Tools;
|
||||
using static NativeMethods;
|
||||
|
||||
namespace GHelper
|
||||
@@ -41,10 +38,15 @@ namespace GHelper
|
||||
string action = "";
|
||||
if (args.Length > 0) action = args[0];
|
||||
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||
Debug.WriteLine(CultureInfo.CurrentUICulture);
|
||||
string language = AppConfig.getConfigString("language");
|
||||
|
||||
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("es");
|
||||
if (language != null && language.Length > 0)
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(language);
|
||||
else
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture;
|
||||
|
||||
Debug.WriteLine(CultureInfo.CurrentUICulture);
|
||||
//Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture("fr");
|
||||
|
||||
CheckProcesses();
|
||||
|
||||
@@ -65,7 +67,7 @@ namespace GHelper
|
||||
}
|
||||
|
||||
Logger.WriteLine("------------");
|
||||
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + (IsUserAdministrator() ? "A" : ""));
|
||||
Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (IsUserAdministrator() ? "." : ""));
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
|
||||
@@ -81,7 +83,7 @@ namespace GHelper
|
||||
settingsForm.InitMatrix();
|
||||
settingsForm.SetStartupCheck(Startup.IsScheduled());
|
||||
|
||||
|
||||
|
||||
SetAutoModes();
|
||||
|
||||
// Subscribing for system power change events
|
||||
@@ -98,7 +100,7 @@ namespace GHelper
|
||||
SettingsToggle(action);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Application.Run();
|
||||
|
||||
@@ -142,6 +144,8 @@ namespace GHelper
|
||||
isPlugged = SystemInformation.PowerStatus.PowerLineStatus;
|
||||
Logger.WriteLine("AutoSetting for " + isPlugged.ToString());
|
||||
|
||||
inputDispatcher.InitListener();
|
||||
|
||||
settingsForm.SetBatteryChargeLimit(AppConfig.getConfig("charge_limit"));
|
||||
settingsForm.AutoPerformance();
|
||||
|
||||
|
||||
2
app/Properties/Strings.Designer.cs
generated
2
app/Properties/Strings.Designer.cs
generated
@@ -169,7 +169,7 @@ namespace GHelper.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Auto adjust Windows Power Mode.
|
||||
/// Looks up a localized string similar to Auto adjust Windows Power Modes.
|
||||
/// </summary>
|
||||
internal static string ApplyWindowsPowerPlan {
|
||||
get {
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<value>Encendida</value>
|
||||
</data>
|
||||
<data name="BacklightTimeout" xml:space="preserve">
|
||||
<value>Apagar retroiluminación con batería (s.)</value>
|
||||
<value>Apagar retroiluminación con batería (segundos)</value>
|
||||
</data>
|
||||
<data name="Balanced" xml:space="preserve">
|
||||
<value>Equilibrado</value>
|
||||
@@ -357,6 +357,9 @@
|
||||
<data name="Multizone" xml:space="preserve">
|
||||
<value>Multizona</value>
|
||||
</data>
|
||||
<data name="MuteMic" xml:space="preserve">
|
||||
<value>Silenciar micrófono</value>
|
||||
</data>
|
||||
<data name="OpenGHelper" xml:space="preserve">
|
||||
<value>Abrir ventana G-Helper</value>
|
||||
</data>
|
||||
@@ -450,9 +453,15 @@
|
||||
<data name="VersionLabel" xml:space="preserve">
|
||||
<value>Versión</value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Bajar volumen</value>
|
||||
</data>
|
||||
<data name="VolumeMute" xml:space="preserve">
|
||||
<value>Silenciar volumen</value>
|
||||
</data>
|
||||
<data name="VolumeUp" xml:space="preserve">
|
||||
<value>Subir volumen</value>
|
||||
</data>
|
||||
<data name="WindowTop" xml:space="preserve">
|
||||
<value>Mantener aplicación siempre visible</value>
|
||||
</data>
|
||||
|
||||
@@ -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">
|
||||
@@ -59,13 +118,13 @@
|
||||
<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>Connexion impossible avec ASUS ACPI. L’application ne peut fonctionner sans. Veuillez installer Asus System Control Interface.</value>
|
||||
<value>Connexion impossible avec ASUS ACPI. L'application ne peut fonctionner sans. Veuillez installer Asus System Control Interface.</value>
|
||||
</data>
|
||||
<data name="AlertDGPU" xml:space="preserve">
|
||||
<value>Le GPU semble être surchargé, voulez vous le désactiver ?</value>
|
||||
</data>
|
||||
<data name="AlertDGPUTitle" xml:space="preserve">
|
||||
<value>Mode Économique</value>
|
||||
<value>Mode Éco</value>
|
||||
</data>
|
||||
<data name="AlertUltimateOff" xml:space="preserve">
|
||||
<value>Désactiver le Mode Ultime requiert un redémarrage</value>
|
||||
@@ -77,28 +136,28 @@
|
||||
<value>Redémarrer maintenant ?</value>
|
||||
</data>
|
||||
<data name="AnimationSpeed" xml:space="preserve">
|
||||
<value>Vitesse d’animation</value>
|
||||
<value>Vitesse de l'animation</value>
|
||||
</data>
|
||||
<data name="AnimeMatrix" xml:space="preserve">
|
||||
<value>Anime Matrix</value>
|
||||
</data>
|
||||
<data name="AppAlreadyRunning" xml:space="preserve">
|
||||
<value>L’application est déjà en cours d’éxecution</value>
|
||||
<value>L'application est déjà en cours d'exécution</value>
|
||||
</data>
|
||||
<data name="AppAlreadyRunningText" xml:space="preserve">
|
||||
<value>G-Helper est déjà en cours d'exécution. Vérifiez la barre d'état du système</value>
|
||||
<value>G-Helper est déjà en cours d'exécution. Vérifiez la barre d'état système.</value>
|
||||
</data>
|
||||
<data name="ApplyFanCurve" xml:space="preserve">
|
||||
<value>Appliquer la courbe de ventilateur personnalisée</value>
|
||||
<value>Appliquer la courbe</value>
|
||||
</data>
|
||||
<data name="ApplyPowerLimits" xml:space="preserve">
|
||||
<value>Appliquer les limites de performance</value>
|
||||
<value>Appliquer les limites</value>
|
||||
</data>
|
||||
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
||||
<value>Ajuster automatiquement les modes de Performance Windows</value>
|
||||
<value>Ajustement auto des modes de gestion alim. Windows</value>
|
||||
</data>
|
||||
<data name="AuraBreathe" xml:space="preserve">
|
||||
<value>Respiration</value>
|
||||
<value>Pulsation</value>
|
||||
</data>
|
||||
<data name="AuraColorCycle" xml:space="preserve">
|
||||
<value>Cycle de couleur</value>
|
||||
@@ -125,19 +184,25 @@
|
||||
<value>Automatique</value>
|
||||
</data>
|
||||
<data name="AutoRefreshTooltip" xml:space="preserve">
|
||||
<value>Limiter le rafraîchissement de l’écran à 60Hz pour économiser de la batterie, et retour à la normal en chargement</value>
|
||||
<value>Limite à 60 Hz pour éco. batterie, valeur normale sur secteur</value>
|
||||
</data>
|
||||
<data name="Awake" xml:space="preserve">
|
||||
<value>Éveillé</value>
|
||||
<value>Allumé</value>
|
||||
</data>
|
||||
<data name="BacklightTimeout" xml:space="preserve">
|
||||
<value>Délai (secondes) avant extinction rétroéclairage</value>
|
||||
</data>
|
||||
<data name="Balanced" xml:space="preserve">
|
||||
<value>Balancé</value>
|
||||
<value>Équilibré</value>
|
||||
</data>
|
||||
<data name="BatteryChargeLimit" xml:space="preserve">
|
||||
<value>Limite de charge de la batterie</value>
|
||||
<value>Limite de charge </value>
|
||||
</data>
|
||||
<data name="Boot" xml:space="preserve">
|
||||
<value>Au lancement</value>
|
||||
<value>Au démarrage</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Luminosité</value>
|
||||
</data>
|
||||
<data name="Color" xml:space="preserve">
|
||||
<value>Couleur</value>
|
||||
@@ -152,25 +217,25 @@
|
||||
<value>Par défaut</value>
|
||||
</data>
|
||||
<data name="DisableOverdrive" xml:space="preserve">
|
||||
<value>Désactiver l’Overdrive de l’Écran</value>
|
||||
<value>Désactiver l'overdrive de l'écran</value>
|
||||
</data>
|
||||
<data name="Discharging" xml:space="preserve">
|
||||
<value>En déchargement</value>
|
||||
<value>Taux décharge </value>
|
||||
</data>
|
||||
<data name="DownloadUpdate" xml:space="preserve">
|
||||
<value>Télécharger la mise à jour</value>
|
||||
</data>
|
||||
<data name="EcoGPUTooltip" xml:space="preserve">
|
||||
<value>Désactive le dGPU pour économiser la batterie</value>
|
||||
<value>Désactive le dGPU pour préserver la batterie</value>
|
||||
</data>
|
||||
<data name="EcoMode" xml:space="preserve">
|
||||
<value>Économique</value>
|
||||
<value>Éco</value>
|
||||
</data>
|
||||
<data name="Extra" xml:space="preserve">
|
||||
<value>Aditionnel</value>
|
||||
<value>+ d'options</value>
|
||||
</data>
|
||||
<data name="ExtraSettings" xml:space="preserve">
|
||||
<value>Paramètres additionnels</value>
|
||||
<value>Paramètres supplémentaires</value>
|
||||
</data>
|
||||
<data name="FactoryDefaults" xml:space="preserve">
|
||||
<value>Paramètres d'usine</value>
|
||||
@@ -179,37 +244,55 @@
|
||||
<value>Courbes des ventilateurs</value>
|
||||
</data>
|
||||
<data name="FanProfileCPU" xml:space="preserve">
|
||||
<value>Profil de ventilateur CPU</value>
|
||||
<value>Profil du ventilateur CPU</value>
|
||||
</data>
|
||||
<data name="FanProfileGPU" xml:space="preserve">
|
||||
<value>Profil de ventilateur GPU</value>
|
||||
<value>Profil du ventilateur GPU</value>
|
||||
</data>
|
||||
<data name="FanProfileMid" xml:space="preserve">
|
||||
<value>Profil de ventilateur central</value>
|
||||
<value>Profil du ventilateur central</value>
|
||||
</data>
|
||||
<data name="FanProfiles" xml:space="preserve">
|
||||
<value>Profil des ventilateurs </value>
|
||||
<value>Profil</value>
|
||||
</data>
|
||||
<data name="FansAndPower" xml:space="preserve">
|
||||
<value>Ventilateurs et Puissance</value>
|
||||
<value>Ventilateurs + Puissance</value>
|
||||
</data>
|
||||
<data name="FanSpeed" xml:space="preserve">
|
||||
<value>Vent: </value>
|
||||
</data>
|
||||
<data name="FansPower" xml:space="preserve">
|
||||
<value>Ventilateurs + Puissance</value>
|
||||
</data>
|
||||
<data name="GPUBoost" xml:space="preserve">
|
||||
<value>Dynamic Boost</value>
|
||||
</data>
|
||||
<data name="GPUChanging" xml:space="preserve">
|
||||
<value>Changement</value>
|
||||
</data>
|
||||
<data name="GPUCoreClockOffset" xml:space="preserve">
|
||||
<value>Ajustement fréq. de base</value>
|
||||
</data>
|
||||
<data name="GPUMemoryClockOffset" xml:space="preserve">
|
||||
<value>Ajustement fréq. mémoire</value>
|
||||
</data>
|
||||
<data name="GPUMode" xml:space="preserve">
|
||||
<value>Mode de GPU</value>
|
||||
<value>Mode GPU </value>
|
||||
</data>
|
||||
<data name="GPUModeEco" xml:space="preserve">
|
||||
<value>Seulement iGPU</value>
|
||||
<value>iGPU uniquement</value>
|
||||
</data>
|
||||
<data name="GPUModeStandard" xml:space="preserve">
|
||||
<value>iGPU + dGPU</value>
|
||||
</data>
|
||||
<data name="GPUModeUltimate" xml:space="preserve">
|
||||
<value>Exclusivement dGPU</value>
|
||||
<value>dGPU exclusif</value>
|
||||
</data>
|
||||
<data name="GPUSettings" xml:space="preserve">
|
||||
<value>Paramètres du GPU</value>
|
||||
</data>
|
||||
<data name="GPUTempTarget" xml:space="preserve">
|
||||
<value>Température cible</value>
|
||||
</data>
|
||||
<data name="KeyBindings" xml:space="preserve">
|
||||
<value>Raccourcis clavier</value>
|
||||
@@ -218,16 +301,28 @@
|
||||
<value>Clavier</value>
|
||||
</data>
|
||||
<data name="KeyboardAuto" xml:space="preserve">
|
||||
<value>Baisser la luminosité du rétroéclairage sur batterie et retour à la normal en charge</value>
|
||||
<value>Réduire rétroéclairage sur batterie et mode normal sur secteur</value>
|
||||
</data>
|
||||
<data name="KeyboardBacklight" xml:space="preserve">
|
||||
<value>Rétroéclairage du clavier</value>
|
||||
<data name="LaptopBacklight" xml:space="preserve">
|
||||
<value>Rétroéclairage de l'ordinateur</value>
|
||||
</data>
|
||||
<data name="LaptopKeyboard" xml:space="preserve">
|
||||
<value>Clavier de l’ordinateur</value>
|
||||
<value>Clavier de l'ordinateur</value>
|
||||
</data>
|
||||
<data name="LaptopScreen" xml:space="preserve">
|
||||
<value>Écran de l’ordinateur</value>
|
||||
<value>Écran de l'ordinateur </value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Capot</value>
|
||||
</data>
|
||||
<data name="Lightbar" xml:space="preserve">
|
||||
<value>Barre lumineuse</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
<data name="MatrixAudio" xml:space="preserve">
|
||||
<value>Visualiseur Audio</value>
|
||||
</data>
|
||||
<data name="MatrixBanner" xml:space="preserve">
|
||||
<value>Bannière binaire</value>
|
||||
@@ -251,25 +346,31 @@
|
||||
<value>Éteint</value>
|
||||
</data>
|
||||
<data name="MatrixPicture" xml:space="preserve">
|
||||
<value>Image</value>
|
||||
<value>Images</value>
|
||||
</data>
|
||||
<data name="MaxRefreshTooltip" xml:space="preserve">
|
||||
<value>Rafraichissement maximum pour baisser la latance</value>
|
||||
<value>Rafraîchissement maximum, faible latence</value>
|
||||
</data>
|
||||
<data name="MinRefreshTooltip" xml:space="preserve">
|
||||
<value>Rafraichissement à 60Hz pour économiser de la batterie</value>
|
||||
<value>Rafraichîssement 60 Hz pour économiser de la batterie</value>
|
||||
</data>
|
||||
<data name="Multizone" xml:space="preserve">
|
||||
<value>Multizone</value>
|
||||
<value>Multi-zone</value>
|
||||
</data>
|
||||
<data name="MuteMic" xml:space="preserve">
|
||||
<value>Désactiver le micro</value>
|
||||
</data>
|
||||
<data name="OpenGHelper" xml:space="preserve">
|
||||
<value>Ouvrir la fenêtre G-Helper</value>
|
||||
<value>Ouvrir G-Helper</value>
|
||||
</data>
|
||||
<data name="Optimized" xml:space="preserve">
|
||||
<value>Optimizé</value>
|
||||
<value>Optimisé</value>
|
||||
</data>
|
||||
<data name="OptimizedGPUTooltip" xml:space="preserve">
|
||||
<value>Passer en Économique sur batterie et sur Standard en chargement</value>
|
||||
<value>Éco sur batterie, bascule vers Standard sur secteur</value>
|
||||
</data>
|
||||
<data name="OptimizedUSBC" xml:space="preserve">
|
||||
<value>Garder le GPU désactivé lorsque branché via USB-C en mode Optimisé</value>
|
||||
</data>
|
||||
<data name="Other" xml:space="preserve">
|
||||
<value>Autre</value>
|
||||
@@ -284,34 +385,37 @@
|
||||
<value>Image / Gif</value>
|
||||
</data>
|
||||
<data name="PlayPause" xml:space="preserve">
|
||||
<value>Reproduire / Pause</value>
|
||||
<value>Lecture / Pause</value>
|
||||
</data>
|
||||
<data name="PowerLimits" xml:space="preserve">
|
||||
<value>Limites de puissance (PPT)</value>
|
||||
</data>
|
||||
<data name="PPTExperimental" xml:space="preserve">
|
||||
<value>Limites de puissance (PPT) est une fonctionnalité expérimentale. Utilisez la avec attention et à vos risques.</value>
|
||||
<value>Limites de puissance (PPT) est une fonctionnalité expérimentale. Faire attention, à utiliser à vos risques !</value>
|
||||
</data>
|
||||
<data name="PrintScreen" xml:space="preserve">
|
||||
<value>Capture d’Écran</value>
|
||||
<value>Capture d'écran</value>
|
||||
</data>
|
||||
<data name="Quit" xml:space="preserve">
|
||||
<value>Quitter</value>
|
||||
</data>
|
||||
<data name="RestartGPU" xml:space="preserve">
|
||||
<value>Un processus utilisant le dGPU empêche le passage en mode Éco. Redémarrer le dGPU ? * Procédez à vos risques.</value>
|
||||
</data>
|
||||
<data name="RPM" xml:space="preserve">
|
||||
<value>RPM</value>
|
||||
<value> RPM</value>
|
||||
</data>
|
||||
<data name="RunOnStartup" xml:space="preserve">
|
||||
<value>Executer au lancement</value>
|
||||
<value>Exécuter au démarrage</value>
|
||||
</data>
|
||||
<data name="Shutdown" xml:space="preserve">
|
||||
<value>Éteindre</value>
|
||||
<value>Arrêter</value>
|
||||
</data>
|
||||
<data name="Silent" xml:space="preserve">
|
||||
<value>Silencieux</value>
|
||||
</data>
|
||||
<data name="Sleep" xml:space="preserve">
|
||||
<value>En veille</value>
|
||||
<value>Veille</value>
|
||||
</data>
|
||||
<data name="StandardGPUTooltip" xml:space="preserve">
|
||||
<value>Active le dGPU pour une utilisation standard</value>
|
||||
@@ -323,7 +427,13 @@
|
||||
<value>Erreur au lancement</value>
|
||||
</data>
|
||||
<data name="ToggleAura" xml:space="preserve">
|
||||
<value>Basculer Aura</value>
|
||||
<value>Activer Aura</value>
|
||||
</data>
|
||||
<data name="ToggleMiniled" xml:space="preserve">
|
||||
<value>Activer Miniled (si supporté)</value>
|
||||
</data>
|
||||
<data name="ToggleScreen" xml:space="preserve">
|
||||
<value>Allumer l'écran</value>
|
||||
</data>
|
||||
<data name="Turbo" xml:space="preserve">
|
||||
<value>Turbo</value>
|
||||
@@ -335,66 +445,24 @@
|
||||
<value>Éteindre sur batterie</value>
|
||||
</data>
|
||||
<data name="UltimateGPUTooltip" xml:space="preserve">
|
||||
<value>Redirige l’écran de l’ordinateur sur le dGPU pour maximiser le nombre de FPS</value>
|
||||
<value>Redirige l'écran du portable vers le dGPU, maximisation taux FPS </value>
|
||||
</data>
|
||||
<data name="UltimateMode" xml:space="preserve">
|
||||
<value>Ultimate</value>
|
||||
<value>Ultime</value>
|
||||
</data>
|
||||
<data name="VersionLabel" xml:space="preserve">
|
||||
<value>Version</value>
|
||||
<value>Version </value>
|
||||
</data>
|
||||
<data name="VolumeDown" xml:space="preserve">
|
||||
<value>Vol-</value>
|
||||
</data>
|
||||
<data name="VolumeMute" xml:space="preserve">
|
||||
<value>Mettre en sourdine</value>
|
||||
</data>
|
||||
<data name="VolumeUp" xml:space="preserve">
|
||||
<value>Vol+</value>
|
||||
</data>
|
||||
<data name="WindowTop" xml:space="preserve">
|
||||
<value>Garder l’application au premier plan</value>
|
||||
</data>
|
||||
<data name="Brightness" xml:space="preserve">
|
||||
<value>Luminosité</value>
|
||||
</data>
|
||||
<data name="FanSpeed" xml:space="preserve">
|
||||
<value>Ventilateurs :</value>
|
||||
</data>
|
||||
<data name="GPUBoost" xml:space="preserve">
|
||||
<value>Boost Dynamique</value>
|
||||
</data>
|
||||
<data name="GPUCoreClockOffset" xml:space="preserve">
|
||||
<value>Augmentation de la fréquence de base</value>
|
||||
</data>
|
||||
<data name="GPUMemoryClockOffset" xml:space="preserve">
|
||||
<value>Augmentation de la fréquence de la mémoire</value>
|
||||
</data>
|
||||
<data name="GPUSettings" xml:space="preserve">
|
||||
<value>Paramêtres de GPU</value>
|
||||
</data>
|
||||
<data name="GPUTempTarget" xml:space="preserve">
|
||||
<value>Température ciblée</value>
|
||||
</data>
|
||||
<data name="LaptopBacklight" xml:space="preserve">
|
||||
<value>Rétroéclairage de l’ordinateur</value>
|
||||
</data>
|
||||
<data name="Lid" xml:space="preserve">
|
||||
<value>Capot</value>
|
||||
</data>
|
||||
<data name="Lightbar" xml:space="preserve">
|
||||
<value>Barre de lumière</value>
|
||||
</data>
|
||||
<data name="Logo" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
<data name="OptimizedUSBC" xml:space="preserve">
|
||||
<value>Garder le GPU désactivé en chargement via USB-C dans le mode Optimisé</value>
|
||||
</data>
|
||||
<data name="RestartGPU" xml:space="preserve">
|
||||
<value>Un processus utilise le dGPU est empêche le passage en mode Économique. Redémarrer le dGPU dans le gestionnaire de périphérique ? * Veuillez procéder à vos risques</value>
|
||||
</data>
|
||||
<data name="ToggleMiniled" xml:space="preserve">
|
||||
<value>Basculer sur Miniled (si supporté)</value>
|
||||
</data>
|
||||
<data name="ToggleScreen" xml:space="preserve">
|
||||
<value>Basculer d’écran</value>
|
||||
</data>
|
||||
<data name="BacklightTimeout" xml:space="preserve">
|
||||
<value>Nombre de secondes avant d’éteindre le rétroéclairage sur batterie</value>
|
||||
<value>Maintenir la fenêtre au premier plan</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -154,7 +154,7 @@
|
||||
<value>Apply Power Limits</value>
|
||||
</data>
|
||||
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
||||
<value>Auto adjust Windows Power Mode</value>
|
||||
<value>Auto adjust Windows Power Modes</value>
|
||||
</data>
|
||||
<data name="AuraBreathe" xml:space="preserve">
|
||||
<value>Breathe</value>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<value>Застосувати потужність</value>
|
||||
</data>
|
||||
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
|
||||
<value>Автоматично застосовувати Windows Power Mode</value>
|
||||
<value>Автоматично застосовувати Windows Power Modes</value>
|
||||
</data>
|
||||
<data name="AuraBreathe" xml:space="preserve">
|
||||
<value>Дихання</value>
|
||||
|
||||
@@ -93,8 +93,6 @@ namespace GHelper
|
||||
comboMatrix.DropDownClosed += ComboMatrix_SelectedValueChanged;
|
||||
comboMatrixRunning.DropDownClosed += ComboMatrixRunning_SelectedValueChanged;
|
||||
|
||||
checkMatrix.CheckedChanged += CheckMatrix_CheckedChanged; ;
|
||||
|
||||
buttonMatrix.Click += ButtonMatrix_Click;
|
||||
|
||||
checkStartup.CheckedChanged += CheckStartup_CheckedChanged;
|
||||
@@ -282,8 +280,13 @@ namespace GHelper
|
||||
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPUXG) == 1)
|
||||
{
|
||||
Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM");
|
||||
await Task.Delay(TimeSpan.FromSeconds(15));
|
||||
KillGPUApps();
|
||||
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM");
|
||||
await Task.Delay(TimeSpan.FromSeconds(15));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -503,6 +506,7 @@ namespace GHelper
|
||||
{
|
||||
case 0:
|
||||
Logger.WriteLine("Monitor Power Off");
|
||||
AsusUSB.ApplyBrightness(0);
|
||||
SetBatteryChargeLimit(AppConfig.getConfig("charge_limit"));
|
||||
break;
|
||||
case 1:
|
||||
@@ -516,7 +520,7 @@ namespace GHelper
|
||||
}
|
||||
m.Result = (IntPtr)1;
|
||||
break;
|
||||
|
||||
|
||||
case KeyHandler.WM_HOTKEY_MSG_ID:
|
||||
|
||||
Keys key = (Keys)(((int)m.LParam >> 16) & 0xFFFF);
|
||||
@@ -716,7 +720,7 @@ namespace GHelper
|
||||
|
||||
matrix = new AniMatrix();
|
||||
|
||||
if (!AniMatrix.IsValid)
|
||||
if (!matrix.IsValid)
|
||||
{
|
||||
panelMatrix.Visible = false;
|
||||
return;
|
||||
@@ -729,7 +733,7 @@ namespace GHelper
|
||||
comboMatrixRunning.SelectedIndex = (running != -1) ? Math.Min(running, comboMatrixRunning.Items.Count - 1) : 0;
|
||||
|
||||
checkMatrix.Checked = (AppConfig.getConfig("matrix_auto") == 1);
|
||||
|
||||
checkMatrix.CheckedChanged += CheckMatrix_CheckedChanged;
|
||||
|
||||
}
|
||||
|
||||
@@ -889,6 +893,7 @@ namespace GHelper
|
||||
|
||||
private void ButtonQuit_Click(object? sender, EventArgs e)
|
||||
{
|
||||
matrix.Dispose();
|
||||
Close();
|
||||
Program.trayIcon.Visible = false;
|
||||
Application.Exit();
|
||||
@@ -1260,13 +1265,12 @@ namespace GHelper
|
||||
{
|
||||
AsusUSB.Init();
|
||||
|
||||
if (AppConfig.getConfig("keyboard_auto") != 1) return;
|
||||
int backlight = AppConfig.getConfig("keyboard_brightness");
|
||||
|
||||
if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online)
|
||||
AsusUSB.ApplyBrightness(3);
|
||||
else
|
||||
if (AppConfig.isConfig("keyboard_auto") && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online)
|
||||
AsusUSB.ApplyBrightness(0);
|
||||
|
||||
else if (backlight >= 0)
|
||||
AsusUSB.ApplyBrightness(backlight);
|
||||
|
||||
}
|
||||
|
||||
@@ -1305,7 +1309,7 @@ namespace GHelper
|
||||
bool optimizedUSBC = AppConfig.getConfig("optimized_usbc") != 1;
|
||||
|
||||
return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online &&
|
||||
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) != AsusACPI.ChargerUSB);
|
||||
(optimizedUSBC || Program.acpi.DeviceGet(AsusACPI.ChargerMode) < AsusACPI.ChargerUSB);
|
||||
|
||||
}
|
||||
|
||||
@@ -1432,6 +1436,8 @@ namespace GHelper
|
||||
GpuMode = AsusACPI.GPUModeStandard;
|
||||
|
||||
UltimateUI(mux == 1);
|
||||
|
||||
if (eco < 0) tableGPU.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -1490,6 +1496,14 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
protected static void KillGPUApps()
|
||||
{
|
||||
string[] tokill = { "EADesktop", "RadeonSoftware", "epicgameslauncher" };
|
||||
foreach (string kill in tokill)
|
||||
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
||||
|
||||
}
|
||||
|
||||
public void SetGPUEco(int eco, bool hardWay = false)
|
||||
{
|
||||
|
||||
@@ -1506,12 +1520,7 @@ namespace GHelper
|
||||
|
||||
int status;
|
||||
|
||||
if (eco == 1)
|
||||
{
|
||||
string[] tokill = { "EADesktop", "RadeonSoftware" };
|
||||
foreach (string kill in tokill)
|
||||
foreach (var process in Process.GetProcessesByName(kill)) process.Kill();
|
||||
}
|
||||
if (eco == 1) KillGPUApps();
|
||||
|
||||
//if (eco == 1) status = 0; else
|
||||
status = Program.acpi.SetGPUEco(eco);
|
||||
|
||||
@@ -101,13 +101,11 @@ Open "Event Viewer" from start menu, go to Windows Logs -> Application and check
|
||||
#### Battery charge limiter is not working
|
||||
Open application log.text from ``%AppData%\GHelper`` . If you see something like ``BatteryLimit = 60 : OK`` there (with your selected limit). App has done everything it could to set a limit. It could be that MyASUS or other Asus services are overwriting this limit after. You may want to right click and save this [debloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat) and then right-click Run it As Admin. It will stop not mandatory asus services.
|
||||
|
||||
What you can also try is to open ``C:\ProgramData\ASUS\ASUS System Control Interface\ASUSOptimization\Customization.ini`` and find following section from that file : ``[BatteryHealthCharging] ... value=100`` and either delete it or put same value as you use in G-helper.
|
||||
|
||||
#### Can I use MyASUS app along with G-Helper?
|
||||
You can, the only problem is that MyASUS may override the battery charge limit that you set before. My advice in such a situation would be to set the same limit (i.e. 80%) in both MyASUS and G-Helper.
|
||||
|
||||
#### How do I set Mute Microphone to M3?
|
||||
This function is handled by Asus Optimization Service (therefore G-helper doesn't interfere and doesn't touch this function). Make sure that this service is up and running
|
||||
If you have Asus Optimization Service running, it's controlled by that service (therefore G-helper doesn't interfere and doesn't touch this function). Alternatively you can stop that service - and you can bind M3 to anything you want.
|
||||
|
||||
#### How do I set different "Visual styles"?
|
||||
Personally, i'm not a big fan of them, as they make colors very inaccurate. But if you want so - you can adjust display colors using either Nvidia Control panel or AMD Adrenaline (appropriate display sections). If you really want you can also use [own ASUS utility from MS Store](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1)
|
||||
@@ -147,9 +145,7 @@ It's a lightweight Armoury Crate alternative for Asus laptops. A small utility t
|
||||
|
||||
### Recommendations (optional)
|
||||
|
||||
- I recommend keeping "Asus Optimization Service" running, as it keeps basic laptop hotkeys such as screen or keyboard brightness adjustment working.
|
||||
|
||||
- Optionally(!) you can disable / remove unnecessary services. Ruight click and save [debloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat). Then right click and Run it as Admin. To restore services - save and run [bloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat) instead.
|
||||
- You can disable / remove unnecessary services. Ruight click and save [debloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/debloat.bat). Then right click and Run it as Admin. To restore services - save and run [bloat.bat](https://raw.githubusercontent.com/seerge/g-helper/main/bloat.bat) instead.
|
||||
|
||||
- It's not recommended to use an app in combination with Armoury Crate services, because they adjust the same settings. You can [uninstall it using it's own uninstall tool](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate). Just in case, you can always install it back later.
|
||||
|
||||
@@ -200,7 +196,7 @@ Full list of keycodes https://learn.microsoft.com/en-us/windows/win32/inputdev/v
|
||||
|
||||

|
||||
|
||||
### Workaround for [bugged bios on G15](https://github.com/seerge/g-helper/issues/253)
|
||||
### Workaround for [bugged bios on G15](https://github.com/seerge/g-helper/issues/253) when external monitor is connected
|
||||
|
||||
Some people reported that on G15 model bios can be bugged and either not turn on or not turn off fans, when you set custom fan curve (in Armoury or g-helper, or any other app)
|
||||
I have added a very optional workaround as it was asked, on launch app will try to disable and re-enable dGPU when external monitor is connected, that seems to wake up fans :)
|
||||
|
||||
Reference in New Issue
Block a user