Compare commits

..

91 Commits

Author SHA1 Message Date
Serge
d10702d2a2 Main merge 2024-04-26 19:39:32 +02:00
Serge
e52ee2094c Custom payloads for Slash Lighting 2024-04-26 13:46:47 +02:00
Serge
7e523d02c0 Renamed matrix brightness to gamma 2024-04-26 12:19:39 +02:00
Serge
6d36794f5e Matrix Brightness reset 2024-04-26 12:07:49 +02:00
Serge
271b2fd627 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-26 11:53:35 +02:00
Serge
15da5f64e5 Anime Matrix Brightness https://github.com/seerge/g-helper/issues/2486 2024-04-26 11:53:33 +02:00
Serge
0a2e755b72 Update README.md 2024-04-25 23:36:42 +02:00
Serge
1b371b6e38 New translations strings.resx (Danish) (#2494) 2024-04-25 21:05:17 +02:00
Serge
f1286af4b7 UI Fix https://github.com/seerge/g-helper/issues/2492 2024-04-25 21:04:42 +02:00
Serge
d634bdb26c UI Tweaks 2024-04-25 15:09:38 +02:00
Serge
950c1802e8 Version bump 2024-04-25 15:00:21 +02:00
Serge
660e15667a Update README.md 2024-04-25 11:26:48 +02:00
Serge
c69b3ffab2 New Crowdin updates (#2490)
* New translations strings.resx (Danish)

* New translations strings.resx (Danish)
2024-04-24 20:18:05 +02:00
Serge
009c947d30 Update README.md 2024-04-24 17:32:20 +02:00
Serge
3981d2e028 FHD toggle tweaks https://github.com/seerge/g-helper/discussions/2485 2024-04-23 23:43:12 +02:00
Serge
b03453d721 Hotkey actions url update 2024-04-23 23:33:41 +02:00
Serge
a5a34df139 UI Tweaks 2024-04-23 23:21:07 +02:00
Serge
8877bb5938 Panel UHD/FHD mode switch #2485 2024-04-23 23:07:49 +02:00
Serge
cb165093ac Merge branch 'main' into AllyTDP 2024-04-22 17:52:55 +02:00
Serge
945fa9ea59 Custom bindings tweak 2024-04-22 17:32:26 +02:00
Serge
09b0eeeff8 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-22 14:29:40 +02:00
Serge
40098293ca Bundle slash lighting sleep animation with brightness setting https://github.com/seerge/g-helper/issues/2381 2024-04-22 14:29:39 +02:00
Serge
ceb1386ca7 New Crowdin updates (#2473)
* New translations strings.resx (Turkish)

* New translations strings.resx (German)
2024-04-22 11:59:33 +02:00
Serge
231edde166 Separated GPU clocks and GPU power setting 2024-04-21 20:24:10 +02:00
Serge
8f70f2a65f Max fan speeds for FX607J 2024-04-21 13:36:01 +02:00
Serge
e193290736 Tray icons update 2024-04-21 13:27:57 +02:00
Serge
23ee21e351 BW Icons update https://github.com/seerge/g-helper/issues/2463 2024-04-21 11:03:37 +02:00
Serge
1e18b94a9c Added UM340 to OLED list https://github.com/seerge/g-helper/discussions/2462 2024-04-20 23:55:29 +02:00
Serge
bdba153ddc Slash Lighting tweaks https://github.com/seerge/g-helper/issues/2381 2024-04-20 18:57:10 +02:00
Serge
c65002cbae Per-led static slash lighting brightness https://github.com/seerge/g-helper/issues/2448 2024-04-19 19:29:20 +02:00
Serge
b6682522d8 Static white for Slash Lighting https://github.com/seerge/g-helper/issues/2448 2024-04-19 16:40:52 +02:00
Serge
c6247f630c Slash lighting tweaks 2024-04-19 14:48:02 +02:00
Serge
fa125e3346 Merge branch 'main' into AllyTDP 2024-04-19 11:56:26 +02:00
Serge
cd4936c839 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-19 11:50:58 +02:00
Serge
5dc9061162 Version Bump 2024-04-19 11:50:56 +02:00
Serge
81b128e76c New translations strings.resx (Chinese Traditional) (#2450) 2024-04-19 11:42:36 +02:00
Serge
5fc999efe8 Fn-lock tweak 2024-04-18 18:14:09 +02:00
Serge
ae41aedb1e Support for inverted fn-lock https://github.com/seerge/g-helper/issues/2445 2024-04-18 18:03:56 +02:00
Serge
51bf22e6a6 Static mode for Slash Lighting https://github.com/seerge/g-helper/issues/2448 2024-04-18 12:52:49 +02:00
Serge
ad3d31cba4 Slash lightning tweak https://github.com/seerge/g-helper/issues/2447 2024-04-18 10:55:00 +02:00
Serge
f13209f403 G614JVR backlight tweaks https://github.com/seerge/g-helper/issues/2444 2024-04-17 17:05:26 +02:00
Serge
32c007ada7 TDP tweaks 2024-04-17 12:55:15 +02:00
Serge
2a949732a2 OLED settings for M140 https://github.com/seerge/g-helper/issues/2445 2024-04-17 11:01:00 +02:00
Serge
b83fa41772 Merge branch 'main' into AllyTDP 2024-04-16 23:39:44 +02:00
Serge
966dd01f1d Power based AutoTDP 2024-04-16 20:56:24 +02:00
Serge
4f571e276c Cleanup 2024-04-16 20:03:33 +02:00
Serge
fc1f594a61 Max fan speeds for GU605 2024-04-16 16:24:55 +02:00
Serge
54ece1f621 TDP tweaks 2024-04-16 14:47:22 +02:00
Serge
a3474d38a5 AutoTDP tweaks 2024-04-15 21:23:52 +02:00
Serge
300eb7af70 Aura cleanup 2024-04-15 19:32:29 +02:00
Serge
d952d8859c AutoTDP tweaks 2024-04-15 16:06:57 +02:00
Serge
c43bab3a33 AutoTDP toggle 2024-04-15 15:27:15 +02:00
Serge
55f45fba03 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-15 12:18:21 +02:00
Serge
b41055ce0f Updates tweaks 2024-04-15 12:18:18 +02:00
Serge
ebb8cda8f0 New translations strings.resx (Turkish) (#2434) 2024-04-15 12:17:59 +02:00
Serge
f983bdac42 Updates fix 2024-04-15 00:17:00 +02:00
Serge
04143abf7c Updates fix 2024-04-15 00:05:43 +02:00
Serge
b219ff5af4 Updates tweak 2024-04-14 23:25:10 +02:00
Serge
df20fa63a9 Clock reset fix 2024-04-14 22:46:14 +02:00
Serge
fa8bce17c6 TDP tweaks 2024-04-14 22:32:46 +02:00
Serge
6978689f3d TDP fixes 2024-04-14 18:35:25 +02:00
Serge
ad8858b836 Init 2024-04-14 17:32:39 +02:00
Serge
501dcb3235 Updates UI tweaks 2024-04-14 15:46:02 +02:00
Serge
322c5dd7c5 Updates section fix 2024-04-14 15:20:47 +02:00
Serge
f68b9218b6 Keyboard control for power sliders 2024-04-14 14:49:11 +02:00
Serge
f35ad1804c Power limits UI tweaks 2024-04-14 14:38:11 +02:00
Serge
5739b63225 Mouse Events support https://github.com/seerge/g-helper/issues/2430 2024-04-14 12:16:35 +02:00
Serge
4cdfb6710b Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-13 15:52:32 +02:00
Serge
db9e4d75cb Power limits improvement for https://github.com/seerge/g-helper/issues/2429 https://github.com/seerge/g-helper/issues/2429 2024-04-13 15:52:29 +02:00
Serge
2d52345f11 Update README.md 2024-04-11 23:49:56 +02:00
Serge
64745ca01e Aura tweaks 2024-04-11 20:05:21 +02:00
Serge
4b42106c31 Added G614J / G814J to the list of devices that require fans curve to be applied in order to make custom power liimits work 2024-04-11 15:06:00 +02:00
Serge
387e869833 UI Tweaks 2024-04-11 13:05:41 +02:00
Serge
2a8e24bc74 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-11 11:55:19 +02:00
Serge
5c000c0bb0 Typo fix 2024-04-11 11:55:17 +02:00
Serge
1f22887197 Update README.md 2024-04-10 12:17:06 +02:00
Serge
a3913e0ea8 Update README.md 2024-04-10 12:16:40 +02:00
Serge
2aa34edfb2 Version bump 2024-04-07 13:56:02 +02:00
Serge
d7fe4a3bee ModeToggle delay https://github.com/seerge/g-helper/issues/2391 2024-04-05 14:50:21 +02:00
Serge
f072dbe020 Refresh rate hotkey https://github.com/seerge/g-helper/issues/2389 2024-04-05 14:06:59 +02:00
Serge
ccfd514081 Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-05 13:53:28 +02:00
Serge
558f8b2cc0 Slash lightning tweaks https://github.com/seerge/g-helper/issues/2381 2024-04-05 13:53:25 +02:00
Serge
bbf4c10a2e New Crowdin updates (#2383)
* New translations strings.resx (Turkish)

* New translations strings.resx (Turkish)
2024-04-04 17:41:43 +02:00
Serge
fe4e2ea478 New Crowdin updates (#2382)
* New translations strings.resx (Turkish)

* New translations strings.resx (Turkish)
2024-04-04 13:00:03 +02:00
Serge
8d7108bc1e New translations strings.resx (Spanish) (#2374) 2024-04-03 13:23:46 +02:00
Serge
3e28d3f027 New Crowdin updates (#2369)
* New translations strings.resx (Polish)

* New translations strings.resx (French)
2024-04-03 09:52:47 +02:00
Serge
0e42f7955e New translations strings.resx (German) (#2367) 2024-04-02 20:26:11 +02:00
Serge
fff3c2924e Corrected vivobook dimming 2024-04-02 18:15:38 +02:00
Serge
65716048ff Merge branch 'main' of https://github.com/seerge/g-helper 2024-04-02 14:48:30 +02:00
Serge
2e0eed3ab9 Dimming hotkeys for Vivobooks 2024-04-02 14:48:27 +02:00
Serge
bde76ead7e New translations strings.resx (Chinese Simplified) (#2363) 2024-04-02 10:52:34 +02:00
42 changed files with 2039 additions and 330 deletions

View File

@@ -1,10 +1,13 @@
using GHelper.Gpu.AMD;
using GHelper.Helpers;
using GHelper.Input;
using GHelper.Mode;
using GHelper.USB;
using HidSharp;
using System.Text;
namespace GHelper.Ally
{
@@ -32,17 +35,28 @@ namespace GHelper.Ally
public class AllyControl
{
System.Timers.Timer timer = default!;
static System.Timers.Timer timer = default!;
static AmdGpuControl amdControl = new AmdGpuControl();
SettingsForm settings;
static ControllerMode _mode = ControllerMode.Auto;
static ControllerMode _applyMode = ControllerMode.Mouse;
static int _autoCount = 0;
static int _upCount = 0;
static int _downCount = 0;
static int tdpMin = 6;
static int tdpStable = tdpMin;
static int tdpCurrent = -1;
static bool autoTDP = false;
static int fpsLimit = -1;
public const string BindA = "01-01";
public const string BindB = "01-02";
public const string BindX = "01-03";
@@ -280,32 +294,116 @@ namespace GHelper.Ally
public AllyControl(SettingsForm settingsForm)
{
if (!AppConfig.IsAlly()) return;
settings = settingsForm;
timer = new System.Timers.Timer(300);
timer.Elapsed += Timer_Elapsed;
if (timer is null)
{
timer = new System.Timers.Timer(300);
timer.Elapsed += Timer_Elapsed;
Logger.WriteLine("Ally timer");
}
}
private int GetMaxTDP()
{
int tdp = AppConfig.GetMode("limit_total");
if (tdp > 0) return tdp;
switch (Modes.GetCurrentBase())
{
case 1:
return 25;
case 2:
return 10;
default:
return 15;
}
}
private int GetTDP()
{
if (tdpCurrent < 0) tdpCurrent = GetMaxTDP();
return tdpCurrent;
}
private void SetTDP(int tdp, string log)
{
if (tdp < tdpStable) tdp = tdpStable;
int max = GetMaxTDP();
if (tdp > max) tdp = max;
if (tdp == tdpCurrent) return;
if (!autoTDP) return;
Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, tdp, log);
Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, tdp, null);
Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, tdp, null);
tdpCurrent = tdp;
}
private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
if (!autoTDP && _mode != ControllerMode.Auto) return;
float fps = amdControl.GetFPS();
ControllerMode newMode = (fps > 0) ? ControllerMode.Gamepad : ControllerMode.Mouse;
if (_applyMode != newMode) _autoCount++;
else _autoCount = 0;
if (_mode != ControllerMode.Auto) return;
if (_autoCount > 2)
if (autoTDP && fpsLimit > 0 && fpsLimit <= 120)
{
_autoCount = 0;
ApplyMode(newMode);
Logger.WriteLine(fps.ToString());
int power = (int)amdControl.GetGpuPower();
//Debug.WriteLine($"{power}: {fps}");
if (fps <= fpsLimit * 0.8) _upCount++;
else _upCount = 0;
if (fps >= fpsLimit * 0.90) _downCount++;
else _downCount = 0;
var tdp = GetTDP();
if (_upCount >= 1)
{
_downCount = 0;
_upCount = 0;
SetTDP(tdp + 1, $"AutoTDP+ [{power}]{fps}");
}
if (_downCount >= 8 && power < tdp)
{
_upCount = 0;
_downCount--;
SetTDP(tdp - 1, $"AutoTDP- [{power}]{fps}");
}
}
if (_mode == ControllerMode.Auto)
{
ControllerMode newMode = (fps > 0) ? ControllerMode.Gamepad : ControllerMode.Mouse;
if (_applyMode != newMode) _autoCount++;
else _autoCount = 0;
if (_autoCount == 3)
{
_autoCount = 0;
ApplyMode(newMode);
Logger.WriteLine($"Controller Mode {fps}: {newMode}");
}
}
}
public void ToggleAutoTDP()
{
autoTDP = !autoTDP;
tdpCurrent = -1;
if (!autoTDP)
{
Program.modeControl.SetPerformanceMode();
}
settings.VisualiseAutoTDP(autoTDP);
}
public void Init()
@@ -319,7 +417,6 @@ namespace GHelper.Ally
fpsLimit = amdControl.GetFPSLimit();
settings.VisualiseFPSLimit(fpsLimit);
}
public void ToggleFPSLimit()
@@ -479,7 +576,7 @@ namespace GHelper.Ally
DecodeBinding(KeyR2).CopyTo(bindings, 38);
//AsusHid.WriteInput(CommandReady, null);
AsusHid.WriteInput(bindings, $"B{zone}");
AsusHid.WriteInput(bindings, null);
}
@@ -495,19 +592,19 @@ namespace GHelper.Ally
(byte)AppConfig.Get("ls_max", 100),
(byte)AppConfig.Get("rs_min", 0),
(byte)AppConfig.Get("rs_max", 100)
}, "StickDeadzone");
}, null);
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 5, 4,
(byte)AppConfig.Get("lt_min", 0),
(byte)AppConfig.Get("lt_max", 100),
(byte)AppConfig.Get("rt_min", 0),
(byte)AppConfig.Get("rt_max", 100)
}, "TriggerDeadzone");
}, null);
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 6, 2,
(byte)AppConfig.Get("vibra", 100),
(byte)AppConfig.Get("vibra", 100)
}, "Vibration");
}, null);
}
@@ -572,18 +669,11 @@ namespace GHelper.Ally
_mode = mode;
AppConfig.Set("controller_mode", (int)mode);
amdControl.StopFPS();
ApplyMode(mode, init);
if (mode == ControllerMode.Auto)
{
amdControl.StartFPS();
timer.Start();
}
else
{
timer.Stop();
amdControl.StopFPS();
}
amdControl.StartFPS();
timer.Start();
settings.VisualiseController(mode);
}

View File

@@ -59,16 +59,6 @@ namespace GHelper.AnimeMatrix
if (deviceSlash is not null) SetSlash(wakeUp);
}
public void SetLidMode(bool force = false)
{
if (AppConfig.Is("matrix_lid") || force)
{
Logger.WriteLine($"Matrix LidClosed: {lidClose}");
SetDevice(true);
}
}
public void SetSlash(bool wakeUp = false)
{
if (deviceSlash is null) return;
@@ -98,6 +88,7 @@ namespace GHelper.AnimeMatrix
{
deviceSlash.Init();
deviceSlash.SetOptions(false, 0, 0);
deviceSlash.SetSleepActive(false);
}
else
{
@@ -108,16 +99,56 @@ namespace GHelper.AnimeMatrix
}
deviceSlash.Init();
deviceSlash.SetMode((SlashMode)running);
deviceSlash.SetOptions(true, brightness, inteval);
deviceSlash.Save();
switch ((SlashMode)running)
{
case SlashMode.Static:
var custom = AppConfig.GetString("slash_custom");
if (custom is not null && custom.Length > 0)
{
deviceSlash.SetCustom(AppConfig.StringToBytes(custom));
} else
{
deviceSlash.SetStatic(brightness);
}
break;
default:
deviceSlash.SetMode((SlashMode)running);
deviceSlash.SetOptions(true, brightness, inteval);
deviceSlash.Save();
break;
}
deviceSlash.SetSleepActive(true);
}
});
}
public void SetLidMode(bool force = false)
{
bool matrixLid = AppConfig.Is("matrix_lid");
if (deviceSlash is not null)
{
deviceSlash.SetLidMode(matrixLid);
}
if (matrixLid || force)
{
Logger.WriteLine($"Matrix LidClosed: {lidClose}");
SetDevice(true);
}
}
public void SetBatteryAuto()
{
if (deviceSlash is not null) deviceSlash.SetBatterySaver(AppConfig.Is("matrix_auto"));
if (deviceSlash is not null)
{
bool auto = AppConfig.Is("matrix_auto");
deviceSlash.SetBatterySaver(auto);
if (!auto) SetSlash();
}
if (deviceMatrix is not null) SetMatrix();
}
@@ -441,6 +472,7 @@ namespace GHelper.AnimeMatrix
int matrixZoom = AppConfig.Get("matrix_zoom", 100);
int matrixContrast = AppConfig.Get("matrix_contrast", 100);
int matrixGamma = AppConfig.Get("matrix_gamma", 0);
int matrixSpeed = AppConfig.Get("matrix_speed", 50);
@@ -462,9 +494,9 @@ namespace GHelper.AnimeMatrix
image.SelectActiveFrame(dimension, i);
if (rotation == MatrixRotation.Planar)
deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma);
else
deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma);
deviceMatrix.AddFrame();
}
@@ -479,9 +511,9 @@ namespace GHelper.AnimeMatrix
else
{
if (rotation == MatrixRotation.Planar)
deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma);
else
deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma);
deviceMatrix.Present();
}

View File

@@ -344,21 +344,21 @@ namespace GHelper.AnimeMatrix
if (present) Present();
}
private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100)
private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100, int gamma = 0)
{
for (int y = 0; y < bmp.Height; y++)
{
for (int x = 0; x < bmp.Width; x++)
{
var pixel = bmp.GetPixel(x, y);
var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255);
var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255);
if (color > 20)
SetLedDiagonal(x, y, (byte)color, deltaX, deltaY - (FullRows / 2) - 1);
}
}
}
private void SetBitmapLinear(Bitmap bmp, int contrast = 100)
private void SetBitmapLinear(Bitmap bmp, int contrast = 100, int gamma = 0)
{
for (int y = 0; y < bmp.Height; y++)
{
@@ -366,7 +366,7 @@ namespace GHelper.AnimeMatrix
if (x % 2 == y % 2)
{
var pixel = bmp.GetPixel(x, y);
var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255);
var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255);
if (color > 20)
SetLedPlanar(x / 2, y, (byte)color);
}
@@ -413,7 +413,7 @@ namespace GHelper.AnimeMatrix
Present();
}
public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100)
public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0)
{
int width = MaxColumns / 2 * 6;
int height = MaxRows;
@@ -440,11 +440,11 @@ namespace GHelper.AnimeMatrix
}
Clear();
SetBitmapLinear(bmp, contrast);
SetBitmapLinear(bmp, contrast, gamma);
}
}
public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100)
public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0)
{
int width = MaxRows + FullRows;
int height = MaxColumns + FullRows;
@@ -471,7 +471,7 @@ namespace GHelper.AnimeMatrix
}
Clear();
SetBitmapDiagonal(bmp, -panX, height + panY, contrast);
SetBitmapDiagonal(bmp, -panX, height + panY, contrast, gamma);
}
}

View File

@@ -19,7 +19,8 @@ namespace GHelper.AnimeMatrix
Ramp,
GameOver,
Start,
Buzzer
Buzzer,
Static
}
internal class SlashPacket : Packet
@@ -53,6 +54,7 @@ namespace GHelper.AnimeMatrix
{ SlashMode.GameOver, "Game Over"},
{ SlashMode.Start, "Start"},
{ SlashMode.Buzzer, "Buzzer"},
{ SlashMode.Static, "Static"},
};
private static Dictionary<SlashMode, byte> modeCodes = new Dictionary<SlashMode, byte>
@@ -115,6 +117,22 @@ namespace GHelper.AnimeMatrix
Set(Packet<SlashPacket>(0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13), "SlashMode");
}
public void SetStatic(int brightness = 0)
{
SetCustom(Enumerable.Repeat((byte)(brightness * 85.333), 7).ToArray());
}
public void SetCustom(byte[] data)
{
Set(Packet<SlashPacket>(0xD2, 0x02, 0x01, 0x08, 0xAC), "Static");
Set(Packet<SlashPacket>(0xD3, 0x03, 0x01, 0x08, 0xAC, 0xFF, 0xFF, 0x01, 0x05, 0xFF, 0xFF), "StaticSettings");
Set(Packet<SlashPacket>(0xD4, 0x00, 0x00, 0x01, 0xAC), "StaticSave");
byte[] payload = new byte[] { 0xD3, 0x00, 0x00, 0x07 };
Set(Packet<SlashPacket>(payload.Concat(data.Take(7)).ToArray()), "Static Data");
}
public void SetOptions(bool status, int brightness = 0, int interval = 0)
{
byte brightnessByte = (byte)(brightness * 85.333);
@@ -124,18 +142,24 @@ namespace GHelper.AnimeMatrix
public void SetBatterySaver(bool status)
{
Set(Packet<SlashPacket>(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00), "SlashBatterySaver");
Set(Packet<SlashPacket>(0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00), $"SlashBatterySaver {status}");
}
public void SetLidMode(bool status)
{
Set(Packet<SlashPacket>(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00));
Set(Packet<SlashPacket>(0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x80 : (byte)0x00), $"DisableLidClose {status}");
}
public void SetSleepActive(bool status)
{
Set(Packet<SlashPacket>(0xD2, 0x02, 0x01, 0x08, 0xA1), "SleepInit");
Set(Packet<SlashPacket>(0xD3, 0x03, 0x01, 0x08, 0xA1, 0x00, 0xFF, status ? (byte)0x01 : (byte)0x00, 0x02, 0xFF, 0xFF), $"Sleep {status}");
}
public void Set(Packet packet, string? log = null)
{
_usbProvider?.Set(packet.Data);
if (log is not null) Logger.WriteLine("Slash:" + BitConverter.ToString(packet.Data));
if (log is not null) Logger.WriteLine($"{log}:" + BitConverter.ToString(packet.Data).Substring(0,48));
}

View File

@@ -404,9 +404,14 @@ public static class AppConfig
return ContainsModel("GA503") || IsSlash();
}
public static bool IsInvertedFNLock()
{
return ContainsModel("M140");
}
public static bool IsOLED()
{
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350");
return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("UM340");
}
public static bool IsNoOverdrive()
@@ -426,7 +431,7 @@ public static class AppConfig
public static bool IsStrixLimitedRGB()
{
return (ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM") || ContainsModel("G531G")) && !Is("per_key_rgb");
return (ContainsModel("G614JV_") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM") || ContainsModel("G531G")) && !Is("per_key_rgb");
}
@@ -553,7 +558,7 @@ public static class AppConfig
public static bool IsFanRequired()
{
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R") || ContainsModel("G713P") || ContainsModel("GU605") || ContainsModel("GA403") || ContainsModel("G634J") || ContainsModel("G834J");
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R") || ContainsModel("G713P") || ContainsModel("GU605") || ContainsModel("GA403") || ContainsModel("G634J") || ContainsModel("G834J") || ContainsModel("G614J") || ContainsModel("G814J") || ContainsModel("FX507V");
}
public static bool IsAMDLight()
@@ -591,11 +596,6 @@ public static class AppConfig
return ContainsModel("G814") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634");
}
public static bool IsNewAura()
{
return ContainsModel("G834") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634");
}
public static bool IsNoFNV()
{
return ContainsModel("FX507") || ContainsModel("FX707");

View File

@@ -79,6 +79,7 @@ public class AsusACPI
public const uint ScreenOverdrive = 0x00050019;
public const uint ScreenMiniled1 = 0x0005001E;
public const uint ScreenMiniled2 = 0x0005002E;
public const uint ScreenFHD = 0x0005001C;
public const uint DevsCPUFan = 0x00110022;
public const uint DevsGPUFan = 0x00110023;

View File

@@ -866,14 +866,23 @@ namespace GHelper
private void VisualizeCurrentDPIProfile()
{
if (mouse.DpiProfile > mouse.DpiSettings.Count())
if (mouse.DpiProfile > mouse.DpiSettings.Length)
{
Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile}");
return;
}
AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
AsusMouseDPI dpi;
try
{
dpi = mouse.DpiSettings[mouse.DpiProfile - 1];
} catch (Exception ex)
{
Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile} {mouse.DpiSettings.Length} {ex.Message}");
return;
}
if (dpi is null)
{
return;

View File

@@ -1,4 +1,6 @@
namespace GHelper.Display
using System.Diagnostics;
namespace GHelper.Display
{
public class ScreenControl
{
@@ -21,6 +23,16 @@
}
}
public void ToggleScreenRate()
{
var laptopScreen = ScreenNative.FindLaptopScreen(true);
var refreshRate = ScreenNative.GetRefreshRate(laptopScreen);
if (refreshRate < 0) return;
ScreenNative.SetRefreshRate(laptopScreen, refreshRate > 60 ? 60 : ScreenNative.GetMaxRefreshRate(laptopScreen));
InitScreen();
}
public void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1)
{
@@ -59,6 +71,18 @@
InitScreen();
}
public void ToogleFHD()
{
int fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD);
Logger.WriteLine($"FHD Toggle: {fhd}");
DialogResult dialogResult = MessageBox.Show("Changing display mode requires reboot", Properties.Strings.AlertUltimateTitle, MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Program.acpi.DeviceSet(AsusACPI.ScreenFHD, (fhd == 1) ? 0 : 1, "FHD");
Process.Start("shutdown", "/r /t 1");
}
}
public int ToogleMiniled()
{
@@ -115,6 +139,12 @@
bool screenEnabled = (frequency >= 0);
int fhd = -1;
if (AppConfig.IsDUO())
{
fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD);
}
AppConfig.Set("frequency", frequency);
AppConfig.Set("overdrive", overdrive);
@@ -129,7 +159,8 @@
overdriveSetting: overdriveSetting,
miniled1: miniled1,
miniled2: miniled2,
hdr: hdr
hdr: hdr,
fhd: fhd
);
});

View File

@@ -25,7 +25,7 @@ namespace GHelper.Display
VivoEycare = 7,
Init = 10,
DimmingAsus = 9,
DimmingVivo = 9,
DimmingVisual = 19,
GamutMode = 200,
@@ -66,6 +66,11 @@ namespace GHelper.Display
return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\ASUS System Control Interface\\ASUSOptimization\\Splendid";
}
public static SplendidGamut GetDefaultGamut()
{
return AppConfig.IsVivoZenbook() ? SplendidGamut.VivoNative : SplendidGamut.Native;
}
public static Dictionary<SplendidGamut, string> GetGamutModes()
{
@@ -104,6 +109,11 @@ namespace GHelper.Display
}
public static SplendidCommand GetDefaultVisualMode()
{
return AppConfig.IsVivoZenbook() ? SplendidCommand.VivoNormal : SplendidCommand.Default;
}
public static Dictionary<SplendidCommand, string> GetVisualModes()
{
@@ -235,14 +245,14 @@ namespace GHelper.Display
private static bool RunSplendid(SplendidCommand command, int? param1 = null, int? param2 = null)
{
var splendid = GetSplendidPath();
bool isGameVisual = Directory.Exists(GetGameVisualPath());
bool isVivo = AppConfig.IsVivoZenbook();
bool isSplenddid = File.Exists(splendid);
if (isSplenddid)
{
if (command == SplendidCommand.DimmingVisual && !isGameVisual) command = SplendidCommand.DimmingAsus;
if (command == SplendidCommand.DimmingVisual && isVivo) command = SplendidCommand.DimmingVivo;
var result = ProcessHelper.RunCMD(splendid, (int)command + " " + param1 + " " + param2);
if (result.Contains("file not exist") || (result.Length == 0 && isGameVisual)) return false;
if (result.Contains("file not exist") || (result.Length == 0 && !isVivo)) return false;
}
return true;

View File

@@ -716,7 +716,7 @@ namespace GHelper
private void PictureHelp_Click(object? sender, EventArgs e)
{
Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper#custom-hotkey-actions") { UseShellExecute = true });
Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions") { UseShellExecute = true });
}
private void CheckNoOverdrive_CheckedChanged(object? sender, EventArgs e)

View File

@@ -58,6 +58,8 @@ namespace GHelper.Fan
if (AppConfig.ContainsModel("FA507R")) return new int[3] { 63, 57, DEFAULT_FAN_MAX };
if (AppConfig.ContainsModel("FA507X")) return new int[3] { 63, 68, DEFAULT_FAN_MAX };
if (AppConfig.ContainsModel("FX607J")) return new int[3] { 74, 72, DEFAULT_FAN_MAX };
if (AppConfig.ContainsModel("GX650")) return new int[3] { 62, 62, DEFAULT_FAN_MAX };
if (AppConfig.ContainsModel("G732")) return new int[3] { 61, 60, DEFAULT_FAN_MAX };
@@ -68,6 +70,7 @@ namespace GHelper.Fan
if (AppConfig.ContainsModel("GV601")) return new int[3] { 78, 59, 85 };
if (AppConfig.ContainsModel("GA403")) return new int[3] { 68, 68, 80 };
if (AppConfig.ContainsModel("GU605")) return new int[3] { 62, 62, 92 };
return new int[3] { DEFAULT_FAN_MAX, DEFAULT_FAN_MAX, DEFAULT_FAN_MAX };
}

View File

@@ -73,8 +73,6 @@ namespace GHelper
labelTip.Visible = false;
labelTip.BackColor = Color.Transparent;
FormClosing += Fans_FormClosing;
seriesCPU = chartCPU.Series.Add("CPU");
seriesGPU = chartGPU.Series.Add("GPU");
seriesMid = chartMid.Series.Add("Mid");
@@ -120,16 +118,21 @@ namespace GHelper
trackFast.Maximum = AsusACPI.MaxTotal;
trackFast.Minimum = AsusACPI.MinTotal;
trackFast.Scroll += TrackPower_Scroll;
trackCPU.Scroll += TrackPower_Scroll;
trackTotal.Scroll += TrackPower_Scroll;
trackSlow.Scroll += TrackPower_Scroll;
trackTotal.Scroll += TrackTotal_Scroll;
trackSlow.Scroll += TrackSlow_Scroll;
trackFast.Scroll += TrackFast_Scroll;
trackCPU.Scroll += TrackCPU_Scroll;
trackFast.MouseUp += TrackPower_MouseUp;
trackCPU.MouseUp += TrackPower_MouseUp;
trackTotal.MouseUp += TrackPower_MouseUp;
trackSlow.MouseUp += TrackPower_MouseUp;
trackFast.KeyUp += TrackPower_KeyUp;
trackCPU.KeyUp += TrackPower_KeyUp;
trackTotal.KeyUp += TrackPower_KeyUp;
trackSlow.KeyUp += TrackPower_KeyUp;
checkApplyFans.Click += CheckApplyFans_Click;
checkApplyPower.Click += CheckApplyPower_Click;
@@ -159,13 +162,14 @@ namespace GHelper
trackGPUTemp.Scroll += trackGPUPower_Scroll;
trackGPUPower.Scroll += trackGPUPower_Scroll;
trackGPUCore.MouseUp += TrackGPU_MouseUp;
trackGPUMemory.MouseUp += TrackGPU_MouseUp;
trackGPUCore.MouseUp += TrackGPUClocks_MouseUp;
trackGPUMemory.MouseUp += TrackGPUClocks_MouseUp;
trackGPUClockLimit.MouseUp += TrackGPUClocks_MouseUp;
trackGPUBoost.MouseUp += TrackGPU_MouseUp;
trackGPUTemp.MouseUp += TrackGPU_MouseUp;
trackGPUPower.MouseUp += TrackGPU_MouseUp;
trackGPUClockLimit.MouseUp += TrackGPU_MouseUp;
//labelInfo.MaximumSize = new Size(280, 0);
labelFansResult.Visible = false;
@@ -232,6 +236,7 @@ namespace GHelper
}
private void ButtonDownload_Click(object? sender, EventArgs e)
{
RyzenControl.DownloadRing();
@@ -522,13 +527,17 @@ namespace GHelper
private void TrackGPU_MouseUp(object? sender, MouseEventArgs e)
{
modeControl.SetGPUPower();
}
private void TrackGPUClocks_MouseUp(object? sender, MouseEventArgs e)
{
modeControl.SetGPUClocks(true);
}
private void InitGPUPower()
{
gpuPowerBase = Program.acpi.DeviceGet(AsusACPI.GPU_BASE);
Logger.WriteLine($"ReadGPUPowerBase: {gpuPowerBase}");
if (gpuPowerBase >= 0) Logger.WriteLine($"ReadGPUPowerBase: {gpuPowerBase}");
panelGPUPower.Visible = isGPUPower;
if (!isGPUPower) return;
@@ -799,6 +808,14 @@ namespace GHelper
}
private void TrackPower_KeyUp(object? sender, KeyEventArgs e)
{
Task.Run(() =>
{
modeControl.AutoPower(true);
});
}
public void InitPowerPlan()
{
int boost = PowerNative.GetCPUBoost();
@@ -883,18 +900,8 @@ namespace GHelper
});
}
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
{
/*
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
Hide();
}*/
}
public void InitPower(bool changed = false)
public void InitPower()
{
bool modeA = Program.acpi.DeviceGet(AsusACPI.PPT_APUA0) >= 0 || RyzenControl.IsAMD();
@@ -921,57 +928,37 @@ namespace GHelper
if (RyzenControl.IsAMD())
{
labelLeftTotal.Text = "CPU Sustained (SPL)";
labelLeftSlow.Text = "CPU Slow (sPPT)";
labelLeftFast.Text = "CPU Fast (fPPT)";
labelLeftTotal.Text = "SPL (CPU sustained)";
labelLeftSlow.Text = "sPPT (CPU 2 min boost)";
labelLeftFast.Text = "fPPT (CPU 2 sec boost)";
panelFast.Visible = modeC1;
}
else
{
labelLeftTotal.Text = "CPU Slow (PL1)";
labelLeftSlow.Text = "CPU Fast (PL2)";
labelLeftTotal.Text = "PL1 (CPU sustained)";
labelLeftSlow.Text = "PL2 (CPU 2 min boost)";
panelFast.Visible = false;
}
}
int limit_total;
int limit_slow;
int limit_cpu;
int limit_fast;
checkApplyPower.Checked = AppConfig.IsMode("auto_apply_power");
bool apply = AppConfig.IsMode("auto_apply_power");
int limit_total = AppConfig.GetMode("limit_total", AsusACPI.DefaultTotal);
int limit_slow = AppConfig.GetMode("limit_slow", limit_total);
int limit_fast = AppConfig.GetMode("limit_fast", limit_total);
int limit_cpu = AppConfig.GetMode("limit_cpu", AsusACPI.DefaultCPU);
if (changed)
{
limit_total = trackTotal.Value;
limit_slow = trackSlow.Value;
limit_cpu = trackCPU.Value;
limit_fast = trackFast.Value;
}
else
{
limit_total = AppConfig.GetMode("limit_total");
limit_slow = AppConfig.GetMode("limit_slow");
limit_cpu = AppConfig.GetMode("limit_cpu");
limit_fast = AppConfig.GetMode("limit_fast");
}
if (limit_total < 0) limit_total = AsusACPI.DefaultTotal;
if (limit_total > AsusACPI.MaxTotal) limit_total = AsusACPI.MaxTotal;
if (limit_total < AsusACPI.MinTotal) limit_total = AsusACPI.MinTotal;
if (limit_cpu < 0) limit_cpu = AsusACPI.DefaultCPU;
if (limit_cpu > AsusACPI.MaxCPU) limit_cpu = AsusACPI.MaxCPU;
if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU;
if (limit_cpu > limit_total) limit_cpu = limit_total;
if (limit_slow < 0) limit_slow = limit_total;
if (limit_slow > AsusACPI.MaxTotal) limit_slow = AsusACPI.MaxTotal;
if (limit_slow < AsusACPI.MinTotal) limit_slow = AsusACPI.MinTotal;
if (limit_fast < 0) limit_fast = AsusACPI.DefaultTotal;
if (limit_fast > AsusACPI.MaxTotal) limit_fast = AsusACPI.MaxTotal;
if (limit_fast < AsusACPI.MinTotal) limit_fast = AsusACPI.MinTotal;
@@ -980,27 +967,50 @@ namespace GHelper
trackCPU.Value = limit_cpu;
trackFast.Value = limit_fast;
checkApplyPower.Checked = apply;
SavePower();
}
private void SavePower()
{
labelTotal.Text = trackTotal.Value.ToString() + "W";
labelSlow.Text = trackSlow.Value.ToString() + "W";
labelCPU.Text = trackCPU.Value.ToString() + "W";
labelFast.Text = trackFast.Value.ToString() + "W";
AppConfig.SetMode("limit_total", limit_total);
AppConfig.SetMode("limit_slow", limit_slow);
AppConfig.SetMode("limit_cpu", limit_cpu);
AppConfig.SetMode("limit_fast", limit_fast);
AppConfig.SetMode("limit_total", trackTotal.Value);
AppConfig.SetMode("limit_slow", trackSlow.Value);
AppConfig.SetMode("limit_cpu", trackCPU.Value);
AppConfig.SetMode("limit_fast", trackFast.Value);
}
private void TrackPower_Scroll(object? sender, EventArgs e)
private void TrackTotal_Scroll(object? sender, EventArgs e)
{
InitPower(true);
if (trackTotal.Value > trackSlow.Value) trackSlow.Value = trackTotal.Value;
if (trackTotal.Value > trackFast.Value) trackFast.Value = trackTotal.Value;
if (trackTotal.Value < trackCPU.Value) trackCPU.Value = trackTotal.Value;
SavePower();
}
private void TrackSlow_Scroll(object? sender, EventArgs e)
{
if (trackSlow.Value < trackTotal.Value) trackTotal.Value = trackSlow.Value;
if (trackSlow.Value > trackFast.Value) trackFast.Value = trackSlow.Value;
SavePower();
}
private void TrackFast_Scroll(object? sender, EventArgs e)
{
if (trackFast.Value < trackSlow.Value) trackSlow.Value = trackFast.Value;
if (trackFast.Value < trackTotal.Value) trackTotal.Value = trackFast.Value;
SavePower();
}
private void TrackCPU_Scroll(object? sender, EventArgs e)
{
if (trackCPU.Value > trackTotal.Value) trackTotal.Value = trackCPU.Value;
SavePower();
}
public void InitFans()
{
@@ -1161,7 +1171,7 @@ namespace GHelper
InitGPUPower();
VisualiseGPUSettings();
modeControl.SetGPUClocks(true);
modeControl.SetGPUClocks(true, true);
modeControl.SetGPUPower();
}

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.165</AssemblyVersion>
<AssemblyVersion>0.168</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -119,6 +119,18 @@ public class AmdGpuControl : IGpuControl
}
public int? GetGpuPower()
{
if (_adlContextHandle == nint.Zero || _iGPU == null) return null;
if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null;
ADLSingleSensorData gpuUsage = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_ASIC_POWER];
if (gpuUsage.Supported == 0) return null;
return gpuUsage.Value;
}
public bool SetVariBright(int enabled)
{

View File

@@ -0,0 +1,376 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
public static class RestrictedProcessHelper
{
/// Runs a process as a non-elevated version of the current user.
public static Process? RunAsRestrictedUser(string fileName, string? args = null)
{
if (string.IsNullOrWhiteSpace(fileName))
throw new ArgumentException("Value cannot be null or whitespace.", nameof(fileName));
if (!GetRestrictedSessionUserToken(out var hRestrictedToken))
{
return null;
}
try
{
var si = new STARTUPINFO();
si.cb = Marshal.SizeOf(si);
si.dwFlags = 0x1;
si.wShowWindow = 0x00; // Set the window to be hidden
var pi = new PROCESS_INFORMATION();
var cmd = new StringBuilder();
cmd.Append('"').Append(fileName).Append('"');
if (!string.IsNullOrWhiteSpace(args))
{
cmd.Append(' ').Append(args);
}
Logger.WriteLine($"Launching {cmd}");
if (!CreateProcessAsUser(
hRestrictedToken,
null,
cmd,
IntPtr.Zero,
IntPtr.Zero,
true, // inherit handle
0,
IntPtr.Zero,
Path.GetDirectoryName(fileName),
ref si,
out pi))
{
return null;
}
return Process.GetProcessById(pi.dwProcessId);
}
finally
{
CloseHandle(hRestrictedToken);
}
}
private static bool GetRestrictedSessionUserToken(out IntPtr token)
{
token = IntPtr.Zero;
if (!SaferCreateLevel(SaferScope.User, SaferLevel.NormalUser, SaferOpenFlags.Open, out var hLevel, IntPtr.Zero))
{
return false;
}
IntPtr hRestrictedToken = IntPtr.Zero;
TOKEN_MANDATORY_LABEL tml = default;
tml.Label.Sid = IntPtr.Zero;
IntPtr tmlPtr = IntPtr.Zero;
try
{
if (!SaferComputeTokenFromLevel(hLevel, IntPtr.Zero, out hRestrictedToken, 0, IntPtr.Zero))
{
return false;
}
// Set the token to medium integrity.
tml.Label.Attributes = SE_GROUP_INTEGRITY;
tml.Label.Sid = IntPtr.Zero;
if (!ConvertStringSidToSid("S-1-16-8192", out tml.Label.Sid))
{
return false;
}
tmlPtr = Marshal.AllocHGlobal(Marshal.SizeOf(tml));
Marshal.StructureToPtr(tml, tmlPtr, false);
if (!SetTokenInformation(hRestrictedToken,
TOKEN_INFORMATION_CLASS.TokenIntegrityLevel,
tmlPtr, (uint)Marshal.SizeOf(tml)))
{
return false;
}
token = hRestrictedToken;
hRestrictedToken = IntPtr.Zero; // make sure finally() doesn't close the handle
}
finally
{
SaferCloseLevel(hLevel);
SafeCloseHandle(hRestrictedToken);
if (tml.Label.Sid != IntPtr.Zero)
{
LocalFree(tml.Label.Sid);
}
if (tmlPtr != IntPtr.Zero)
{
Marshal.FreeHGlobal(tmlPtr);
}
}
return true;
}
[StructLayout(LayoutKind.Sequential)]
private struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
private struct STARTUPINFO
{
public Int32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public Int32 dwX;
public Int32 dwY;
public Int32 dwXSize;
public Int32 dwYSize;
public Int32 dwXCountChars;
public Int32 dwYCountChars;
public Int32 dwFillAttribute;
public Int32 dwFlags;
public Int16 wShowWindow;
public Int16 cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
[StructLayout(LayoutKind.Sequential)]
private struct SID_AND_ATTRIBUTES
{
public IntPtr Sid;
public uint Attributes;
}
[StructLayout(LayoutKind.Sequential)]
private struct TOKEN_MANDATORY_LABEL
{
public SID_AND_ATTRIBUTES Label;
}
public enum SaferLevel : uint
{
Disallowed = 0,
Untrusted = 0x1000,
Constrained = 0x10000,
NormalUser = 0x20000,
FullyTrusted = 0x40000
}
public enum SaferScope : uint
{
Machine = 1,
User = 2
}
[Flags]
public enum SaferOpenFlags : uint
{
Open = 1
}
[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
private static extern bool SaferCreateLevel(SaferScope scope, SaferLevel level, SaferOpenFlags openFlags, out IntPtr pLevelHandle, IntPtr lpReserved);
[DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
private static extern bool SaferComputeTokenFromLevel(IntPtr LevelHandle, IntPtr InAccessToken, out IntPtr OutAccessToken, int dwFlags, IntPtr lpReserved);
[DllImport("advapi32", SetLastError = true)]
private static extern bool SaferCloseLevel(IntPtr hLevelHandle);
[DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern bool ConvertStringSidToSid(string StringSid, out IntPtr ptrSid);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool CloseHandle(IntPtr hObject);
private static bool SafeCloseHandle(IntPtr hObject)
{
return (hObject == IntPtr.Zero) ? true : CloseHandle(hObject);
}
[DllImport("kernel32.dll", SetLastError = true)]
static extern IntPtr LocalFree(IntPtr hMem);
enum TOKEN_INFORMATION_CLASS
{
/// <summary>
/// The buffer receives a TOKEN_USER structure that contains the user account of the token.
/// </summary>
TokenUser = 1,
/// <summary>
/// The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token.
/// </summary>
TokenGroups,
/// <summary>
/// The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token.
/// </summary>
TokenPrivileges,
/// <summary>
/// The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects.
/// </summary>
TokenOwner,
/// <summary>
/// The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects.
/// </summary>
TokenPrimaryGroup,
/// <summary>
/// The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects.
/// </summary>
TokenDefaultDacl,
/// <summary>
/// The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information.
/// </summary>
TokenSource,
/// <summary>
/// The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token.
/// </summary>
TokenType,
/// <summary>
/// The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails.
/// </summary>
TokenImpersonationLevel,
/// <summary>
/// The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.
/// </summary>
TokenStatistics,
/// <summary>
/// The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token.
/// </summary>
TokenRestrictedSids,
/// <summary>
/// The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token.
/// </summary>
TokenSessionId,
/// <summary>
/// The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token.
/// </summary>
TokenGroupsAndPrivileges,
/// <summary>
/// Reserved.
/// </summary>
TokenSessionReference,
/// <summary>
/// The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag.
/// </summary>
TokenSandBoxInert,
/// <summary>
/// Reserved.
/// </summary>
TokenAuditPolicy,
/// <summary>
/// The buffer receives a TOKEN_ORIGIN value.
/// </summary>
TokenOrigin,
/// <summary>
/// The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token.
/// </summary>
TokenElevationType,
/// <summary>
/// The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token.
/// </summary>
TokenLinkedToken,
/// <summary>
/// The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated.
/// </summary>
TokenElevation,
/// <summary>
/// The buffer receives a DWORD value that is nonzero if the token has ever been filtered.
/// </summary>
TokenHasRestrictions,
/// <summary>
/// The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token.
/// </summary>
TokenAccessInformation,
/// <summary>
/// The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token.
/// </summary>
TokenVirtualizationAllowed,
/// <summary>
/// The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token.
/// </summary>
TokenVirtualizationEnabled,
/// <summary>
/// The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level.
/// </summary>
TokenIntegrityLevel,
/// <summary>
/// The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set.
/// </summary>
TokenUIAccess,
/// <summary>
/// The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy.
/// </summary>
TokenMandatoryPolicy,
/// <summary>
/// The buffer receives the token's logon security identifier (SID).
/// </summary>
TokenLogonSid,
/// <summary>
/// The maximum value for this enumeration
/// </summary>
MaxTokenInfoClass
}
[DllImport("advapi32.dll", SetLastError = true)]
static extern Boolean SetTokenInformation(
IntPtr TokenHandle,
TOKEN_INFORMATION_CLASS TokenInformationClass,
IntPtr TokenInformation,
UInt32 TokenInformationLength);
const uint SE_GROUP_INTEGRITY = 0x00000020;
[DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
static extern bool CreateProcessAsUser(
IntPtr hToken,
string? lpApplicationName,
StringBuilder? lpCommandLine,
IntPtr lpProcessAttributes,
IntPtr lpThreadAttributes,
bool bInheritHandles,
uint dwCreationFlags,
IntPtr lpEnvironment,
string? lpCurrentDirectory,
ref STARTUPINFO lpStartupInfo,
out PROCESS_INFORMATION lpProcessInformation);
}

View File

@@ -85,7 +85,8 @@ namespace GHelper.Input
InitBacklightTimer();
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
if (AppConfig.IsVivoZenbook())
Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
}
@@ -118,6 +119,8 @@ namespace GHelper.Input
if (!AppConfig.Is("skip_hotkeys"))
{
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F13);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F14);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F15);
@@ -128,6 +131,7 @@ namespace GHelper.Input
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F20);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown);
@@ -385,6 +389,9 @@ namespace GHelper.Input
case Keys.F4:
Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleModeHotkey);
break;
case Keys.F13:
ToggleScreenRate();
break;
case Keys.F14:
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco);
break;
@@ -579,17 +586,17 @@ namespace GHelper.Input
public static void ToggleFnLock()
{
int fnLock = AppConfig.Is("fn_lock") ? 0 : 1;
AppConfig.Set("fn_lock", fnLock);
bool fnLock = !AppConfig.Is("fn_lock");
AppConfig.Set("fn_lock", fnLock ? 1 : 0);
if (AppConfig.IsVivoZenbook())
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 1 : 0, "FnLock");
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock");
else
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
Program.settingsForm.BeginInvoke(Program.settingsForm.VisualiseFnLock);
Program.toast.RunToast(fnLock == 1 ? Properties.Strings.FnLockOn : Properties.Strings.FnLockOff, ToastIcon.FnLock);
Program.toast.RunToast(fnLock ? Properties.Strings.FnLockOn : Properties.Strings.FnLockOff, ToastIcon.FnLock);
}
public static void TabletMode()
@@ -691,6 +698,18 @@ namespace GHelper.Input
case 199: // ON Z13 - FN+F11 - cycles backlight
SetBacklight(4);
return;
case 46: // Fn + F4 Vivobook Brightness down
if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED())
{
SetBrightnessDimming(-10);
}
break;
case 47: // Fn + F5 Vivobook Brightness up
if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED())
{
SetBrightnessDimming(10);
}
break;
}
}
@@ -824,6 +843,12 @@ namespace GHelper.Input
Program.toast.RunToast($"Screen Pad " + (toggle == 1 ? "On" : "Off"), toggle > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown);
}
public static void ToggleScreenRate()
{
AppConfig.Set("screen_auto", 0);
screenControl.ToggleScreenRate();
}
public static void ToggleCamera()
{
if (!ProcessHelper.IsUserAdministrator()) return;
@@ -916,33 +941,17 @@ namespace GHelper.Input
static void LaunchProcess(string command = "")
{
if (string.IsNullOrEmpty(command)) return;
try
{
//string executable = command.Split(' ')[0];
//string arguments = command.Substring(executable.Length).Trim();
ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/C " + command);
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
startInfo.WorkingDirectory = Environment.CurrentDirectory;
//startInfo.Arguments = arguments;
Process proc = Process.Start(startInfo);
RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command);
}
catch
catch (Exception ex)
{
Logger.WriteLine("Failed to run " + command);
Logger.WriteLine($"Failed to run: {command} {ex.Message}");
}
}
static void WatcherEventArrived(object sender, EventArrivedEventArgs e)
{
if (e.NewEvent is null) return;

View File

@@ -21,12 +21,35 @@ public sealed class KeyboardHook : IDisposable
private const byte VK_LWIN = 0x5B;
private const byte VK_LCONTROL = 0xA2;
[DllImport("user32.dll")]
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);
//Mouse actions
private const int MOUSEEVENTF_LEFTDOWN = 0x02;
private const int MOUSEEVENTF_LEFTUP = 0x04;
private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
private const int MOUSEEVENTF_RIGHTUP = 0x10;
private const int MOUSEEVENTF_MIDDOWN = 0x20;
private const int MOUSEEVENTF_MIDTUP = 0x40;
public static void KeyPress(Keys key)
{
switch (key)
{
case Keys.LButton:
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0);
return;
case Keys.RButton:
mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0);
return;
case Keys.MButton:
mouse_event(MOUSEEVENTF_MIDDOWN | MOUSEEVENTF_MIDTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0);
return;
}
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero);
Thread.Sleep(1);
keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero);
}

70
app/Matrix.Designer.cs generated
View File

@@ -35,6 +35,10 @@
panelMain = new Panel();
panelButtons = new Panel();
buttonReset = new UI.RButton();
panelGamma = new Panel();
labelGamma = new Label();
labelGammaTitle = new Label();
trackGamma = new TrackBar();
panelContrast = new Panel();
labelContrast = new Label();
labelContrastTitle = new Label();
@@ -53,6 +57,8 @@
panelPicture.SuspendLayout();
panelMain.SuspendLayout();
panelButtons.SuspendLayout();
panelGamma.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackGamma).BeginInit();
panelContrast.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackContrast).BeginInit();
panelRotation.SuspendLayout();
@@ -117,6 +123,7 @@
//
panelMain.AutoSize = true;
panelMain.Controls.Add(panelButtons);
panelMain.Controls.Add(panelGamma);
panelMain.Controls.Add(panelContrast);
panelMain.Controls.Add(panelRotation);
panelMain.Controls.Add(panelScaling);
@@ -125,7 +132,7 @@
panelMain.Dock = DockStyle.Top;
panelMain.Location = new Point(20, 20);
panelMain.Name = "panelMain";
panelMain.Size = new Size(834, 959);
panelMain.Size = new Size(834, 1104);
panelMain.TabIndex = 5;
//
// panelButtons
@@ -133,7 +140,7 @@
panelButtons.Controls.Add(buttonReset);
panelButtons.Controls.Add(buttonPicture);
panelButtons.Dock = DockStyle.Top;
panelButtons.Location = new Point(0, 865);
panelButtons.Location = new Point(0, 1010);
panelButtons.Name = "panelButtons";
panelButtons.Size = new Size(834, 94);
panelButtons.TabIndex = 6;
@@ -157,6 +164,52 @@
buttonReset.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonReset.UseVisualStyleBackColor = false;
//
// panelGamma
//
panelGamma.AutoSize = true;
panelGamma.Controls.Add(labelGamma);
panelGamma.Controls.Add(labelGammaTitle);
panelGamma.Controls.Add(trackGamma);
panelGamma.Dock = DockStyle.Top;
panelGamma.Location = new Point(0, 865);
panelGamma.Name = "panelGamma";
panelGamma.Size = new Size(834, 145);
panelGamma.TabIndex = 7;
//
// labelGamma
//
labelGamma.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelGamma.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
labelGamma.Location = new Point(673, 17);
labelGamma.Name = "labelGamma";
labelGamma.Size = new Size(125, 32);
labelGamma.TabIndex = 4;
labelGamma.Text = "Brightness";
labelGamma.TextAlign = ContentAlignment.TopRight;
//
// labelGammaTitle
//
labelGammaTitle.AutoSize = true;
labelGammaTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelGammaTitle.Location = new Point(16, 17);
labelGammaTitle.Name = "labelGammaTitle";
labelGammaTitle.Size = new Size(134, 32);
labelGammaTitle.TabIndex = 3;
labelGammaTitle.Text = "Brightness";
//
// trackGamma
//
trackGamma.LargeChange = 50;
trackGamma.Location = new Point(16, 52);
trackGamma.Maximum = 100;
trackGamma.Minimum = -100;
trackGamma.Name = "trackGamma";
trackGamma.Size = new Size(782, 90);
trackGamma.SmallChange = 10;
trackGamma.TabIndex = 2;
trackGamma.TickFrequency = 20;
trackGamma.TickStyle = TickStyle.TopLeft;
//
// panelContrast
//
panelContrast.AutoSize = true;
@@ -172,13 +225,13 @@
// labelContrast
//
labelContrast.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelContrast.AutoSize = true;
labelContrast.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
labelContrast.Location = new Point(705, 17);
labelContrast.Location = new Point(701, 17);
labelContrast.Name = "labelContrast";
labelContrast.Size = new Size(103, 32);
labelContrast.TabIndex = 4;
labelContrast.Text = "Contrast";
labelContrast.TextAlign = ContentAlignment.TopRight;
//
// labelContrastTitle
//
@@ -310,7 +363,7 @@
AutoScaleDimensions = new SizeF(192F, 192F);
AutoScaleMode = AutoScaleMode.Dpi;
AutoSize = true;
ClientSize = new Size(874, 1006);
ClientSize = new Size(874, 1142);
Controls.Add(panelMain);
MaximizeBox = false;
MinimizeBox = false;
@@ -326,6 +379,9 @@
panelMain.ResumeLayout(false);
panelMain.PerformLayout();
panelButtons.ResumeLayout(false);
panelGamma.ResumeLayout(false);
panelGamma.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackGamma).EndInit();
panelContrast.ResumeLayout(false);
panelContrast.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackContrast).EndInit();
@@ -361,5 +417,9 @@
private Label labelContrast;
private Label labelContrastTitle;
private TrackBar trackContrast;
private Panel panelGamma;
private Label labelGamma;
private Label labelGammaTitle;
private TrackBar trackGamma;
}
}

View File

@@ -47,10 +47,14 @@ namespace GHelper
trackZoom.ValueChanged += TrackZoom_Changed;
trackZoom.Value = Math.Min(trackZoom.Maximum, AppConfig.Get("matrix_zoom", 100));
trackContrast.MouseUp += TrackContrast_MouseUp; ;
trackContrast.ValueChanged += TrackContrast_ValueChanged; ;
trackContrast.MouseUp += TrackMatrix_MouseUp;
trackContrast.ValueChanged += TrackMatrix_ValueChanged;
trackContrast.Value = Math.Min(trackContrast.Maximum, AppConfig.Get("matrix_contrast", 100));
trackGamma.MouseUp += TrackMatrix_MouseUp;
trackGamma.ValueChanged += TrackMatrix_ValueChanged;
trackGamma.Value = Math.Min(trackGamma.Maximum, AppConfig.Get("matrix_gamma", 0));
VisualiseMatrix();
comboScaling.DropDownStyle = ComboBoxStyle.DropDownList;
@@ -67,17 +71,19 @@ namespace GHelper
}
private void TrackContrast_ValueChanged(object? sender, EventArgs e)
private void TrackMatrix_ValueChanged(object? sender, EventArgs e)
{
VisualiseMatrix();
}
private void TrackContrast_MouseUp(object? sender, MouseEventArgs e)
private void TrackMatrix_MouseUp(object? sender, MouseEventArgs e)
{
AppConfig.Set("matrix_contrast", trackContrast.Value);
AppConfig.Set("matrix_gamma", trackGamma.Value);
SetMatrixPicture();
}
private void ComboRotation_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.Set("matrix_rotation", comboRotation.SelectedIndex);
@@ -104,10 +110,12 @@ namespace GHelper
{
labelZoom.Text = trackZoom.Value + "%";
labelContrast.Text = trackContrast.Value + "%";
labelGamma.Text = trackGamma.Value + "%";
}
private void ButtonReset_Click(object? sender, EventArgs e)
{
AppConfig.Set("matrix_gamma", 0);
AppConfig.Set("matrix_contrast", 100);
AppConfig.Set("matrix_zoom", 100);
AppConfig.Set("matrix_x", 0);
@@ -115,6 +123,7 @@ namespace GHelper
trackZoom.Value = 100;
trackContrast.Value = 100;
trackGamma.Value = 0;
SetMatrixPicture();

View File

@@ -18,14 +18,16 @@ namespace GHelper.Mode
private bool _ryzenPower = false;
static System.Timers.Timer reapplyTimer = default!;
static System.Timers.Timer modeToggleTimer = default!;
public ModeControl()
{
reapplyTimer = new System.Timers.Timer(AppConfig.GetMode("reapply_time", 30) * 1000);
reapplyTimer.Elapsed += ReapplyTimer_Elapsed;
reapplyTimer.Enabled = false;
reapplyTimer.Elapsed += ReapplyTimer_Elapsed;
}
private void ReapplyTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
SetCPUTemp(AppConfig.GetMode("cpu_temp"));
@@ -56,6 +58,11 @@ namespace GHelper.Mode
PowerNative.SetPowerMode(Modes.GetCurrentBase());
}
public void Toast()
{
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
}
public void SetPerformanceMode(int mode = -1, bool notify = false)
{
@@ -101,10 +108,7 @@ namespace GHelper.Mode
if (AppConfig.Is("xgm_fan") && Program.acpi.IsXGConnected()) XGM.Reset();
if (notify)
Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery);
if (notify) Toast();
// Power plan from config or defaulting to balanced
if (AppConfig.GetModeString("scheme") is not null)
@@ -135,9 +139,34 @@ namespace GHelper.Mode
}
private void ModeToggleTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
modeToggleTimer.Stop();
Logger.WriteLine($"Timed mode: {Modes.GetCurrent()}");
SetPerformanceMode();
}
public void CyclePerformanceMode(bool back = false)
{
SetPerformanceMode(Modes.GetNext(back), true);
int delay = AppConfig.Get("mode_delay");
if (delay > 0)
{
if (modeToggleTimer is null)
{
modeToggleTimer = new System.Timers.Timer(delay);
modeToggleTimer.Elapsed += ModeToggleTimer_Elapsed;
}
modeToggleTimer.Stop();
modeToggleTimer.Start();
Modes.SetCurrent(Modes.GetNext(back));
Toast();
} else
{
SetPerformanceMode(Modes.GetNext(back), true);
}
}
public void AutoFans(bool force = false)
@@ -256,6 +285,7 @@ namespace GHelper.Mode
{
bool allAMD = Program.acpi.IsAllAmdPPT();
bool isAMD = RyzenControl.IsAMD();
int limit_total = AppConfig.GetMode("limit_total");
int limit_cpu = AppConfig.GetMode("limit_cpu");
@@ -283,7 +313,7 @@ namespace GHelper.Mode
Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, limit_slow, "PowerLimit A0");
customPower = limit_total;
}
else if (RyzenControl.IsAMD())
else if (isAMD)
{
if (ProcessHelper.IsUserAdministrator())
@@ -302,10 +332,9 @@ namespace GHelper.Mode
Program.acpi.DeviceSet(AsusACPI.PPT_CPUB0, limit_cpu, "PowerLimit B0");
customPower = limit_cpu;
}
else if (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models
else if (isAMD && Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models
{
Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, limit_fast, "PowerLimit C1");
customPower = limit_fast;
}
@@ -313,7 +342,7 @@ namespace GHelper.Mode
}
public void SetGPUClocks(bool launchAsAdmin = true)
public void SetGPUClocks(bool launchAsAdmin = true, bool reset = false)
{
Task.Run(() =>
{
@@ -322,6 +351,8 @@ namespace GHelper.Mode
int memory = AppConfig.GetMode("gpu_memory");
int clock_limit = AppConfig.GetMode("gpu_clock_limit");
if (reset) core = memory = clock_limit = 0;
if (core == -1 && memory == -1 && clock_limit == -1) return;
//if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false;

View File

@@ -139,12 +139,6 @@
<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>
</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="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>
</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>
@@ -226,9 +220,6 @@
<data name="icons8-hibernate-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-hibernate-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-keyboard-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-keyboard-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -349,10 +340,19 @@
<data name="dark_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dark-standard.ico;System.Drawing.Icon, 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>
</data>
<data name="light_eco" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\light-eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="light_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\light-standard.ico;System.Drawing.Icon, 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="ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -0,0 +1,797 @@
<?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 xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<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="Acceleration" xml:space="preserve">
<value>Acceleration</value>
</data>
<data name="ACPIError" xml:space="preserve">
<value>Kan ikke oprette forbindelse til ASUS ACPI. Applikationen kan ikke fungere uden. Prøv at installere Asus System Control Interface</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Genstart din enhed for at anvende ændringerne</value>
</data>
<data name="AlertAPUMemoryRestartTitle" xml:space="preserve">
<value>Genstart nu?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Ser ud til at GPU er i kraftig brug, vil du deaktivere den?</value>
</data>
<data name="AlertDGPUTitle" xml:space="preserve">
<value>Øko-tilstand</value>
</data>
<data name="AlertUltimateOff" xml:space="preserve">
<value>Slukning af Ultimativ tilstand kræver genstart</value>
</data>
<data name="AlertUltimateOn" xml:space="preserve">
<value>Ultimativ tilstand kræver genstart</value>
</data>
<data name="AlertUltimateTitle" xml:space="preserve">
<value>Genstart nu?</value>
</data>
<data name="AllyController" xml:space="preserve">
<value>Ally Controller</value>
</data>
<data name="AnimationSpeed" xml:space="preserve">
<value>Animationshastighed</value>
</data>
<data name="AnimeMatrix" xml:space="preserve">
<value>Anime Matrix</value>
</data>
<data name="AppAlreadyRunning" xml:space="preserve">
<value>Appen kører allerede</value>
</data>
<data name="AppAlreadyRunningText" xml:space="preserve">
<value>G-Helper kører allerede. Tjek systembakken for et ikon.</value>
</data>
<data name="Apply" xml:space="preserve">
<value>Anvend</value>
</data>
<data name="ApplyFanCurve" xml:space="preserve">
<value>Anvend blæserkurve</value>
</data>
<data name="ApplyPowerLimits" xml:space="preserve">
<value>Anvend strømgrænser</value>
</data>
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Automatisk justering af Windows strømtilstande</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>Hukommelse tildelt til GPU</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Kørende Asus-tjenester</value>
</data>
<data name="AuraBatteryState" xml:space="preserve">
<value>Batteritilstand</value>
</data>
<data name="AuraBreathe" xml:space="preserve">
<value>Vejrtrækning</value>
</data>
<data name="AuraClockwise" xml:space="preserve">
<value>Med uret</value>
</data>
<data name="AuraColorCycle" xml:space="preserve">
<value>Farvecyklus</value>
</data>
<data name="AuraComet" xml:space="preserve">
<value>Komet</value>
</data>
<data name="AuraCounterClockwise" xml:space="preserve">
<value>Mod uret</value>
</data>
<data name="AuraFast" xml:space="preserve">
<value>Hurtig</value>
</data>
<data name="AuraLightingMode" xml:space="preserve">
<value>Lystilstand</value>
</data>
<data name="AuraNormal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="AuraRainbow" xml:space="preserve">
<value>Regnbue</value>
</data>
<data name="AuraRandomColor" xml:space="preserve">
<value>Tilfældig</value>
</data>
<data name="AuraReact" xml:space="preserve">
<value>Reager</value>
</data>
<data name="AuraSlow" xml:space="preserve">
<value>Langsom</value>
</data>
<data name="AuraStatic" xml:space="preserve">
<value>Statisk</value>
</data>
<data name="AuraStrobe" xml:space="preserve">
<value>Strobelys</value>
</data>
<data name="AuraZoneAll" xml:space="preserve">
<value>Alle</value>
</data>
<data name="AuraZoneDock" xml:space="preserve">
<value>Dock</value>
</data>
<data name="AuraZoneLogo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="AuraZoneScroll" xml:space="preserve">
<value>Scroll-hjul</value>
</data>
<data name="AuraZoneUnderglow" xml:space="preserve">
<value>Underglød</value>
</data>
<data name="AutoApply" xml:space="preserve">
<value>Anvend automatisk</value>
</data>
<data name="AutoMode" xml:space="preserve">
<value>Automatisk</value>
</data>
<data name="AutoRefreshTooltip" xml:space="preserve">
<value>Sætter 60 Hz for at spare på batteri, og tilbage når tilsluttet</value>
</data>
<data name="Awake" xml:space="preserve">
<value>Vågen</value>
</data>
<data name="BacklightLow" xml:space="preserve">
<value>Lav</value>
</data>
<data name="BacklightMax" xml:space="preserve">
<value>Maksimal</value>
</data>
<data name="BacklightMid" xml:space="preserve">
<value>Mellem</value>
</data>
<data name="BacklightOff" xml:space="preserve">
<value>Slukket</value>
</data>
<data name="BacklightTimeout" xml:space="preserve">
<value>Timeout tilsluttet / på batteri (0 - TIL)</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Baggrundslys timeout på batteri</value>
</data>
<data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Timeout for baggrundslys når tilsluttet</value>
</data>
<data name="Balanced" xml:space="preserve">
<value>Balanceret</value>
</data>
<data name="BatteryCharge" xml:space="preserve">
<value>Opladning</value>
</data>
<data name="BatteryChargeLimit" xml:space="preserve">
<value>Batteriopladningsgrænse</value>
</data>
<data name="BatteryHealth" xml:space="preserve">
<value>Batteritilstand</value>
</data>
<data name="BatteryLimitFull" xml:space="preserve">
<value>Engangsopladning til 100%</value>
</data>
<data name="Binding" xml:space="preserve">
<value>Binding</value>
</data>
<data name="BindingPrimary" xml:space="preserve">
<value>Primær</value>
</data>
<data name="BindingSecondary" xml:space="preserve">
<value>Sekundær</value>
</data>
<data name="BiosAndDriverUpdates" xml:space="preserve">
<value>BIOS og driveropdateringer</value>
</data>
<data name="Boot" xml:space="preserve">
<value>Boot</value>
</data>
<data name="BootSound" xml:space="preserve">
<value>Boot-lyd</value>
</data>
<data name="Brightness" xml:space="preserve">
<value>Lysstyrke</value>
</data>
<data name="BrightnessDown" xml:space="preserve">
<value>Lysstyrke ned</value>
</data>
<data name="BrightnessUp" xml:space="preserve">
<value>Lysstyrke op</value>
</data>
<data name="BWTrayIcon" xml:space="preserve">
<value>Sort og hvid bakkeikon</value>
</data>
<data name="Calibrate" xml:space="preserve">
<value>Kalibrer</value>
</data>
<data name="Charging" xml:space="preserve">
<value>Oplader</value>
</data>
<data name="Color" xml:space="preserve">
<value>Farve</value>
</data>
<data name="Contrast" xml:space="preserve">
<value>Kontrast</value>
</data>
<data name="Controller" xml:space="preserve">
<value>Controller</value>
</data>
<data name="CPUBoost" xml:space="preserve">
<value>CPU Boost</value>
</data>
<data name="Custom" xml:space="preserve">
<value>Brugerdefineret</value>
</data>
<data name="Deceleration" xml:space="preserve">
<value>Deceleration</value>
</data>
<data name="Default" xml:space="preserve">
<value>Standard</value>
</data>
<data name="DisableController" xml:space="preserve">
<value>Deaktiver Controller</value>
</data>
<data name="DisableOnLidClose" xml:space="preserve">
<value>Deaktiver ved lukning af låg</value>
</data>
<data name="DisableOverdrive" xml:space="preserve">
<value>Deaktiver overdrive på skærmen</value>
</data>
<data name="Discharging" xml:space="preserve">
<value>Aflader</value>
</data>
<data name="DownloadColorProfiles" xml:space="preserve">
<value>Hent farveprofiler</value>
</data>
<data name="DownloadUpdate" xml:space="preserve">
<value>Hent</value>
</data>
<data name="DriverAndSoftware" xml:space="preserve">
<value>Drivere og software</value>
</data>
<data name="EcoGPUTooltip" xml:space="preserve">
<value>Deaktiverer dGPU for at spare på batteriet</value>
</data>
<data name="EcoMode" xml:space="preserve">
<value>Øko</value>
</data>
<data name="EnableGPUOnShutdown" xml:space="preserve">
<value>Aktiver GPU ved nedlukning (forhindrer problemer med Øko-tilstand)</value>
</data>
<data name="EnableOptimusText" xml:space="preserve">
<value>Deaktivering af dGPU ved at gå i Øko-tilstand, mens visningstilstand i NVIDIA Kontrolpanel ikke er indstillet til Optimus kan forårsage problemer med lysstyrkekontrol indtil efter næste genstart.
Vil du stadig fortsætte?</value>
</data>
<data name="EnableOptimusTitle" xml:space="preserve">
<value>NVIDIA Visningstilstand er ikke indstillet til Optimus</value>
</data>
<data name="EnergySettings" xml:space="preserve">
<value>Energiindstillinger</value>
</data>
<data name="Export" xml:space="preserve">
<value>Eksporter profil</value>
</data>
<data name="Extra" xml:space="preserve">
<value>Ekstra</value>
</data>
<data name="ExtraSettings" xml:space="preserve">
<value>Ekstra indstillinger</value>
</data>
<data name="FactoryDefaults" xml:space="preserve">
<value>Standard fabriksindstillinger</value>
</data>
<data name="FanCurves" xml:space="preserve">
<value>Blæserkurver</value>
</data>
<data name="FanProfileCPU" xml:space="preserve">
<value>CPU blæserkurveprofil</value>
</data>
<data name="FanProfileGPU" xml:space="preserve">
<value>GPU blæserkurveprofil</value>
</data>
<data name="FanProfileMid" xml:space="preserve">
<value>Midt blæserprofil</value>
</data>
<data name="FanProfiles" xml:space="preserve">
<value>Blæserprofiler</value>
</data>
<data name="FansAndPower" xml:space="preserve">
<value>Blæsere og kraft</value>
</data>
<data name="FanSpeed" xml:space="preserve">
<value>Blæser</value>
</data>
<data name="FansPower" xml:space="preserve">
<value>Blæser + Kraft</value>
</data>
<data name="FlickerFreeDimming" xml:space="preserve">
<value>Flimmerfri dæmpning</value>
</data>
<data name="FnLock" xml:space="preserve">
<value>Aktiver Fn + F genvejstaster uden Fn</value>
</data>
<data name="FnLockOff" xml:space="preserve">
<value>FN-lås fra</value>
</data>
<data name="FnLockOn" xml:space="preserve">
<value>FN-lås til</value>
</data>
<data name="GPUBoost" xml:space="preserve">
<value>Dynamisk boost</value>
</data>
<data name="GPUChanging" xml:space="preserve">
<value>Skifter</value>
</data>
<data name="GPUCoreClockOffset" xml:space="preserve">
<value>Core Clock forskydning</value>
</data>
<data name="GPUMemoryClockOffset" xml:space="preserve">
<value>Memory Clock forskydning</value>
</data>
<data name="GPUMode" xml:space="preserve">
<value>GPU- tilstand</value>
</data>
<data name="GPUModeEco" xml:space="preserve">
<value>Kun iGPU</value>
</data>
<data name="GPUModeStandard" xml:space="preserve">
<value>iGPU + dGPU</value>
</data>
<data name="GPUModeUltimate" xml:space="preserve">
<value>dGPU eksklusivt</value>
</data>
<data name="GPUPower" xml:space="preserve">
<value>GPU- strøm</value>
</data>
<data name="GPUSettings" xml:space="preserve">
<value>GPU-indstillinger</value>
</data>
<data name="GPUTempTarget" xml:space="preserve">
<value>Temperaturmål</value>
</data>
<data name="HibernateAfter" xml:space="preserve">
<value>Minutter til dvale i standby på batteriet (0 - OFF)</value>
</data>
<data name="High" xml:space="preserve">
<value>Høj</value>
</data>
<data name="ImageRotation" xml:space="preserve">
<value>Billedrotation</value>
</data>
<data name="Import" xml:space="preserve">
<value>Importer profil</value>
</data>
<data name="KeyBindings" xml:space="preserve">
<value>Tastebindinger</value>
</data>
<data name="Keyboard" xml:space="preserve">
<value>Tastatur</value>
</data>
<data name="KillGpuApps" xml:space="preserve">
<value>Stop alle apps der bruger GPU når du skifter til Øko</value>
</data>
<data name="LaptopBacklight" xml:space="preserve">
<value>Bærbar baggrundsbelysning</value>
</data>
<data name="LaptopKeyboard" xml:space="preserve">
<value>Bærbar tastatur</value>
</data>
<data name="LaptopScreen" xml:space="preserve">
<value>Bærbar skærm</value>
</data>
<data name="LEDStatusIndicators" xml:space="preserve">
<value>LED statusindikatorer</value>
</data>
<data name="Lid" xml:space="preserve">
<value>Låg</value>
</data>
<data name="Lightbar" xml:space="preserve">
<value>Lightbar</value>
</data>
<data name="Lighting" xml:space="preserve">
<value>Belysning</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Låseskærm</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>
</data>
<data name="Low" xml:space="preserve">
<value>Lav</value>
</data>
<data name="LSDeadzones" xml:space="preserve">
<value>Venstre stick dødzoner</value>
</data>
<data name="LTDeadzones" xml:space="preserve">
<value>Venstre udløser dødzoner</value>
</data>
<data name="MatrixAudio" xml:space="preserve">
<value>Lydvisualisering</value>
</data>
<data name="MatrixBanner" xml:space="preserve">
<value>Binær banner</value>
</data>
<data name="MatrixBright" xml:space="preserve">
<value>Kraftigt</value>
</data>
<data name="MatrixClock" xml:space="preserve">
<value>Ur</value>
</data>
<data name="MatrixDim" xml:space="preserve">
<value>Dæmpet</value>
</data>
<data name="MatrixLogo" xml:space="preserve">
<value>ROG logo</value>
</data>
<data name="MatrixMedium" xml:space="preserve">
<value>Middel</value>
</data>
<data name="MatrixOff" xml:space="preserve">
<value>Slukket</value>
</data>
<data name="MatrixPicture" xml:space="preserve">
<value>Billede</value>
</data>
<data name="MaxRefreshTooltip" xml:space="preserve">
<value>Maks. opdateringshastighed for lavere latenstid</value>
</data>
<data name="MinRefreshTooltip" xml:space="preserve">
<value>60Hz opdateringshastighed for at spare på batteriet</value>
</data>
<data name="Minute" xml:space="preserve">
<value>minut</value>
</data>
<data name="Minutes" xml:space="preserve">
<value>minutter</value>
</data>
<data name="MouseAngleSnapping" xml:space="preserve">
<value>Vinkel snapping</value>
</data>
<data name="MouseAutoPowerOff" xml:space="preserve">
<value>Automatisk slukning efter</value>
</data>
<data name="MouseButtonResponse" xml:space="preserve">
<value>Knaprespons</value>
</data>
<data name="MouseImportFailed" xml:space="preserve">
<value>Import mislykkedes. Den valgte fil er ikke en gyldig museprofil eller den er korrupteret.</value>
</data>
<data name="MouseLiftOffDistance" xml:space="preserve">
<value>Løfteafstand</value>
</data>
<data name="MouseLowBatteryWarning" xml:space="preserve">
<value>Lav batteriadvarsel ved</value>
</data>
<data name="MousePerformance" xml:space="preserve">
<value>Ydelse</value>
</data>
<data name="MouseSynchronize" xml:space="preserve">
<value>Synkroniser med mus</value>
</data>
<data name="Multizone" xml:space="preserve">
<value>Multizone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multizone stærk</value>
</data>
<data name="Muted" xml:space="preserve">
<value>Lydløs</value>
</data>
<data name="MuteMic" xml:space="preserve">
<value>Lydløs mikrofon</value>
</data>
<data name="Never" xml:space="preserve">
<value>Aldrig</value>
</data>
<data name="NewUpdates" xml:space="preserve">
<value>Nye opdateringer</value>
</data>
<data name="NoNewUpdates" xml:space="preserve">
<value>Ingen nye opdateringer</value>
</data>
<data name="NotConnected" xml:space="preserve">
<value>Ikke tilsluttet</value>
</data>
<data name="Off" xml:space="preserve">
<value>Fra</value>
</data>
<data name="On" xml:space="preserve">
<value>Til</value>
</data>
<data name="OneZone" xml:space="preserve">
<value>En zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve">
<value>Åbn G-Helper vindue</value>
</data>
<data name="Optimized" xml:space="preserve">
<value>Optimeret</value>
</data>
<data name="OptimizedGPUTooltip" xml:space="preserve">
<value>Skift til Øko på batteri og til Standard, når tilsluttet strøm</value>
</data>
<data name="OptimizedUSBC" xml:space="preserve">
<value>Hold GPU deaktiveret på USB-C-oplader i optimeret tilstand</value>
</data>
<data name="Other" xml:space="preserve">
<value>Andet</value>
</data>
<data name="Overdrive" xml:space="preserve">
<value>Overdrive</value>
</data>
<data name="PerformanceMode" xml:space="preserve">
<value>Tilstand</value>
</data>
<data name="Peripherals" xml:space="preserve">
<value>Tilbehør</value>
</data>
<data name="PictureGif" xml:space="preserve">
<value>Billede / Gif</value>
</data>
<data name="PlayPause" xml:space="preserve">
<value>Afspil / Pause</value>
</data>
<data name="PollingRate" xml:space="preserve">
<value>Polling Rate</value>
</data>
<data name="PowerLimits" xml:space="preserve">
<value>Kraftgrænser</value>
</data>
<data name="PPTExperimental" xml:space="preserve">
<value>Kraftgrænser er en eksperimentel funktion. Brug omhyggeligt og på egen risiko!</value>
</data>
<data name="PrintScreen" xml:space="preserve">
<value>PrintScreen</value>
</data>
<data name="Profile" xml:space="preserve">
<value>Profil</value>
</data>
<data name="Quit" xml:space="preserve">
<value>Afslut</value>
</data>
<data name="Reset" xml:space="preserve">
<value>Nulstil</value>
</data>
<data name="RestartGPU" xml:space="preserve">
<value>Noget bruger dGPU og forhindrer Øko-tilstand. Lad G-Helper forsøge at genstarte dGPU i enhedshåndtering? (fortsæt på egen risiko)</value>
</data>
<data name="RPM" xml:space="preserve">
<value>RPM</value>
</data>
<data name="RSDeadzones" xml:space="preserve">
<value>Højre stick dødzoner</value>
</data>
<data name="RTDeadzones" xml:space="preserve">
<value>Højre udløser dødzoner</value>
</data>
<data name="RunOnStartup" xml:space="preserve">
<value>Kør ved opstart</value>
</data>
<data name="ScalingQuality" xml:space="preserve">
<value>Skaleringskvalitet</value>
</data>
<data name="ScreenPadDown" xml:space="preserve">
<value>Screenpad lysstyrke ned</value>
</data>
<data name="ScreenPadUp" xml:space="preserve">
<value>Skærmtastatur lysstyrke op</value>
</data>
<data name="Shutdown" xml:space="preserve">
<value>Luk ned</value>
</data>
<data name="Silent" xml:space="preserve">
<value>Lydløs</value>
</data>
<data name="Sleep" xml:space="preserve">
<value>Standby</value>
</data>
<data name="StandardGPUTooltip" xml:space="preserve">
<value>Aktiverer dGPU til standardbrug</value>
</data>
<data name="StandardMode" xml:space="preserve">
<value>Standard</value>
</data>
<data name="Start" xml:space="preserve">
<value>Start</value>
</data>
<data name="StartingServices" xml:space="preserve">
<value>Starter tjenester</value>
</data>
<data name="StartupError" xml:space="preserve">
<value>Startfejl</value>
</data>
<data name="Stop" xml:space="preserve">
<value>Stop</value>
</data>
<data name="StopGPUApps" xml:space="preserve">
<value>Stop GPU-programmer</value>
</data>
<data name="StoppingServices" xml:space="preserve">
<value>Stopper tjenester</value>
</data>
<data name="ToggleAura" xml:space="preserve">
<value>Slå Aura til/fra</value>
</data>
<data name="ToggleClamshellMode" xml:space="preserve">
<value>Automatisk slå Clamshell tilstand til/fra</value>
</data>
<data name="ToggleFnLock" xml:space="preserve">
<value>Slå Fn-Lock til/fra</value>
</data>
<data name="ToggleMiniled" xml:space="preserve">
<value>Slå MiniLED til/fra (hvis understøttet)</value>
</data>
<data name="ToggleScreen" xml:space="preserve">
<value>Slå skærmen til/fra</value>
</data>
<data name="Turbo" xml:space="preserve">
<value>Turbo</value>
</data>
<data name="TurnedOff" xml:space="preserve">
<value>Slukket</value>
</data>
<data name="TurnOffOnBattery" xml:space="preserve">
<value>Deaktiver på batteri</value>
</data>
<data name="UltimateGPUTooltip" xml:space="preserve">
<value>Kobler bærbar skærm direkte til dGPU, hvilket maksimerer FPS</value>
</data>
<data name="UltimateMode" xml:space="preserve">
<value>Ultimativ</value>
</data>
<data name="UndervoltingRisky" xml:space="preserve">
<value>Undervolting er en eksperimentel og risikabel funktion. Hvis de anvendte værdier er for lave for din hardware, kan det blive ustabilt, lukke ned eller forårsage datakorruption. Hvis du ønsker at prøve - start fra små værdier først, klik på Anvend og test hvad der virker for dig.</value>
</data>
<data name="Unmuted" xml:space="preserve">
<value>Ikke muted</value>
</data>
<data name="Updates" xml:space="preserve">
<value>Opdateringer</value>
</data>
<data name="VersionLabel" xml:space="preserve">
<value>Version</value>
</data>
<data name="VibrationStrength" xml:space="preserve">
<value>Vibrationsstyrke</value>
</data>
<data name="VisualMode" xml:space="preserve">
<value>Visuel tilstand</value>
</data>
<data name="VisualModesHDR" xml:space="preserve">
<value>Visuelle tilstande er ikke tilgængelige, når HDR er aktiv</value>
</data>
<data name="VisualModesScreen" xml:space="preserve">
<value>Visuelle tilstande er ikke tilgængelige, når laptopskærmen er slukket</value>
</data>
<data name="VolumeDown" xml:space="preserve">
<value>Lydstyrke ned</value>
</data>
<data name="VolumeMute" xml:space="preserve">
<value>Lydløs</value>
</data>
<data name="VolumeUp" xml:space="preserve">
<value>Lydstyrke op</value>
</data>
<data name="WindowTop" xml:space="preserve">
<value>Hold altid appvinduet øverst</value>
</data>
<data name="Zoom" xml:space="preserve">
<value>Zoom</value>
</data>
</root>

View File

@@ -495,7 +495,7 @@ Trotzdem fortfahren?</value>
<value>Laptopbildschirm</value>
</data>
<data name="LEDStatusIndicators" xml:space="preserve">
<value>LED Status Indicators</value>
<value>LED-Statusanzeige</value>
</data>
<data name="Lid" xml:space="preserve">
<value>Deckel</value>
@@ -507,7 +507,7 @@ Trotzdem fortfahren?</value>
<value>Beleuchtung</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>Bildschirm sperren</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>

View File

@@ -507,7 +507,7 @@
<value>Iluminación</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>Pantalla de bloqueo</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>

View File

@@ -774,10 +774,10 @@ Voulez-vous continuer ?</value>
<value>Mode d'affichage</value>
</data>
<data name="VisualModesHDR" xml:space="preserve">
<value>Visual Modes are not available when HDR is active</value>
<value>Les modes visuels ne sont pas disponibles lorsque le HDR est actif</value>
</data>
<data name="VisualModesScreen" xml:space="preserve">
<value>Visual Modes are not available when laptop screen is off</value>
<value>Les modes visuels ne sont pas disponibles lorsque l'écran de l'ordinateur portable est éteint</value>
</data>
<data name="VolumeDown" xml:space="preserve">
<value>Vol-</value>

View File

@@ -507,7 +507,7 @@ Nadal chcesz kontynuować?</value>
<value>Oświetlenie</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>Ekran blokady</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>

View File

@@ -121,7 +121,7 @@
<value>Hızlandırma</value>
</data>
<data name="ACPIError" xml:space="preserve">
<value>ASUS ACPI'ye bağlanılamıyor. Uygulama o olmadan çalışamaz. Asus Sistem Kontrol Arayüzü'yüklemeyi deneyin.</value>
<value>ASUS ACPI bağlanılamıyor. Uygulama onsuz çalışamaz. Asus Sistem Kontrol Arayüzünü kurmayı deneyin</value>
</data>
<data name="AlertAPUMemoryRestart" xml:space="preserve">
<value>Değişiklikleri uygulamak için cihazınızı yeniden başlatın</value>
@@ -130,7 +130,7 @@
<value>Şimdi yeniden başlatılsın mı?</value>
</data>
<data name="AlertDGPU" xml:space="preserve">
<value>Görünüşe göre GPU yoğun bir şekilde kullanılıyor, devre dışı bırakılsın mı?</value>
<value>GPU yoğun kullanımda gibi, devre dışı bırakılsın mı?</value>
</data>
<data name="AlertDGPUTitle" xml:space="preserve">
<value>Eko Modu</value>
@@ -139,7 +139,7 @@
<value>Ultimate Modu kapatmak yeniden başlatmayı gerektirir</value>
</data>
<data name="AlertUltimateOn" xml:space="preserve">
<value>Ultimate Modu etkinleştirmek yeniden başlatmayı gerektirir</value>
<value>Ultimate Mod için yeniden başlatılmalı</value>
</data>
<data name="AlertUltimateTitle" xml:space="preserve">
<value>Şimdi yeniden başlatılsın mı?</value>
@@ -169,10 +169,10 @@
<value>Güç Sınırlarını Uygula</value>
</data>
<data name="ApplyWindowsPowerPlan" xml:space="preserve">
<value>Windows Güç Modunu otomatik ayarla</value>
<value>Windows Güç Modlarını otomatik ayarla</value>
</data>
<data name="APUMemory" xml:space="preserve">
<value>GPU'ya Atanan Bellek</value>
<value>GPU için Atanan Bellek</value>
</data>
<data name="AsusServicesRunning" xml:space="preserve">
<value>Çalışan Asus Hizmetleri</value>
@@ -244,10 +244,10 @@
<value>Otomatik</value>
</data>
<data name="AutoRefreshTooltip" xml:space="preserve">
<value>Pil tasarrufu için 60Hz kullanılır ve şarja takıldığında eski haline getirir</value>
<value>Pil tasarrufu için 60Hz kullanılır, şarja takıldığında eski haline gelir</value>
</data>
<data name="Awake" xml:space="preserve">
<value>Uyanırken</value>
<value>Uyanış</value>
</data>
<data name="BacklightLow" xml:space="preserve">
<value>Düşük</value>
@@ -262,7 +262,7 @@
<value>Kapalı</value>
</data>
<data name="BacklightTimeout" xml:space="preserve">
<value>Pildeyken klavye ışığının kapanma süresi</value>
<value>Pilde klavye ışığı kapanma süresi</value>
</data>
<data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Pildeyken Arka Işık Zaman Aşımı</value>
@@ -283,7 +283,7 @@
<value>Pil Sağlığı</value>
</data>
<data name="BatteryLimitFull" xml:space="preserve">
<value>Bir seferlik %100 şarj etme</value>
<value>Tek seferlik %100'e kadar şarj</value>
</data>
<data name="Binding" xml:space="preserve">
<value>Tuş Atamaları</value>
@@ -298,13 +298,13 @@
<value>BIOS ve Sürücü Güncellemeleri</value>
</data>
<data name="Boot" xml:space="preserve">
<value>Boot</value>
<value>ılış</value>
</data>
<data name="BootSound" xml:space="preserve">
<value>Boot Sesi</value>
<value>ılış sesi</value>
</data>
<data name="Brightness" xml:space="preserve">
<value>Parlaklığı</value>
<value>Parlaklık</value>
</data>
<data name="BrightnessDown" xml:space="preserve">
<value>Parlaklığı Azalt</value>
@@ -313,10 +313,10 @@
<value>Parlaklığı Artır</value>
</data>
<data name="BWTrayIcon" xml:space="preserve">
<value>Siyah-beyaz tepsi simgesi</value>
<value>Siyah ve beyaz tepsi simgesi</value>
</data>
<data name="Calibrate" xml:space="preserve">
<value>Kalibre Et</value>
<value>Kalibrasyon</value>
</data>
<data name="Charging" xml:space="preserve">
<value>Şarj oluyor</value>
@@ -331,7 +331,7 @@
<value>Kontrolcü</value>
</data>
<data name="CPUBoost" xml:space="preserve">
<value>CPU Desteği</value>
<value>CPU Artışı</value>
</data>
<data name="Custom" xml:space="preserve">
<value>Özel</value>
@@ -352,7 +352,7 @@
<value>Ekran overdrive özelliğini devre dışı bırak</value>
</data>
<data name="Discharging" xml:space="preserve">
<value>Şarj azalıyor</value>
<value>Şarj Azalıyor</value>
</data>
<data name="DownloadColorProfiles" xml:space="preserve">
<value>Renk Profillerini İndir</value>
@@ -364,13 +364,13 @@
<value>Sürücüler ve Yazılımlar</value>
</data>
<data name="EcoGPUTooltip" xml:space="preserve">
<value>Pil tasarrufu için harici GPU'yu devre dışı bırakır</value>
<value>Pil tasarrufu için dGPU devre dışı bırakılır</value>
</data>
<data name="EcoMode" xml:space="preserve">
<value>Eko</value>
</data>
<data name="EnableGPUOnShutdown" xml:space="preserve">
<value>Kapanma sırasında harici GPU'yu etkinleştir (Eco moduyla ilgili sorunları önler)</value>
<value>Kapatma sırasında GPU'yu etkinleştir (Eco modundaki sorunları önler)</value>
</data>
<data name="EnableOptimusText" xml:space="preserve">
<value>NVIDIA Denetim Masası'ndaki Görüntü Modu Optimus olarak ayarlı değilken Eko moduna geçilerek harici GPU'nun devre dışı bırakılması, bir sonraki yeniden başlatmaya kadar parlaklık ayarlarında sorunlara neden olabilir.
@@ -387,10 +387,10 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Profili Dışa Aktar</value>
</data>
<data name="Extra" xml:space="preserve">
<value>Ekstra</value>
<value>Ek Özellikler</value>
</data>
<data name="ExtraSettings" xml:space="preserve">
<value>Ekstra Ayarlar</value>
<value>Ek Ayarlar</value>
</data>
<data name="FactoryDefaults" xml:space="preserve">
<value>Fabrika Ayarları</value>
@@ -420,10 +420,10 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Fanlar + Güç</value>
</data>
<data name="FlickerFreeDimming" xml:space="preserve">
<value>Flicker-free Dimming</value>
<value>Titreşimsiz Karartma</value>
</data>
<data name="FnLock" xml:space="preserve">
<value>Fn+F kısayol tuşlarını FN tuşuna basmadan çalıştır</value>
<value>Fn+F kısayolunu Fn tuşuna basmadan çalıştır</value>
</data>
<data name="FnLockOff" xml:space="preserve">
<value>FN-Lock Kapalı</value>
@@ -447,13 +447,13 @@ Yine de devam etmek istiyor musunuz?</value>
<value>GPU Modu</value>
</data>
<data name="GPUModeEco" xml:space="preserve">
<value>sadece dahili GPU</value>
<value>Sadece iGPU</value>
</data>
<data name="GPUModeStandard" xml:space="preserve">
<value>dahili + harici GPU</value>
<value>iGPU + dGPU</value>
</data>
<data name="GPUModeUltimate" xml:space="preserve">
<value>sadece harici GPU</value>
<value>Ayrıcalıklı dGPU</value>
</data>
<data name="GPUPower" xml:space="preserve">
<value>GPU Gücü</value>
@@ -471,7 +471,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Yüksek</value>
</data>
<data name="ImageRotation" xml:space="preserve">
<value>Görüntü Rotasyonu</value>
<value>Görüntü Döndürme</value>
</data>
<data name="Import" xml:space="preserve">
<value>Profili İçe Aktar</value>
@@ -483,7 +483,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Klavye</value>
</data>
<data name="KillGpuApps" xml:space="preserve">
<value>Eco'ya geçerken harici GPU'yu kullanan tüm uygulamaları durdur</value>
<value>Eco moda geçerken GPU kullanan tüm uygulamaları durdur</value>
</data>
<data name="LaptopBacklight" xml:space="preserve">
<value>Laptop Aydınlatması</value>
@@ -495,7 +495,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Laptop Ekranı</value>
</data>
<data name="LEDStatusIndicators" xml:space="preserve">
<value>LED Status Indicators</value>
<value>LED Durum Göstergeleri</value>
</data>
<data name="Lid" xml:space="preserve">
<value>Kapak</value>
@@ -507,7 +507,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Işıklandırma</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>Kilit Ekranı</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>
@@ -516,7 +516,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Düşük</value>
</data>
<data name="LSDeadzones" xml:space="preserve">
<value>Sol Joystick Ölü Bölgeleri</value>
<value>Sol Çubuk Ölü Bölgeleri</value>
</data>
<data name="LTDeadzones" xml:space="preserve">
<value>Sol Tetik Ölü Bölgeleri</value>
@@ -525,7 +525,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Ses Görselleştirici</value>
</data>
<data name="MatrixBanner" xml:space="preserve">
<value>Binary Banner</value>
<value>İkili Afiş</value>
</data>
<data name="MatrixBright" xml:space="preserve">
<value>Parlak</value>
@@ -549,7 +549,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Resim</value>
</data>
<data name="MaxRefreshTooltip" xml:space="preserve">
<value>Daha düşük gecikme için maksimum yenileme hızı</value>
<value>En düşük gecikme için en yüksek yenileme hızı</value>
</data>
<data name="MinRefreshTooltip" xml:space="preserve">
<value>Pil tasarrufu için 60Hz yenileme hızı</value>
@@ -561,7 +561,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Dakika</value>
</data>
<data name="MouseAngleSnapping" xml:space="preserve">
<value>Angle Snapping</value>
<value>Açılı Yakalama</value>
</data>
<data name="MouseAutoPowerOff" xml:space="preserve">
<value>Sonrasında Otomatik Kapat</value>
@@ -582,7 +582,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Performans</value>
</data>
<data name="MouseSynchronize" xml:space="preserve">
<value>Fare ile senkronize edin</value>
<value>Fare ile eşitle</value>
</data>
<data name="Multizone" xml:space="preserve">
<value>Çok Bölgeli</value>
@@ -591,7 +591,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Çok Bölgeli (Güçlü)</value>
</data>
<data name="Muted" xml:space="preserve">
<value>Ses kapalı</value>
<value>Susturuldu</value>
</data>
<data name="MuteMic" xml:space="preserve">
<value>Mikrofonu Sustur</value>
@@ -603,10 +603,10 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Yeni güncellemeler</value>
</data>
<data name="NoNewUpdates" xml:space="preserve">
<value>Güncelleme yok</value>
<value>Yeni güncelleme yok</value>
</data>
<data name="NotConnected" xml:space="preserve">
<value>Bağlantı Yok</value>
<value>Bağlı Değil</value>
</data>
<data name="Off" xml:space="preserve">
<value>Kapalı</value>
@@ -621,13 +621,13 @@ Yine de devam etmek istiyor musunuz?</value>
<value>G-Helper penceresini aç</value>
</data>
<data name="Optimized" xml:space="preserve">
<value>Optimize edilmiş</value>
<value>İyileştirilmiş</value>
</data>
<data name="OptimizedGPUTooltip" xml:space="preserve">
<value>Pille çalışırken Eko moda ve şarjdayken Standart moda geçiş yapın</value>
<value>Pil ile çalışırken Eko moda, şarjda Standart moda geçiş yap</value>
</data>
<data name="OptimizedUSBC" xml:space="preserve">
<value>Optimize edilmiş modda USB-c şarj cihazında GPU'yu devre dışı bırak</value>
<value>İyileştirilmiş modda USB-C şarj cihazı bağlıyken, GPU devre dışı kalsın</value>
</data>
<data name="Other" xml:space="preserve">
<value>Diğer</value>
@@ -657,13 +657,13 @@ Yine de devam etmek istiyor musunuz?</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>
<value>PrintScreen</value>
</data>
<data name="Profile" xml:space="preserve">
<value>Profil</value>
</data>
<data name="Quit" xml:space="preserve">
<value>Çıkış Yap</value>
<value>Çıkış</value>
</data>
<data name="Reset" xml:space="preserve">
<value>Sıfırla</value>
@@ -675,7 +675,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>RPM</value>
</data>
<data name="RSDeadzones" xml:space="preserve">
<value>Sağ Joystick Ölü Bölgeleri</value>
<value>Sağ Çubuk Ölü Bölgeleri</value>
</data>
<data name="RTDeadzones" xml:space="preserve">
<value>Sağ Tetik Ölü Bölgeleri</value>
@@ -693,7 +693,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Screenpad Parlaklığını Artır</value>
</data>
<data name="Shutdown" xml:space="preserve">
<value>Kapatma</value>
<value>Kapanış</value>
</data>
<data name="Silent" xml:space="preserve">
<value>Sessiz</value>
@@ -702,7 +702,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Uyku</value>
</data>
<data name="StandardGPUTooltip" xml:space="preserve">
<value>Standart kullanım için harici GPU'yu etkinleştirir</value>
<value>Standart kullanım için dGPU etkinleştirilir</value>
</data>
<data name="StandardMode" xml:space="preserve">
<value>Standart</value>
@@ -729,7 +729,7 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Aura'yı Kullan</value>
</data>
<data name="ToggleClamshellMode" xml:space="preserve">
<value>Otomatik Clamshell Modunu Aç</value>
<value>Kapaklı modu otmatik değiştir</value>
</data>
<data name="ToggleFnLock" xml:space="preserve">
<value>Fn-Lock'u Aç</value>
@@ -750,13 +750,13 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Pille çalışırken kapat</value>
</data>
<data name="UltimateGPUTooltip" xml:space="preserve">
<value>Dizüstü ekranını harici GPU'ya yönlendirerek FPS'yi maksimize eder</value>
<value>Dizüstü ekranını dGPU üstüne yönlendirerek FPS en üst düzeye çıkar</value>
</data>
<data name="UltimateMode" xml:space="preserve">
<value>Ultimate</value>
</data>
<data name="UndervoltingRisky" xml:space="preserve">
<value>Undervolting deneysel ve riskli bir özelliktir. Uygulanan değerler cihazınız için çok düşükse, cihazınız stabil çalışmayabilir, kapanabilir veya veri kaybına uğrayabilir. Yine de denemek istiyorsanız, önce küçük değerlerden başlayıp Uygula'ya tıklayın ve sizin için uygun olanı test edin.</value>
<value>Düşük voltaj deneysel ve riskli bir özelliktir. Uygulanan değerler cihaz için çok düşükse, cihazı stabil çalışmayabilir, kapanabilir veya veri kaybına uğrayabilir. Yine de denemek istiyorsanız, önce küçük değerlerden başlayın ve sizin için uygun olanı test edin.</value>
</data>
<data name="Unmuted" xml:space="preserve">
<value>Ses açık</value>
@@ -768,16 +768,16 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Sürüm</value>
</data>
<data name="VibrationStrength" xml:space="preserve">
<value>Titreşim Şiddeti</value>
<value>Titreşim Yoğunluğu</value>
</data>
<data name="VisualMode" xml:space="preserve">
<value>Görüntü Modu</value>
<value>Görsel Mod</value>
</data>
<data name="VisualModesHDR" xml:space="preserve">
<value>Visual Modes are not available when HDR is active</value>
<value>HDR etkin olduğunda Görsel Modlar kullanılamaz</value>
</data>
<data name="VisualModesScreen" xml:space="preserve">
<value>Visual Modes are not available when laptop screen is off</value>
<value>Bilgisayar ekranı kapalı olduğunda Görsel Modlar kullanılamaz</value>
</data>
<data name="VolumeDown" xml:space="preserve">
<value>Sesi Azalt</value>
@@ -792,6 +792,6 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Uygulama penceresini her zaman en üstte tut</value>
</data>
<data name="Zoom" xml:space="preserve">
<value>Yakınlaştırma</value>
<value>Yakınlaştır</value>
</data>
</root>

View File

@@ -495,7 +495,7 @@
<value>笔记本屏幕</value>
</data>
<data name="LEDStatusIndicators" xml:space="preserve">
<value>LED Status Indicators</value>
<value>LED 状态指示器</value>
</data>
<data name="Lid" xml:space="preserve">
<value>盖子</value>
@@ -507,7 +507,7 @@
<value>背光</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>锁定屏幕</value>
</data>
<data name="Logo" xml:space="preserve">
<value>徽标</value>
@@ -585,10 +585,10 @@
<value>和鼠标同步</value>
</data>
<data name="Multizone" xml:space="preserve">
<value>Multi Zone</value>
<value>多区</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
<value>多区强化</value>
</data>
<data name="Muted" xml:space="preserve">
<value>麦克风关闭</value>
@@ -615,7 +615,7 @@
<value>开</value>
</data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
<value>单区</value>
</data>
<data name="OpenGHelper" xml:space="preserve">
<value>打开G-Helper窗口</value>
@@ -771,13 +771,13 @@
<value>震动强度</value>
</data>
<data name="VisualMode" xml:space="preserve">
<value>Visual Mode</value>
<value>色域模式</value>
</data>
<data name="VisualModesHDR" xml:space="preserve">
<value>Visual Modes are not available when HDR is active</value>
<value>HDR 开启时不支持色域模式</value>
</data>
<data name="VisualModesScreen" xml:space="preserve">
<value>Visual Modes are not available when laptop screen is off</value>
<value>笔记本自带屏幕关闭时不支持色域模式</value>
</data>
<data name="VolumeDown" xml:space="preserve">
<value>音量降低</value>
@@ -792,6 +792,6 @@
<value>窗口置顶</value>
</data>
<data name="Zoom" xml:space="preserve">
<value>Zoom</value>
<value>缩放</value>
</data>
</root>

View File

@@ -507,7 +507,7 @@
<value>亮度</value>
</data>
<data name="LockScreen" xml:space="preserve">
<value>Lock Screen</value>
<value>鎖定螢幕</value>
</data>
<data name="Logo" xml:space="preserve">
<value>Logo</value>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -88,6 +88,7 @@ namespace GHelper
button60Hz = new RButton();
button120Hz = new RButton();
buttonMiniled = new RButton();
buttonFHD = new RButton();
panelScreenTitle = new Panel();
labelMidFan = new Label();
pictureScreen = new PictureBox();
@@ -134,6 +135,7 @@ namespace GHelper
labelGamma = new Label();
pictureGamma = new PictureBox();
labelGammaTitle = new Label();
buttonAutoTDP = new RButton();
panelMatrix.SuspendLayout();
panelMatrixAuto.SuspendLayout();
tableLayoutMatrix.SuspendLayout();
@@ -188,7 +190,7 @@ namespace GHelper
panelMatrix.Controls.Add(tableLayoutMatrix);
panelMatrix.Controls.Add(panelMatrixTitle);
panelMatrix.Dock = DockStyle.Top;
panelMatrix.Location = new Point(11, 1051);
panelMatrix.Location = new Point(11, 1071);
panelMatrix.Margin = new Padding(0);
panelMatrix.Name = "panelMatrix";
panelMatrix.Padding = new Padding(20, 20, 20, 11);
@@ -368,7 +370,7 @@ namespace GHelper
panelBattery.Controls.Add(sliderBattery);
panelBattery.Controls.Add(panelBatteryTitle);
panelBattery.Dock = DockStyle.Top;
panelBattery.Location = new Point(11, 1705);
panelBattery.Location = new Point(11, 1725);
panelBattery.Margin = new Padding(0);
panelBattery.Name = "panelBattery";
panelBattery.Padding = new Padding(20, 20, 20, 11);
@@ -460,7 +462,7 @@ namespace GHelper
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelFooter.Controls.Add(tableButtons);
panelFooter.Dock = DockStyle.Top;
panelFooter.Location = new Point(11, 1881);
panelFooter.Location = new Point(11, 1901);
panelFooter.Margin = new Padding(0);
panelFooter.Name = "panelFooter";
panelFooter.Padding = new Padding(20);
@@ -765,6 +767,7 @@ namespace GHelper
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.Controls.Add(buttonAutoTDP, 0, 0);
tableAMD.Controls.Add(buttonOverlay, 0, 0);
tableAMD.Controls.Add(buttonFPS, 0, 0);
tableAMD.Dock = DockStyle.Top;
@@ -1040,7 +1043,7 @@ namespace GHelper
panelScreen.Margin = new Padding(0);
panelScreen.Name = "panelScreen";
panelScreen.Padding = new Padding(20, 11, 20, 0);
panelScreen.Size = new Size(827, 167);
panelScreen.Size = new Size(827, 187);
panelScreen.TabIndex = 2;
panelScreen.TabStop = true;
//
@@ -1048,7 +1051,7 @@ namespace GHelper
//
labelTipScreen.Dock = DockStyle.Top;
labelTipScreen.ForeColor = SystemColors.GrayText;
labelTipScreen.Location = new Point(20, 131);
labelTipScreen.Location = new Point(20, 151);
labelTipScreen.Margin = new Padding(4, 0, 4, 0);
labelTipScreen.Name = "labelTipScreen";
labelTipScreen.Size = new Size(787, 36);
@@ -1067,13 +1070,14 @@ namespace GHelper
tableScreen.Controls.Add(button60Hz, 1, 0);
tableScreen.Controls.Add(button120Hz, 2, 0);
tableScreen.Controls.Add(buttonMiniled, 3, 0);
tableScreen.Controls.Add(buttonFHD, 3, 0);
tableScreen.Dock = DockStyle.Top;
tableScreen.Location = new Point(20, 51);
tableScreen.Margin = new Padding(8, 4, 8, 4);
tableScreen.Name = "tableScreen";
tableScreen.RowCount = 1;
tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
tableScreen.Size = new Size(787, 80);
tableScreen.Size = new Size(787, 100);
tableScreen.TabIndex = 23;
//
// buttonScreenAuto
@@ -1145,15 +1149,36 @@ namespace GHelper
buttonMiniled.FlatAppearance.BorderSize = 0;
buttonMiniled.FlatStyle = FlatStyle.Flat;
buttonMiniled.ForeColor = SystemColors.ControlText;
buttonMiniled.Location = new Point(592, 4);
buttonMiniled.Location = new Point(4, 84);
buttonMiniled.Margin = new Padding(4);
buttonMiniled.Name = "buttonMiniled";
buttonMiniled.Secondary = false;
buttonMiniled.Size = new Size(191, 72);
buttonMiniled.Size = new Size(188, 12);
buttonMiniled.TabIndex = 12;
buttonMiniled.Text = Properties.Strings.Multizone;
buttonMiniled.UseVisualStyleBackColor = false;
//
// buttonFHD
//
buttonFHD.Activated = false;
buttonFHD.BackColor = SystemColors.ControlLightLight;
buttonFHD.BorderColor = Color.Transparent;
buttonFHD.BorderRadius = 5;
buttonFHD.CausesValidation = false;
buttonFHD.Dock = DockStyle.Fill;
buttonFHD.FlatAppearance.BorderSize = 0;
buttonFHD.FlatStyle = FlatStyle.Flat;
buttonFHD.ForeColor = SystemColors.ControlText;
buttonFHD.Location = new Point(592, 4);
buttonFHD.Margin = new Padding(4);
buttonFHD.Name = "buttonFHD";
buttonFHD.Secondary = false;
buttonFHD.Size = new Size(191, 72);
buttonFHD.TabIndex = 13;
buttonFHD.Text = "FHD";
buttonFHD.UseVisualStyleBackColor = false;
buttonFHD.Visible = false;
//
// panelScreenTitle
//
panelScreenTitle.Controls.Add(labelMidFan);
@@ -1207,7 +1232,7 @@ namespace GHelper
panelKeyboard.Controls.Add(tableLayoutKeyboard);
panelKeyboard.Controls.Add(panelKeyboardTitle);
panelKeyboard.Dock = DockStyle.Top;
panelKeyboard.Location = new Point(11, 1374);
panelKeyboard.Location = new Point(11, 1394);
panelKeyboard.Margin = new Padding(0);
panelKeyboard.Name = "panelKeyboard";
panelKeyboard.Padding = new Padding(20);
@@ -1368,7 +1393,7 @@ namespace GHelper
//
pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_32__1_;
pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom;
pictureKeyboard.Location = new Point(8, 3);
pictureKeyboard.Location = new Point(8, 0);
pictureKeyboard.Margin = new Padding(4);
pictureKeyboard.Name = "pictureKeyboard";
pictureKeyboard.Size = new Size(32, 32);
@@ -1379,7 +1404,7 @@ namespace GHelper
//
labelKeyboard.AutoSize = true;
labelKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelKeyboard.Location = new Point(40, 0);
labelKeyboard.Location = new Point(43, 0);
labelKeyboard.Margin = new Padding(4, 0, 4, 0);
labelKeyboard.Name = "labelKeyboard";
labelKeyboard.Size = new Size(210, 32);
@@ -1391,7 +1416,7 @@ namespace GHelper
panelVersion.Controls.Add(labelCharge);
panelVersion.Controls.Add(checkStartup);
panelVersion.Dock = DockStyle.Top;
panelVersion.Location = new Point(11, 1825);
panelVersion.Location = new Point(11, 1845);
panelVersion.Margin = new Padding(4);
panelVersion.Name = "panelVersion";
panelVersion.Size = new Size(827, 56);
@@ -1399,6 +1424,7 @@ namespace GHelper
//
// labelCharge
//
labelCharge.Cursor = Cursors.Hand;
labelCharge.Dock = DockStyle.Right;
labelCharge.ForeColor = SystemColors.ControlDark;
labelCharge.Location = new Point(366, 0);
@@ -1408,7 +1434,6 @@ namespace GHelper
labelCharge.Size = new Size(461, 56);
labelCharge.TabIndex = 40;
labelCharge.TextAlign = ContentAlignment.MiddleRight;
labelCharge.Cursor = Cursors.Hand;
//
// panelPeripherals
//
@@ -1417,7 +1442,7 @@ namespace GHelper
panelPeripherals.Controls.Add(tableLayoutPeripherals);
panelPeripherals.Controls.Add(panelPeripheralsTile);
panelPeripherals.Dock = DockStyle.Top;
panelPeripherals.Location = new Point(11, 1506);
panelPeripherals.Location = new Point(11, 1526);
panelPeripherals.Margin = new Padding(0);
panelPeripherals.Name = "panelPeripherals";
panelPeripherals.Padding = new Padding(20, 20, 20, 11);
@@ -1559,7 +1584,7 @@ namespace GHelper
panelAlly.Controls.Add(tableLayoutAlly);
panelAlly.Controls.Add(panelAllyTitle);
panelAlly.Dock = DockStyle.Top;
panelAlly.Location = new Point(11, 1234);
panelAlly.Location = new Point(11, 1254);
panelAlly.Margin = new Padding(0);
panelAlly.Name = "panelAlly";
panelAlly.Padding = new Padding(20, 20, 20, 0);
@@ -1696,7 +1721,7 @@ namespace GHelper
panelGamma.Controls.Add(sliderGamma);
panelGamma.Controls.Add(panelGammaTitle);
panelGamma.Dock = DockStyle.Top;
panelGamma.Location = new Point(11, 818);
panelGamma.Location = new Point(11, 838);
panelGamma.Margin = new Padding(0);
panelGamma.Name = "panelGamma";
panelGamma.Padding = new Padding(20, 11, 20, 11);
@@ -1870,6 +1895,28 @@ namespace GHelper
labelGammaTitle.TabIndex = 37;
labelGammaTitle.Text = "Flicker-free Dimming";
//
// buttonAutoTDP
//
buttonAutoTDP.Activated = false;
buttonAutoTDP.BackColor = SystemColors.ControlLightLight;
buttonAutoTDP.BorderColor = Color.Transparent;
buttonAutoTDP.BorderRadius = 5;
buttonAutoTDP.Dock = DockStyle.Fill;
buttonAutoTDP.FlatAppearance.BorderSize = 0;
buttonAutoTDP.FlatStyle = FlatStyle.Flat;
buttonAutoTDP.ForeColor = SystemColors.ControlText;
buttonAutoTDP.Image = Properties.Resources.icons8_gauge_32;
buttonAutoTDP.ImageAlign = ContentAlignment.MiddleRight;
buttonAutoTDP.Location = new Point(528, 4);
buttonAutoTDP.Margin = new Padding(4);
buttonAutoTDP.Name = "buttonAutoTDP";
buttonAutoTDP.Secondary = false;
buttonAutoTDP.Size = new Size(255, 72);
buttonAutoTDP.TabIndex = 13;
buttonAutoTDP.Text = "AutoTDP";
buttonAutoTDP.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonAutoTDP.UseVisualStyleBackColor = false;
//
// SettingsForm
//
AutoScaleDimensions = new SizeF(192F, 192F);
@@ -2071,5 +2118,7 @@ namespace GHelper
private RComboBox comboColorTemp;
private RButton buttonInstallColor;
private Label labelVisual;
private RButton buttonFHD;
private RButton buttonAutoTDP;
}
}

View File

@@ -159,6 +159,7 @@ namespace GHelper
button120Hz.Click += Button120Hz_Click;
buttonScreenAuto.Click += ButtonScreenAuto_Click;
buttonMiniled.Click += ButtonMiniled_Click;
buttonFHD.Click += ButtonFHD_Click;
buttonQuit.Click += ButtonQuit_Click;
@@ -216,9 +217,14 @@ namespace GHelper
button120Hz.MouseMove += Button120Hz_MouseHover;
button120Hz.MouseLeave += ButtonScreen_MouseLeave;
buttonFHD.MouseMove += ButtonFHD_MouseHover;
buttonFHD.MouseLeave += ButtonScreen_MouseLeave;
buttonUpdates.Click += ButtonUpdates_Click;
sliderBattery.ValueChanged += SliderBattery_ValueChanged;
sliderBattery.MouseUp += SliderBattery_MouseUp;
sliderBattery.KeyUp += SliderBattery_KeyUp;
Program.trayIcon.MouseMove += TrayIcon_MouseMove;
sensorTimer = new System.Timers.Timer(AppConfig.Get("sensor_timer", 1000));
@@ -245,6 +251,9 @@ namespace GHelper
buttonFPS.Click += ButtonFPS_Click;
buttonOverlay.Click += ButtonOverlay_Click;
buttonAutoTDP.Click += ButtonAutoTDP_Click;
buttonAutoTDP.BorderColor = colorTurbo;
Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort();
TopMost = AppConfig.Is("topmost");
@@ -263,6 +272,26 @@ namespace GHelper
InitVisual();
}
private void ButtonFHD_Click(object? sender, EventArgs e)
{
screenControl.ToogleFHD();
}
private void SliderBattery_KeyUp(object? sender, KeyEventArgs e)
{
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
}
private void SliderBattery_MouseUp(object? sender, MouseEventArgs e)
{
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
}
private void ButtonAutoTDP_Click(object? sender, EventArgs e)
{
allyControl.ToggleAutoTDP();
}
private void LabelCharge_Click(object? sender, EventArgs e)
{
BatteryControl.BatteryReport();
@@ -323,7 +352,7 @@ namespace GHelper
panelGamma.Visible = true;
tableVisual.Visible = true;
var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)SplendidCommand.Default);
var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)VisualControl.GetDefaultVisualMode());
var colorTempValue = AppConfig.Get("color_temp", VisualControl.DefaultColorTemp);
comboVisual.DropDownStyle = ComboBoxStyle.DropDownList;
@@ -352,7 +381,7 @@ namespace GHelper
comboGamut.DataSource = new BindingSource(gamuts, null);
comboGamut.DisplayMember = "Value";
comboGamut.ValueMember = "Key";
comboGamut.SelectedValue = (SplendidGamut)AppConfig.Get("gamut", (int)SplendidGamut.Native);
comboGamut.SelectedValue = (SplendidGamut)AppConfig.Get("gamut", (int)VisualControl.GetDefaultGamut());
comboGamut.SelectedValueChanged += ComboGamut_SelectedValueChanged;
comboGamut.Visible = true;
@@ -487,6 +516,12 @@ namespace GHelper
buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit <= 120) ? limit : "OFF");
}
public void VisualiseAutoTDP(bool status)
{
Logger.WriteLine($"Auto TDP: {status}");
buttonAutoTDP.Activated = status;
}
private void SettingsForm_LostFocus(object? sender, EventArgs e)
{
lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds();
@@ -727,11 +762,6 @@ namespace GHelper
gpuControl.ToggleXGM();
}
private void SliderBattery_ValueChanged(object? sender, EventArgs e)
{
BatteryControl.SetBatteryChargeLimit(sliderBattery.Value);
}
public void SetVersionLabel(string label, bool update = false)
{
@@ -765,6 +795,11 @@ namespace GHelper
Program.settingsForm.RefreshSensors();
}
private void ButtonFHD_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = "Switch to "+ ((buttonFHD.Text == "FHD") ? "UHD" : "FHD") + " Mode";
}
private void Button120Hz_MouseHover(object? sender, EventArgs e)
{
labelTipScreen.Text = Properties.Strings.MaxRefreshTooltip;
@@ -1067,7 +1102,7 @@ namespace GHelper
if (matrixControl.IsSlash)
{
labelMatrix.Text = "Slash Lightning";
labelMatrix.Text = "Slash Lighting";
comboMatrixRunning.Items.Clear();
foreach (var item in SlashDevice.Modes)
@@ -1083,7 +1118,7 @@ namespace GHelper
checkMatrixLid.Visible = true;
}
comboMatrix.SelectedIndex = Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1);
comboMatrix.SelectedIndex = Math.Max(0, Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1));
comboMatrixRunning.SelectedIndex = Math.Min(AppConfig.Get("matrix_running", 0), comboMatrixRunning.Items.Count - 1);
comboInterval.SelectedIndex = Math.Min(AppConfig.Get("matrix_interval", 0), comboInterval.Items.Count - 1);
@@ -1143,7 +1178,7 @@ namespace GHelper
public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr)
public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr, int fhd)
{
ButtonEnabled(button60Hz, screenEnabled);
@@ -1182,6 +1217,12 @@ namespace GHelper
panelScreen.Visible = false;
}
if (fhd >= 0)
{
buttonFHD.Visible = true;
buttonFHD.Text = fhd > 0 ? "FHD" : "UHD";
}
if (miniled1 >= 0)
{
buttonMiniled.Enabled = !hdr;

View File

@@ -268,25 +268,6 @@ namespace GHelper.USB
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1A },
}, "Init");
// Random data AC sends to keyboard on start, that seem to wake up keyboard on 2024
if (AppConfig.IsNewAura())
{
AsusHid.Write(new List<byte[]> {
new byte[] { AsusHid.AURA_ID, 0x9F, 0x01 },
new byte[] { AsusHid.AURA_ID, 0xBF },
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x10 },
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x20 },
new byte[] { AsusHid.AURA_ID, 0xC0, 0x03, 0x01 },
new byte[] { AsusHid.AURA_ID, 0x9E, 0x01, 0x20 },
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1A },
new byte[] { AsusHid.AURA_ID, 0xC0, 0x00, 0x01 },
}, "Init");
}
}
@@ -611,6 +592,7 @@ namespace GHelper.USB
if (init || initDirect)
{
initDirect = false;
Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc, 1 });
}

114
app/Updates.Designer.cs generated
View File

@@ -42,12 +42,18 @@ namespace GHelper
panelDriversTitle = new Panel();
labelDrivers = new Label();
pictureDrivers = new PictureBox();
tableLayoutLegend = new TableLayoutPanel();
labelLegendGreen = new Label();
labelLegendGray = new Label();
labelLegendRed = new Label();
labelLegend = new Label();
((System.ComponentModel.ISupportInitialize)pictureBios).BeginInit();
panelBiosTitle.SuspendLayout();
panelBios.SuspendLayout();
panelDrivers.SuspendLayout();
panelDriversTitle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureDrivers).BeginInit();
tableLayoutLegend.SuspendLayout();
SuspendLayout();
//
// tableBios
@@ -99,16 +105,16 @@ namespace GHelper
panelBiosTitle.Location = new Point(0, 0);
panelBiosTitle.Margin = new Padding(4);
panelBiosTitle.Name = "panelBiosTitle";
panelBiosTitle.Size = new Size(1294, 62);
panelBiosTitle.Size = new Size(1236, 60);
panelBiosTitle.TabIndex = 3;
//
// labelUpdates
//
labelUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Right;
labelUpdates.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelUpdates.Location = new Point(848, 23);
labelUpdates.Location = new Point(864, 19);
labelUpdates.Name = "labelUpdates";
labelUpdates.Size = new Size(245, 32);
labelUpdates.Size = new Size(302, 32);
labelUpdates.TabIndex = 4;
labelUpdates.Text = "Updates Available";
//
@@ -122,7 +128,7 @@ namespace GHelper
buttonRefresh.FlatAppearance.BorderSize = 0;
buttonRefresh.FlatStyle = FlatStyle.Flat;
buttonRefresh.Image = Properties.Resources.icons8_refresh_32;
buttonRefresh.Location = new Point(1221, 14);
buttonRefresh.Location = new Point(1172, 11);
buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Secondary = true;
buttonRefresh.Size = new Size(52, 46);
@@ -134,11 +140,11 @@ namespace GHelper
panelBios.AutoSize = true;
panelBios.Controls.Add(tableBios);
panelBios.Dock = DockStyle.Top;
panelBios.Location = new Point(0, 62);
panelBios.Location = new Point(0, 60);
panelBios.Margin = new Padding(4);
panelBios.Name = "panelBios";
panelBios.Padding = new Padding(20);
panelBios.Size = new Size(1294, 40);
panelBios.Size = new Size(1236, 40);
panelBios.TabIndex = 4;
//
// panelDrivers
@@ -146,11 +152,11 @@ namespace GHelper
panelDrivers.AutoSize = true;
panelDrivers.Controls.Add(tableDrivers);
panelDrivers.Dock = DockStyle.Top;
panelDrivers.Location = new Point(0, 146);
panelDrivers.Location = new Point(0, 144);
panelDrivers.Margin = new Padding(4);
panelDrivers.Name = "panelDrivers";
panelDrivers.Padding = new Padding(20);
panelDrivers.Size = new Size(1294, 40);
panelDrivers.Size = new Size(1236, 40);
panelDrivers.TabIndex = 6;
//
// tableDrivers
@@ -175,10 +181,10 @@ namespace GHelper
panelDriversTitle.Controls.Add(labelDrivers);
panelDriversTitle.Controls.Add(pictureDrivers);
panelDriversTitle.Dock = DockStyle.Top;
panelDriversTitle.Location = new Point(0, 102);
panelDriversTitle.Location = new Point(0, 100);
panelDriversTitle.Margin = new Padding(4);
panelDriversTitle.Name = "panelDriversTitle";
panelDriversTitle.Size = new Size(1294, 44);
panelDriversTitle.Size = new Size(1236, 44);
panelDriversTitle.TabIndex = 5;
//
// labelDrivers
@@ -203,12 +209,91 @@ namespace GHelper
pictureDrivers.TabIndex = 2;
pictureDrivers.TabStop = false;
//
// tableLayoutLegend
//
tableLayoutLegend.AutoSize = true;
tableLayoutLegend.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutLegend.ColumnCount = 4;
tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15.151515F));
tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F));
tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F));
tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F));
tableLayoutLegend.Controls.Add(labelLegendGreen, 0, 0);
tableLayoutLegend.Controls.Add(labelLegendGray, 0, 0);
tableLayoutLegend.Controls.Add(labelLegendRed, 1, 0);
tableLayoutLegend.Controls.Add(labelLegend, 0, 0);
tableLayoutLegend.Dock = DockStyle.Bottom;
tableLayoutLegend.Location = new Point(0, 608);
tableLayoutLegend.Margin = new Padding(0);
tableLayoutLegend.Name = "tableLayoutLegend";
tableLayoutLegend.Padding = new Padding(10, 0, 10, 20);
tableLayoutLegend.RowCount = 1;
tableLayoutLegend.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutLegend.Size = new Size(1236, 82);
tableLayoutLegend.TabIndex = 7;
//
// labelLegendGreen
//
labelLegendGreen.AutoSize = true;
labelLegendGreen.BackColor = Color.Green;
labelLegendGreen.Dock = DockStyle.Top;
labelLegendGreen.ForeColor = Color.White;
labelLegendGreen.Location = new Point(547, 10);
labelLegendGreen.Margin = new Padding(10);
labelLegendGreen.Name = "labelLegendGreen";
labelLegendGreen.Padding = new Padding(5);
labelLegendGreen.Size = new Size(323, 42);
labelLegendGreen.TabIndex = 4;
labelLegendGreen.Text = "Updated";
//
// labelLegendGray
//
labelLegendGray.AutoSize = true;
labelLegendGray.BackColor = Color.Gray;
labelLegendGray.Dock = DockStyle.Top;
labelLegendGray.ForeColor = Color.White;
labelLegendGray.Location = new Point(204, 10);
labelLegendGray.Margin = new Padding(10);
labelLegendGray.Name = "labelLegendGray";
labelLegendGray.Padding = new Padding(5);
labelLegendGray.Size = new Size(323, 42);
labelLegendGray.TabIndex = 3;
labelLegendGray.Text = "Can't check local version";
//
// labelLegendRed
//
labelLegendRed.AutoSize = true;
labelLegendRed.BackColor = Color.Red;
labelLegendRed.Dock = DockStyle.Top;
labelLegendRed.ForeColor = Color.White;
labelLegendRed.Location = new Point(890, 10);
labelLegendRed.Margin = new Padding(10);
labelLegendRed.Name = "labelLegendRed";
labelLegendRed.Padding = new Padding(5);
labelLegendRed.Size = new Size(326, 42);
labelLegendRed.TabIndex = 1;
labelLegendRed.Text = "Update Available";
//
// labelLegend
//
labelLegend.AutoSize = true;
labelLegend.Dock = DockStyle.Top;
labelLegend.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
labelLegend.Location = new Point(20, 10);
labelLegend.Margin = new Padding(10);
labelLegend.Name = "labelLegend";
labelLegend.Padding = new Padding(5);
labelLegend.Size = new Size(164, 42);
labelLegend.TabIndex = 0;
labelLegend.Text = "Legend";
//
// Updates
//
AutoScaleDimensions = new SizeF(192F, 192F);
AutoScaleMode = AutoScaleMode.Dpi;
AutoScroll = true;
ClientSize = new Size(1294, 690);
ClientSize = new Size(1236, 690);
Controls.Add(tableLayoutLegend);
Controls.Add(panelDrivers);
Controls.Add(panelDriversTitle);
Controls.Add(panelBios);
@@ -229,6 +314,8 @@ namespace GHelper
panelDriversTitle.ResumeLayout(false);
panelDriversTitle.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureDrivers).EndInit();
tableLayoutLegend.ResumeLayout(false);
tableLayoutLegend.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
@@ -247,5 +334,10 @@ namespace GHelper
private PictureBox pictureDrivers;
private RButton buttonRefresh;
private Label labelUpdates;
private TableLayoutPanel tableLayoutLegend;
private Label labelLegend;
private Label labelLegendRed;
private Label labelLegendGray;
private Label labelLegendGreen;
}
}

View File

@@ -54,12 +54,15 @@ namespace GHelper
tableBios.Visible = false;
tableDrivers.Visible = false;
labelLegendGreen.BackColor = colorEco;
labelLegendRed.BackColor = colorTurbo;
ClearTable(tableBios);
ClearTable(tableDrivers);
Task.Run(async () =>
{
DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDBIOS?website=global&model={model}&cpu=", 1, tableBios);
DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDBIOS?website=global&model={model}&cpu={model}", 1, tableBios);
});
Task.Run(async () =>
@@ -230,11 +233,23 @@ namespace GHelper
AutomaticDecompression = DecompressionMethods.All
}))
{
Logger.WriteLine(url);
httpClient.DefaultRequestHeaders.AcceptEncoding.ParseAdd("gzip, deflate, br");
httpClient.DefaultRequestHeaders.Add("User-Agent", "C# App");
var json = await httpClient.GetStringAsync(url);
var data = JsonSerializer.Deserialize<JsonElement>(json);
var result = data.GetProperty("Result");
// fallback for bugged API
if (result.ToString() == "" || result.GetProperty("Obj").GetArrayLength() == 0)
{
var urlFallback = url + "&tag=" + new Random().Next(10, 99);
Logger.WriteLine(urlFallback);
json = await httpClient.GetStringAsync(urlFallback);
data = JsonSerializer.Deserialize<JsonElement>(json);
}
var groups = data.GetProperty("Result").GetProperty("Obj");

View File

@@ -13,7 +13,7 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13
- [Troubleshooting](https://github.com/seerge/g-helper/wiki/Troubleshooting)
- [Power User Settings](https://github.com/seerge/g-helper/wiki/Power-user-settings)
### Support project in [:euro: EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) or [💵 USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY)
### Support project : [:euro: Paypal EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [💵 Paypal USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | [🪙 Stripe](https://buy.stripe.com/00gaFJ9Lf79v7WobII)
[![G-Helper Download](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
@@ -22,6 +22,10 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13
| ----------------- | ---------------- |
| [Josh Cravey](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [cbutters Tech](https://www.youtube.com/watch?v=6aVdwJKZSSc) |
## 📰 Articles
1. https://binaryfork.com/ghelper-armoury-crate-alternative-10216/
2. https://www.digitaltrends.com/computing/g-helper-armoury-crate-alternative/
## :gift: Advantages
1. Seamless and automatic GPU switching
@@ -38,7 +42,7 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13
2. GPU modes: Eco - Standard - Ultimate - Optimized
3. Screen refresh rate control with display overdrive (OD)
4. Custom fan curve editor, power limits and turbo boost selection for every performance mode
5. Anime Matrix or Slash Lightning control including animated GIFs, clock and Audio visualizer
5. Anime Matrix or Slash Lighting control including animated GIFs, clock and Audio visualizer
6. Backlight animation modes and colors
7. Custom hotkeys (M-keys, FN+X keys)
8. Monitor CPU and GPU temperature, fan speeds and battery status
@@ -57,8 +61,6 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13
- Auto Screen refresh rate (60Hz on battery and max Hz when plugged)
- Keyboard backlight timeout on battery or when plugged in
_To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources._
### :rocket: Performance Modes
<img align="right" width="300" src="https://github.com/seerge/g-helper/assets/5920850/3e119674-db8d-486b-aa65-2bf9b61f9aa6">
@@ -113,9 +115,10 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
- ``Shift + M1 / M2`` - Backlight brightness Down / Up
- ``Fn + C`` - Fn-Lock
- ``Fn + Shift + F7 / F8`` - Matrix / Slash Lightning brightness Down / Up
- ``Fn + Shift + F7 / F8`` - Matrix / Slash Lighting brightness Down / Up
- ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up
- ``Ctrl + Shift + F20`` - Mute Microphone
- ``Ctrl + Shift + Alt + F13`` - Toggle Display Refresh Rate
- ``Ctrl + Shift + Alt + F14`` - Eco GPU Mode
- ``Ctrl + Shift + Alt + F15`` - Standard GPU Mode
- ``Ctrl + Shift + Alt + F16`` - Silent
@@ -153,7 +156,7 @@ If you use equivalent mode/settings as in Armoury Crate - the performance or the
The role of G-Helper for your laptop is similar to the role of a remote control for your TV.
### Libraries and projects used
- [Linux Kernel](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c) for some basic endpoints in ASUS ACPI/WMI interface
- [Linux Kernel](https://github.com/torvalds/linux/blob/master/include/linux/platform_data/x86/asus-wmi.h) for some basic endpoints in ASUS ACPI/WMI interface
- [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API
- [Starlight](https://github.com/vddCore/Starlight) for anime matrix communication protocol
- [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) for undervolting using Ryzen System Management Unit