Compare commits

...

50 Commits

Author SHA1 Message Date
Serge
8c5f4aa0f3 Handheld form behavior 2024-01-27 12:06:46 +01:00
Serge
6f861957df Version Bump 2024-01-27 11:51:27 +01:00
Serge
8884b0d844 XBox controller toggle 2024-01-27 11:50:13 +01:00
Serge
2987d750e3 XBox controller disable / enable toggle 2024-01-27 11:44:07 +01:00
Serge
b5e160bc00 Bindings UI 2024-01-26 21:23:22 +01:00
Serge
fb33f426d3 Binding UI 2024-01-26 20:43:51 +01:00
Serge
163b35d6b0 Advanced Settings Plugin downloader fixes 2024-01-26 18:21:47 +01:00
Serge
325c6ff3ea Advanced Settings Plugin downloader tweaks 2024-01-26 18:10:11 +01:00
Serge
7b34ec4a8c Update release.yml 2024-01-26 17:59:29 +01:00
Serge
31b535a582 Update README.md 2024-01-26 17:52:37 +01:00
Serge
1fa2442023 Update README.md 2024-01-26 17:15:29 +01:00
Serge
39cc2b7563 Update README.md 2024-01-26 17:14:56 +01:00
Serge
8a37520453 Advanced Settings Plugin downloader 2024-01-26 15:01:14 +01:00
Serge
fbfbe8e730 Ally Backlight control 2024-01-25 16:54:34 +01:00
Serge
545e2cc705 Update feature_request.yml 2024-01-25 11:40:54 +01:00
Serge
a27b02ff62 Delete .github/ISSUE_TEMPLATE/feature_request.md 2024-01-25 11:35:35 +01:00
Serge
06bfe8361d Create feature_request.yml 2024-01-25 11:35:16 +01:00
Serge
8531d903bb Minor tweaks 2024-01-24 23:00:06 +01:00
Serge
a3768bcedf Anime Matrix tweaks https://github.com/seerge/g-helper/issues/1648 2024-01-24 18:49:57 +01:00
Serge
ef1a823294 Update README.md 2024-01-23 13:17:00 +01:00
Serge
5e49c2e699 Update README.md 2024-01-23 13:16:40 +01:00
Serge
bbe1fd3d9f Aura tweaks for 2024 models 2024-01-23 11:08:46 +01:00
Serge
fff52f3f5c Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-22 10:52:28 +01:00
Serge
bb10fff4e2 Aura tweaks 2024-01-22 10:52:26 +01:00
Serge
5b3947c580 New Crowdin updates (#1963)
* New translations strings.resx (Portuguese)

* New translations strings.resx (Romanian)

* New translations strings.resx (Chinese Traditional)

* New translations strings.resx (French)

* New translations strings.resx (Spanish)

* New translations strings.resx (German)

* New translations strings.resx (Hungarian)

* New translations strings.resx (Italian)

* New translations strings.resx (Korean)

* New translations strings.resx (Lithuanian)

* New translations strings.resx (Polish)

* New translations strings.resx (Turkish)

* New translations strings.resx (Ukrainian)

* New translations strings.resx (Chinese Simplified)

* New translations strings.resx (Vietnamese)

* New translations strings.resx (Portuguese, Brazilian)

* New translations strings.resx (Indonesian)

* New translations strings.resx (Spanish)
2024-01-21 19:31:05 +01:00
Serge
76e547c2dc UI Tweaks 2024-01-21 18:44:46 +01:00
Serge
d635dc275f Removed notification if XGM toggle happens via hotkey 2024-01-21 18:23:01 +01:00
Serge
5b96757939 Ally XGM binding 2024-01-21 15:47:49 +01:00
Serge
3fbd833e21 XGM binding for Ally https://github.com/seerge/g-helper/issues/1964 2024-01-21 15:35:56 +01:00
Serge
a3fd1a2703 Ally Show Desktop / Mic Mute 2024-01-21 13:38:26 +01:00
Serge
72dea26fde New Ally bindings and Touch Keyboard Support 2024-01-21 13:31:48 +01:00
Serge
6e3fde8537 Multizone Toggle UI 2024-01-20 16:28:43 +01:00
Serge
f8624c8954 Miniled / Multizone Toggle for 2024 models https://github.com/seerge/g-helper/issues/1957 2024-01-20 15:55:04 +01:00
Serge
ce0a1c0ed2 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-20 12:46:37 +01:00
Serge
1b25017c18 Ally bindings 2024-01-20 12:46:35 +01:00
Serge
0ac1a44800 Update bug_report.yml 2024-01-20 01:29:55 +01:00
Serge
d8bf8ed463 Start/Stop for AC services on Ally 2024-01-19 20:39:50 +01:00
Serge
8b26e9aeba Ally bindings 2024-01-19 18:26:20 +01:00
Serge
42ccbe8783 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-19 11:45:36 +01:00
Serge
f1ef397ada Backlight checkboxes fix for some Strix models https://github.com/seerge/g-helper/issues/1943 2024-01-19 11:45:33 +01:00
Serge
97f2cc4332 New Crowdin updates (#1945)
* New translations strings.resx (Chinese Traditional)

* New translations strings.resx (Chinese Traditional)
2024-01-18 20:44:39 +01:00
Serge
b4039e1301 Merge branch 'main' of https://github.com/seerge/g-helper 2024-01-18 15:08:16 +01:00
Serge
dedb2123f0 Battery Discharge reader 2024-01-18 15:08:13 +01:00
Serge
6d56bc1231 Update README.md 2024-01-18 10:09:40 +01:00
Serge
f0d8987806 Update README.md 2024-01-17 23:02:49 +01:00
Serge
c4ccdbe737 Update README.md 2024-01-17 23:02:20 +01:00
Serge
5607e4faec Update README.md 2024-01-17 22:57:13 +01:00
Serge
8eb920313d Update README.md 2024-01-17 18:04:29 +01:00
Serge
6479079212 Hotkeys for switching modes https://github.com/seerge/g-helper/issues/1931 2024-01-17 17:53:35 +01:00
Serge
db3804414e Reset clock limit https://github.com/seerge/g-helper/issues/1915 2024-01-17 17:42:42 +01:00
58 changed files with 2231 additions and 939 deletions

View File

@@ -12,7 +12,7 @@ body:
options: options:
- label: I made myself familiar with the <a href='https://github.com/seerge/g-helper?tab=readme-ov-file'>Readme</a>, <a href='https://github.com/seerge/g-helper/wiki/FAQ'>FAQ</a> and <a href='https://github.com/seerge/g-helper/wiki/Troubleshooting'>Troubleshooting</a>. - label: I made myself familiar with the <a href='https://github.com/seerge/g-helper?tab=readme-ov-file'>Readme</a>, <a href='https://github.com/seerge/g-helper/wiki/FAQ'>FAQ</a> and <a href='https://github.com/seerge/g-helper/wiki/Troubleshooting'>Troubleshooting</a>.
required: true required: true
- label: I understand that, if insufficient information was provided, my issue will be closed without an answer. - label: I understand that, if insufficient information or no app logs will be provided, my issue will be closed without an answer.
required: true required: true
validations: validations:
required: true required: true

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,46 @@
name: Feature request
description: Suggest an idea for this project
body:
- type: checkboxes
id: rules
attributes:
label: Rules
options:
- label: I made myself familiar with the <a href='https://github.com/seerge/g-helper?tab=readme-ov-file'>Readme</a>, <a href='https://github.com/seerge/g-helper/wiki/FAQ'>FAQ</a> and <a href='https://github.com/seerge/g-helper/wiki/Troubleshooting'>Troubleshooting</a>.
required: true
- label: I understand that, if insufficient information will be provided, my issue will be closed without an answer.
required: true
validations:
required: true
- type: textarea
id: description
attributes:
label: Is your feature request related to a problem? Please describe
placeholder: A clear and concise description of what the problem is.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
- type: input
id: device
attributes:
label: Device and Model
description: Which laptop do you use?
placeholder: e.g. Asus Zephyrus G14 GA404RK
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional information.
placeholder: If applicable, add screenshots or other relevant information

View File

@@ -22,9 +22,10 @@ jobs:
- name: Publish - name: Publish
run: | run: |
dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/* GHelper.zip powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/GHelper.exe GHelper.zip
powershell Compress-Archive app/bin/x64/Release/net7.0-windows/win-x64/publish/WinRing* PluginAdvancedSettings.zip
- name: Upload - name: Upload
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
run: | run: |
gh release upload ${{ github.ref_name }} GHelper.zip gh release upload ${{ github.ref_name }} GHelper.zip PluginAdvancedSettings.zip

View File

@@ -1,5 +1,6 @@
using GHelper.Gpu.AMD; using GHelper.Gpu.AMD;
using GHelper.Input; using GHelper.Input;
using GHelper.Mode;
using GHelper.USB; using GHelper.USB;
using HidSharp; using HidSharp;
using System.Text; using System.Text;
@@ -13,6 +14,7 @@ namespace GHelper.Ally
Gamepad = 1, Gamepad = 1,
WASD = 2, WASD = 2,
Mouse = 3, Mouse = 3,
Skip = -1,
} }
public enum BindingZone : byte public enum BindingZone : byte
@@ -41,40 +43,76 @@ namespace GHelper.Ally
static int fpsLimit = -1; static int fpsLimit = -1;
public const int BindA = 0x0101; public const string BindA = "01-01";
public const int BindB = 0x0102; public const string BindB = "01-02";
public const string BindX = "01-03";
public const string BindY = "01-04";
public const string BindLB = "01-05";
public const string BindRB = "01-06";
public const string BindLS = "01-07";
public const string BindRS = "01-08";
public const string BindDU = "01-09";
public const string BindDD = "01-0A";
public const string BindDL = "01-0B";
public const string BindDR = "01-0C";
public const string BindVB = "01-11";
public const string BindMB = "01-12";
public const string BindM1 = "02-8F";
public const string BindM2 = "02-8E";
public const string BindLT = "01-0D";
public const string BindRT = "01-0E";
public const string BindXB = "01-13";
public const int BindX = 0x0103; public const string BindMouseL = "03-01";
public const int BindY = 0x0104; public const string BindMouseR = "03-02";
public const int BindLB = 0x0105; public const string BindKBU = "02-98";
public const int BindRB = 0x0106; public const string BindKBD = "02-99";
public const string BindKBL = "02-9A";
public const string BindKBR = "02-9B";
public const int BindLS = 0x0107; public const string BindTab = "02-0D";
public const int BindRS = 0x0108; public const string BindEnter = "02-5A";
public const string BindBack = "02-66";
public const string BindEsc = "02-76";
public const int BindDU = 0x0109; public const string BindPgU = "02-96";
public const int BindDD = 0x010A; public const string BindPgD = "02-97";
public const int BindDL = 0x010B; public const string BindShift = "02-88";
public const int BindDR = 0x010C; public const string BindCtrl = "02-8C";
public const string BindAlt = "02-8A";
public const string BindWin = "02-82";
public const int BindVB = 0x0111; public const string BindTaskManager = "04-03-8C-88-76";
public const int BindMB = 0x0112; public const string BindCloseWindow = "04-02-8A-0C";
public const int BindM1 = 0x028f; public const string BindBrightnessDown = "04-04-8C-88-8A-05";
public const int BindM2 = 0x028e; public const string BindBrightnessUp = "04-04-8C-88-8A-06";
public const string BindXGM = "04-04-8C-88-8A-04";
public const int BindLT = 0x010d; public const string BindOverlay = "04-03-8C-88-44";
public const int BindRT = 0x010e;
public const string BindShiftTab = "04-02-88-0D";
public const string BindAltTab = "04-02-8A-0D";
public const string BindVolUp = "05-03";
public const string BindVolDown = "05-02";
public const string BindPrintScrn = "02-C3";
public const string BindScreenshot = "04-03-82-88-1B";
public const string BindShowDesktop = "04-02-82-23";
public const string BindShowKeyboard = "05-19";
static byte[] CommandReady = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0a, 0x01 }; static byte[] CommandReady = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0a, 0x01 };
static byte[] CommandSave = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0f, 0x20 }; static byte[] CommandSave = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0f, 0x20 };
public static Dictionary<int, string> BindCodes = new Dictionary<int, string> public static Dictionary<string, string> BindCodes = new Dictionary<string, string>
{ {
{ -1, "--------" }, { "", "--------" },
{ 0x0000, "[ Disabled ]" }, { "00-00", "[ Disabled ]" },
{ BindM1, "M1" }, { BindM1, "M1" },
{ BindM2, "M2" }, { BindM2, "M2" },
@@ -100,122 +138,140 @@ namespace GHelper.Ally
{ BindVB, "View Button" }, { BindVB, "View Button" },
{ BindMB, "Menu Button" }, { BindMB, "Menu Button" },
{ 0x0113, "XBox/Steam" }, { BindXB, "XBox/Steam" },
{ 0x0276, "Esc" }, { BindVolUp, "Vol Up" },
{ 0x0250, "F1" }, { BindVolDown, "Vol Down" },
{ 0x0260, "F2" }, { BindBrightnessUp, "Bright Up" },
{ 0x0240, "F3" }, { BindBrightnessDown, "Bright Down" },
{ 0x020C, "F4" },
{ 0x0203, "F5" },
{ 0x020b, "F6" },
{ 0x0280, "F7" },
{ 0x020a, "F8" },
{ 0x0201, "F9" },
{ 0x0209, "F10" },
{ 0x0278, "F11" },
{ 0x0207, "F12" },
{ 0x020E, "`" },
{ 0x0216, "1" },
{ 0x021E, "2" },
{ 0x0226, "3" },
{ 0x0225, "4" },
{ 0x022E, "5" },
{ 0x0236, "6" },
{ 0x023D, "7" },
{ 0x023E, "8" },
{ 0x0246, "9" },
{ 0x0245, "0" },
{ 0x024E, "-" },
{ 0x0255, "=" },
{ 0x0266, "Backspace" },
{ 0x020D, "Tab" },
{ 0x0215, "Q" },
{ 0x021D, "W" },
{ 0x0224, "E" },
{ 0x022D, "R" },
{ 0x022C, "T" },
{ 0x0235, "Y" },
{ 0x023C, "U" },
{ 0x0244, "O" },
{ 0x024D, "P" },
{ 0x0254, "[" },
{ 0x025B, "]" },
{ 0x025D, "|" },
{ 0x0258, "Caps" },
{ 0x021C, "A" },
{ 0x021B, "S" },
{ 0x0223, "D" },
{ 0x022B, "F" },
{ 0x0234, "G" },
{ 0x0233, "H" },
{ 0x023B, "J" },
{ 0x0242, "k" },
{ 0x024b, "l" },
{ 0x024c, ";" },
{ 0x0252, "'" },
{ 0x025A, "Enter" },
{ 0x0288, "LShift" },
{ 0x0222, "X" },
{ 0x021A, "Z" },
{ 0x0221, "C" },
{ 0x022A, "V" },
{ 0x0232, "B" },
{ 0x0231, "N" },
{ 0x023A, "M" },
{ 0x0241, "," },
{ 0x0249, "." },
{ 0x0289, "RShift" },
{ 0x028C, "LCtl" },
{ 0x0282, "Meta" },
{ 0x028A, "LAlt" },
{ 0x0229, "Space" },
{ 0x028B, "RAlt" },
{ 0x0284, "App menu" },
{ 0x028D, "RCtl" },
{ 0x02C3, "PrntScn" },
{ 0x027E, "ScrLk" },
{ 0x02C2, "Insert" },
{ 0x0294, "Home" },
{ 0x0296, "PgUp" },
{ 0x02C0, "Delete" },
{ 0x0295, "End" },
{ 0x0297, "PgDwn" },
{ 0x0298, "UpArrow" },
{ 0x0299, "DownArrow" },
{ 0x0291, "LeftArrow" },
{ 0x029B, "RightArrow" },
{ 0x0277, "NumLock" },
{ 0x0290, "NumSlash" },
{ 0x027C, "NumStar" },
{ 0x027B, "NumHyphen" },
{ 0x0270, "Num0" },
{ 0x0269, "Num1" },
{ 0x0272, "Num2" },
{ 0x027A, "Num3" },
{ 0x026B, "Num4" },
{ 0x0273, "Num5" },
{ 0x0274, "Num6" },
{ 0x026C, "Num7" },
{ 0x0275, "Num8" },
{ 0x027D, "Num9" },
{ 0x0279, "NumPlus" },
{ 0x0281, "NumEnter" },
{ 0x0271, "NumPeriod" },
{ 0x0301, "Mouse left click" }, { BindShowKeyboard, "Show Keyboard" },
{ 0x0302, "Mouse right click" }, { BindShowDesktop, "Show Desktop" },
{ 0x0303, "Mouse middle click" }, { BindScreenshot, "Screenshot" },
{ 0x0304, "Mouse scroll up" },
{ 0x0305, "Mouse scroll down" }, { BindOverlay, "AMD Overlay" },
{ BindTaskManager, "Task Manager" },
{ BindCloseWindow, "Close Window" },
{ BindShiftTab, "Shift-Tab" },
{ BindAltTab, "Alt-Tab" },
{ BindXGM, "XGM Toggle" },
{ BindEsc, "Esc" },
{ BindBack, "Backspace" },
{ BindTab, "Tab" },
{ BindEnter, "Enter" },
{ BindShift, "LShift" },
{ BindAlt, "LAlt" },
{ BindCtrl, "LCtl" },
{ BindWin, "WIN" },
{ BindPrintScrn, "PrntScn" },
{ BindPgU, "PgUp" },
{ BindPgD, "PgDwn" },
{ BindKBU, "UpArrow" },
{ BindKBD, "DownArrow" },
{ BindKBL, "LeftArrow" },
{ BindKBR, "RightArrow" },
{ "02-05", "F1" },
{ "02-06", "F2" },
{ "02-04", "F3" },
{ "02-0C", "F4" },
{ "02-03", "F5" },
{ "02-0B", "F6" },
{ "02-80", "F7" },
{ "02-0A", "F8" },
{ "02-01", "F9" },
{ "02-09", "F10" },
{ "02-78", "F11" },
{ "02-07", "F12" },
{ "02-0E", "`" },
{ "02-16", "1" },
{ "02-1E", "2" },
{ "02-26", "3" },
{ "02-25", "4" },
{ "02-2E", "5" },
{ "02-36", "6" },
{ "02-3D", "7" },
{ "02-3E", "8" },
{ "02-46", "9" },
{ "02-45", "0" },
{ "02-4E", "-" },
{ "02-55", "=" },
{ "02-15", "Q" },
{ "02-1D", "W" },
{ "02-24", "E" },
{ "02-2D", "R" },
{ "02-2C", "T" },
{ "02-35", "Y" },
{ "02-3C", "U" },
{ "02-44", "O" },
{ "02-4D", "P" },
{ "02-54", "[" },
{ "02-5B", "]" },
{ "02-5D", "|" },
{ "02-58", "Caps" },
{ "02-1C", "A" },
{ "02-1B", "S" },
{ "02-23", "D" },
{ "02-2B", "F" },
{ "02-34", "G" },
{ "02-33", "H" },
{ "02-3B", "J" },
{ "02-42", "k" },
{ "02-4B", "l" },
{ "02-4C", ";" },
{ "02-52", "'" },
{ "02-22", "X" },
{ "02-1A", "Z" },
{ "02-21", "C" },
{ "02-2A", "V" },
{ "02-32", "B" },
{ "02-31", "N" },
{ "02-3A", "M" },
{ "02-41", "," },
{ "02-49", "." },
{ "02-89", "RShift" },
{ "02-29", "Space" },
{ "02-8B", "RAlt" },
{ "02-84", "App menu" },
{ "02-8D", "RCtl" },
{ "02-7E", "ScrLk" },
{ "02-C2", "Insert" },
{ "02-C0", "Delete" },
{ "02-94", "Home" },
{ "02-95", "End" },
{ "02-77", "NumLock" },
{ "02-90", "NumSlash" },
{ "02-7C", "NumStar" },
{ "02-7B", "NumHyphen" },
{ "02-70", "Num0" },
{ "02-69", "Num1" },
{ "02-72", "Num2" },
{ "02-7A", "Num3" },
{ "02-6B", "Num4" },
{ "02-73", "Num5" },
{ "02-74", "Num6" },
{ "02-6C", "Num7" },
{ "02-75", "Num8" },
{ "02-7D", "Num9" },
{ "02-79", "NumPlus" },
{ "02-81", "NumEnter" },
{ "02-71", "NumPeriod" },
{ BindMouseL, "Mouse left click" },
{ BindMouseR, "Mouse right click" },
{ "03-03", "Mouse middle click" },
{ "03-04", "Mouse scroll up" },
{ "03-05", "Mouse scroll down" },
//{ "05-16", "Screenshot" },
//{ "05-1C", "Show desktop" },
{ "05-1E", "Begin recording" },
{ "05-01", "Mic off" },
{ 0x0516, "Screenshot" },
{ 0x0519, "Show keyboard" },
{ 0x051c, "Show desktop" },
{ 0x051e, "Begin recording" },
{ 0x0501, "Mic off" },
{ 0x0502, "Vol Down" },
{ 0x0503, "Vol Up" }
}; };
public AllyControl(SettingsForm settingsForm) public AllyControl(SettingsForm settingsForm)
@@ -266,14 +322,20 @@ namespace GHelper.Ally
switch (fpsLimit) switch (fpsLimit)
{ {
case 30: case 30:
fpsLimit = 40; fpsLimit = 45;
break; break;
case 40: case 45:
fpsLimit = 60; fpsLimit = 60;
break; break;
case 60: case 60:
fpsLimit = 90;
break;
case 90:
fpsLimit = 120; fpsLimit = 120;
break; break;
case 120:
fpsLimit = 240;
break;
default: default:
fpsLimit = 30; fpsLimit = 30;
break; break;
@@ -293,29 +355,40 @@ namespace GHelper.Ally
settings.VisualiseBacklight(InputDispatcher.GetBacklight()); settings.VisualiseBacklight(InputDispatcher.GetBacklight());
} }
static private byte[] DecodeBinding(int binding) static private byte[] DecodeBinding(string binding = "")
{ {
byte[] bytes;
if (binding < 0) return new byte[2]; if (binding == "" || binding is null) return new byte[2];
byte command = (byte)(binding & 0xFF); try
byte device = (byte)((binding >> 8) & 0xFF); {
bytes = AppConfig.StringToBytes(binding);
}
catch
{
return new byte[2];
}
byte[] code = new byte[10]; byte[] code = new byte[10];
code[0] = device; code[0] = bytes[0];
switch (device)
switch (bytes[0])
{ {
case 0x02: case 0x02:
code[2] = command; code[2] = bytes[1];
break; break;
case 0x03: case 0x03:
code[4] = command; code[4] = bytes[1];
break;
case 0x04:
bytes.Skip(1).ToArray().CopyTo(code, 5);
break; break;
case 0x05: case 0x05:
code[3] = command; code[3] = bytes[1];
break; break;
default: default:
code[1] = command; code[1] = bytes[1];
break; break;
} }
@@ -324,70 +397,72 @@ namespace GHelper.Ally
static private void BindZone(BindingZone zone) static private void BindZone(BindingZone zone)
{ {
int KeyL1, KeyR1; string KeyL1, KeyR1;
int KeyL2, KeyR2; string KeyL2, KeyR2;
bool desktop = (_applyMode == ControllerMode.Mouse);
switch (zone) switch (zone)
{ {
case BindingZone.DPadUpDown: case BindingZone.DPadUpDown:
KeyL1 = AppConfig.Get("bind_du", BindDU); KeyL1 = AppConfig.GetString("bind_du", desktop ? BindKBU : BindDU);
KeyR1 = AppConfig.Get("bind_dd", BindDD); KeyR1 = AppConfig.GetString("bind_dd", desktop ? BindKBD : BindDD);
KeyL2 = AppConfig.Get("bind2_du"); KeyL2 = AppConfig.GetString("bind2_du", BindShowKeyboard);
KeyR2 = AppConfig.Get("bind2_dd"); KeyR2 = AppConfig.GetString("bind2_dd", BindShowDesktop);
break; break;
case BindingZone.DPadLeftRight: case BindingZone.DPadLeftRight:
KeyL1 = AppConfig.Get("bind_dl", BindDL); KeyL1 = AppConfig.GetString("bind_dl", desktop ? BindKBL : BindDL);
KeyR1 = AppConfig.Get("bind_dr", BindDR); KeyR1 = AppConfig.GetString("bind_dr", desktop ? BindKBR : BindDR);
KeyL2 = AppConfig.Get("bind2_dl"); KeyL2 = AppConfig.GetString("bind2_dl", BindBrightnessDown);
KeyR2 = AppConfig.Get("bind2_dr"); KeyR2 = AppConfig.GetString("bind2_dr", BindBrightnessUp);
break; break;
case BindingZone.StickClick: case BindingZone.StickClick:
KeyL1 = AppConfig.Get("bind_ls", BindLS); KeyL1 = AppConfig.GetString("bind_ls", desktop ? BindShift : BindLS);
KeyR1 = AppConfig.Get("bind_rs", BindRS); KeyR1 = AppConfig.GetString("bind_rs", desktop ? BindMouseL : BindRS);
KeyL2 = AppConfig.Get("bind2_ls"); KeyL2 = AppConfig.GetString("bind2_ls");
KeyR2 = AppConfig.Get("bind2_rs"); KeyR2 = AppConfig.GetString("bind2_rs");
break; break;
case BindingZone.Bumper: case BindingZone.Bumper:
KeyL1 = AppConfig.Get("bind_lb", BindLB); KeyL1 = AppConfig.GetString("bind_lb", desktop ? BindTab : BindLB);
KeyR1 = AppConfig.Get("bind_rb", BindRB); KeyR1 = AppConfig.GetString("bind_rb", desktop ? BindMouseL : BindRB);
KeyL2 = AppConfig.Get("bind2_lb"); KeyL2 = AppConfig.GetString("bind2_lb");
KeyR2 = AppConfig.Get("bind2_rb"); KeyR2 = AppConfig.GetString("bind2_rb");
break; break;
case BindingZone.AB: case BindingZone.AB:
KeyL1 = AppConfig.Get("bind_a", BindA); KeyL1 = AppConfig.GetString("bind_a", desktop ? BindEnter : BindA);
KeyR1 = AppConfig.Get("bind_b", BindB); KeyR1 = AppConfig.GetString("bind_b", desktop ? BindEsc : BindB);
KeyL2 = AppConfig.Get("bind2_a"); KeyL2 = AppConfig.GetString("bind2_a");
KeyR2 = AppConfig.Get("bind2_b"); KeyR2 = AppConfig.GetString("bind2_b");
break; break;
case BindingZone.XY: case BindingZone.XY:
KeyL1 = AppConfig.Get("bind_x", BindX); KeyL1 = AppConfig.GetString("bind_x", desktop ? BindPgD : BindX);
KeyR1 = AppConfig.Get("bind_y", BindY); KeyR1 = AppConfig.GetString("bind_y", desktop ? BindPgU : BindY);
KeyL2 = AppConfig.Get("bind2_x"); KeyL2 = AppConfig.GetString("bind2_x", BindScreenshot);
KeyR2 = AppConfig.Get("bind2_y"); KeyR2 = AppConfig.GetString("bind2_y", BindOverlay);
break; break;
case BindingZone.ViewMenu: case BindingZone.ViewMenu:
KeyL1 = AppConfig.Get("bind_vb", BindVB); KeyL1 = AppConfig.GetString("bind_vb", BindVB);
KeyR1 = AppConfig.Get("bind_mb", BindMB); KeyR1 = AppConfig.GetString("bind_mb", BindMB);
KeyL2 = AppConfig.Get("bind2_vb"); KeyL2 = AppConfig.GetString("bind2_vb");
KeyR2 = AppConfig.Get("bind2_mb"); KeyR2 = AppConfig.GetString("bind2_mb");
break; break;
case BindingZone.M1M2: case BindingZone.M1M2:
KeyL1 = AppConfig.Get("bind_m2", BindM2); KeyL1 = AppConfig.GetString("bind_m2", BindM2);
KeyR1 = AppConfig.Get("bind_m1", BindM1); KeyR1 = AppConfig.GetString("bind_m1", BindM1);
KeyL2 = AppConfig.Get("bind2_m2", BindM2); KeyL2 = AppConfig.GetString("bind2_m2", BindM2);
KeyR2 = AppConfig.Get("bind2_m1", BindM1); KeyR2 = AppConfig.GetString("bind2_m1", BindM1);
break; break;
default: default:
KeyL1 = AppConfig.Get("bind_trl", BindLT); KeyL1 = AppConfig.GetString("bind_trl", desktop ? BindShiftTab : BindLT);
KeyR1 = AppConfig.Get("bind_trr", BindRT); KeyR1 = AppConfig.GetString("bind_trr", desktop ? BindMouseR : BindRT);
KeyL2 = AppConfig.Get("bind2_trl"); KeyL2 = AppConfig.GetString("bind2_trl");
KeyR2 = AppConfig.Get("bind2_trr"); KeyR2 = AppConfig.GetString("bind2_trr");
break; break;
} }
if (KeyL1 == -1 && KeyR1 == -1) return; if (KeyL1 == "" && KeyR1 == "") return;
byte[] bindings = new byte[64]; byte[] bindings = new byte[50];
byte[] init = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x02, (byte)zone, 0x2c }; byte[] init = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x02, (byte)zone, 0x2c };
init.CopyTo(bindings, 0); init.CopyTo(bindings, 0);
@@ -399,7 +474,7 @@ namespace GHelper.Ally
DecodeBinding(KeyR2).CopyTo(bindings, 38); DecodeBinding(KeyR2).CopyTo(bindings, 38);
AsusHid.WriteInput(CommandReady, null); AsusHid.WriteInput(CommandReady, null);
AsusHid.WriteInput(bindings, $"Bind{zone}"); AsusHid.WriteInput(bindings, $"B{zone}");
@@ -435,9 +510,17 @@ namespace GHelper.Ally
} }
public static void ApplyXBoxStatus()
{
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, AppConfig.Is("controller_disabled") ? (byte)0x02 : (byte)0x01 }, "Status");
}
public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto) public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto)
{ {
Task.Run(() => { Task.Run(() =>
{
if (applyMode == ControllerMode.Skip) return;
HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID); HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
int count = 0; int count = 0;
@@ -456,27 +539,26 @@ namespace GHelper.Ally
if (applyMode != ControllerMode.Auto) _applyMode = applyMode; if (applyMode != ControllerMode.Auto) _applyMode = applyMode;
InputDispatcher.SetBacklightAuto(true);
WakeUp(); WakeUp();
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 0x01, 0x01, (byte)_applyMode }, "Controller"); AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode }, "Controller");
AsusHid.WriteInput(CommandSave, null); AsusHid.WriteInput(CommandSave, null);
BindZone(BindingZone.M1M2); BindZone(BindingZone.M1M2);
if (_applyMode == ControllerMode.Gamepad) BindZone(BindingZone.DPadUpDown);
{ BindZone(BindingZone.DPadLeftRight);
BindZone(BindingZone.DPadUpDown); BindZone(BindingZone.StickClick);
BindZone(BindingZone.DPadLeftRight); BindZone(BindingZone.Bumper);
BindZone(BindingZone.StickClick); BindZone(BindingZone.AB);
BindZone(BindingZone.Bumper); BindZone(BindingZone.XY);
BindZone(BindingZone.AB); BindZone(BindingZone.ViewMenu);
BindZone(BindingZone.XY); BindZone(BindingZone.Trigger);
BindZone(BindingZone.ViewMenu);
BindZone(BindingZone.Trigger);
}
AsusHid.WriteInput(CommandSave, null); AsusHid.WriteInput(CommandSave, null);
SetDeadzones(); SetDeadzones();
}); });
} }
@@ -484,9 +566,10 @@ namespace GHelper.Ally
{ {
_mode = mode; _mode = mode;
ApplyMode(mode);
AppConfig.Set("controller_mode", (int)mode); AppConfig.Set("controller_mode", (int)mode);
ApplyMode(mode);
if (mode == ControllerMode.Auto) if (mode == ControllerMode.Auto)
{ {
amdControl.StartFPS(); amdControl.StartFPS();
@@ -497,13 +580,12 @@ namespace GHelper.Ally
timer.Stop(); timer.Stop();
amdControl.StopFPS(); amdControl.StopFPS();
} }
settings.VisualiseController(mode); settings.VisualiseController(mode);
} }
public void ToggleMode() public void ToggleMode()
{ {
switch (_mode) switch (_mode)
{ {
case ControllerMode.Auto: case ControllerMode.Auto:
@@ -513,10 +595,12 @@ namespace GHelper.Ally
SetMode(ControllerMode.Mouse); SetMode(ControllerMode.Mouse);
break; break;
case ControllerMode.Mouse: case ControllerMode.Mouse:
SetMode(ControllerMode.Skip);
break;
case ControllerMode.Skip:
SetMode(ControllerMode.Auto); SetMode(ControllerMode.Auto);
break; break;
} }
} }
} }

View File

@@ -4,7 +4,6 @@ using Starlight.AnimeMatrix;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO;
using System.Timers; using System.Timers;
namespace GHelper.AnimeMatrix namespace GHelper.AnimeMatrix
@@ -69,49 +68,51 @@ namespace GHelper.AnimeMatrix
StopMatrixTimer(); StopMatrixTimer();
StopMatrixAudio(); StopMatrixAudio();
try Task.Run(() =>
{ {
device.SetProvider(); try
}
catch (Exception ex)
{
Logger.WriteLine(ex.Message);
return;
}
if (wakeUp && AppConfig.ContainsModel("401")) device.WakeUp();
if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online))
{
device.SetDisplayState(false);
device.SetDisplayState(false); // some devices are dumb
Logger.WriteLine("Matrix Off");
}
else
{
device.SetDisplayState(true);
device.SetBrightness((BrightnessMode)brightness);
switch (running)
{ {
case 2: device.SetProvider();
SetMatrixPicture(AppConfig.GetString("matrix_picture")); }
break; catch (Exception ex)
case 3: {
SetMatrixClock(); Logger.WriteLine(ex.Message);
break; return;
case 4:
SetMatrixAudio();
break;
default:
device.SetBuiltInAnimation(true, animation);
Logger.WriteLine("Matrix builtin " + animation.AsByte);
break;
} }
//mat.SetBrightness((BrightnessMode)brightness); if (wakeUp && AppConfig.ContainsModel("401")) device.WakeUp();
}
if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online))
{
device.SetDisplayState(false);
device.SetDisplayState(false); // some devices are dumb
Logger.WriteLine("Matrix Off");
}
else
{
device.SetDisplayState(true);
device.SetBrightness((BrightnessMode)brightness);
switch (running)
{
case 2:
SetMatrixPicture(AppConfig.GetString("matrix_picture"));
break;
case 3:
SetMatrixClock();
break;
case 4:
SetMatrixAudio();
break;
default:
device.SetBuiltInAnimation(true, animation);
Logger.WriteLine("Matrix builtin " + animation.AsByte);
break;
}
}
});
} }
private void StartMatrixTimer(int interval = 100) private void StartMatrixTimer(int interval = 100)
@@ -358,10 +359,10 @@ namespace GHelper.AnimeMatrix
int matrixZoom = AppConfig.Get("matrix_zoom", 100); int matrixZoom = AppConfig.Get("matrix_zoom", 100);
int matrixContrast = AppConfig.Get("matrix_contrast", 100); int matrixContrast = AppConfig.Get("matrix_contrast", 100);
int matrixSpeed = AppConfig.Get("matrix_speed", 50); int matrixSpeed = AppConfig.Get("matrix_speed", 50);
MatrixRotation rotation = (MatrixRotation)AppConfig.Get("matrix_rotation", 0); MatrixRotation rotation = (MatrixRotation)AppConfig.Get("matrix_rotation", 0);
InterpolationMode matrixQuality = (InterpolationMode)AppConfig.Get("matrix_quality", 0); InterpolationMode matrixQuality = (InterpolationMode)AppConfig.Get("matrix_quality", 0);
@@ -382,7 +383,7 @@ namespace GHelper.AnimeMatrix
device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); device.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
else else
device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); device.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast);
device.AddFrame(); device.AddFrame();
} }

View File

@@ -3,7 +3,6 @@
using GHelper.AnimeMatrix.Communication; using GHelper.AnimeMatrix.Communication;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Drawing.Text; using System.Drawing.Text;
using System.Management;
using System.Text; using System.Text;
namespace Starlight.AnimeMatrix namespace Starlight.AnimeMatrix
@@ -107,9 +106,7 @@ namespace Starlight.AnimeMatrix
public AnimeMatrixDevice() : base(0x0B05, 0x193B, 640) public AnimeMatrixDevice() : base(0x0B05, 0x193B, 640)
{ {
string model = GetModel(); if (AppConfig.ContainsModel("401"))
if (model.Contains("401"))
{ {
_model = AnimeType.GA401; _model = AnimeType.GA401;
@@ -124,7 +121,7 @@ namespace Starlight.AnimeMatrix
LedStart = 1; LedStart = 1;
} }
if (model.Contains("GU604")) if (AppConfig.ContainsModel("GU604"))
{ {
_model = AnimeType.GU604; _model = AnimeType.GU604;
@@ -154,18 +151,6 @@ namespace Starlight.AnimeMatrix
System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr); System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr);
} }
public string GetModel()
{
using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_ComputerSystem"))
{
foreach (var process in searcher.Get())
return process["Model"].ToString();
}
return null;
}
public byte[] GetBuffer() public byte[] GetBuffer()
{ {
return _displayBuffer; return _displayBuffer;
@@ -408,7 +393,7 @@ namespace Starlight.AnimeMatrix
var pixel = bmp.GetPixel(x, y); 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) * contrast / 300, 255);
if (color > 20) if (color > 20)
SetLedDiagonal(x, y, (byte)color, deltaX + (FullRows / 2) + 1, deltaY - (FullRows / 2) - 1); SetLedDiagonal(x, y, (byte)color, deltaX, deltaY - (FullRows / 2) - 1);
} }
} }
} }
@@ -431,7 +416,7 @@ namespace Starlight.AnimeMatrix
public void Text(string text, float fontSize = 10, int x = 0, int y = 0) public void Text(string text, float fontSize = 10, int x = 0, int y = 0)
{ {
int width = MaxRows - FullRows; int width = MaxRows;
int height = MaxRows - FullRows; int height = MaxRows - FullRows;
int textHeight, textWidth; int textHeight, textWidth;
@@ -452,7 +437,7 @@ namespace Starlight.AnimeMatrix
} }
} }
SetBitmapDiagonal(bmp, 5 , height); SetBitmapDiagonal(bmp, 5, height);
} }
} }
@@ -501,8 +486,11 @@ namespace Starlight.AnimeMatrix
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 width = MaxRows - FullRows; int width = MaxRows + FullRows;
int height = MaxRows - FullRows*2; int height = MaxColumns + FullRows;
if ((image.Height / image.Width) > (height / width)) height = MaxColumns;
float scale; float scale;
using (Bitmap bmp = new Bitmap(width, height)) using (Bitmap bmp = new Bitmap(width, height))
@@ -518,7 +506,7 @@ namespace Starlight.AnimeMatrix
graph.CompositingQuality = CompositingQuality.HighQuality; graph.CompositingQuality = CompositingQuality.HighQuality;
graph.SmoothingMode = SmoothingMode.AntiAlias; graph.SmoothingMode = SmoothingMode.AntiAlias;
graph.DrawImage(image, width - scaleWidth, height - scaleHeight, scaleWidth, scaleHeight); graph.DrawImage(image, (width - scaleWidth) / 2, height - scaleHeight, scaleWidth, scaleHeight);
} }

View File

@@ -412,6 +412,11 @@ public static class AppConfig
return ContainsModel("X13"); return ContainsModel("X13");
} }
public static bool IsG14AMD()
{
return ContainsModel("GA402R");
}
public static bool DynamicBoost5() public static bool DynamicBoost5()
{ {
return ContainsModel("GZ301ZE"); return ContainsModel("GZ301ZE");
@@ -495,6 +500,11 @@ public static class AppConfig
return ContainsModel("G814") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634"); 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 IsASUS() public static bool IsASUS()
{ {
return ContainsModel("ROG") || ContainsModel("TUF") || ContainsModel("Vivobook") || ContainsModel("Zenbook"); return ContainsModel("ROG") || ContainsModel("TUF") || ContainsModel("Vivobook") || ContainsModel("Zenbook");

View File

@@ -58,6 +58,8 @@ public class AsusACPI
public const uint GPU_Fan = 0x00110014; public const uint GPU_Fan = 0x00110014;
public const uint Mid_Fan = 0x00110031; public const uint Mid_Fan = 0x00110031;
public const uint BatteryDischarge = 0x0012005A;
public const uint PerformanceMode = 0x00120075; // Performance modes public const uint PerformanceMode = 0x00120075; // Performance modes
public const uint VivoBookMode = 0x00110019; // Vivobook performance modes public const uint VivoBookMode = 0x00110019; // Vivobook performance modes
@@ -70,8 +72,10 @@ public class AsusACPI
public const uint GPUMuxVivo = 0x00090026; public const uint GPUMuxVivo = 0x00090026;
public const uint BatteryLimit = 0x00120057; public const uint BatteryLimit = 0x00120057;
public const uint ScreenOverdrive = 0x00050019; public const uint ScreenOverdrive = 0x00050019;
public const uint ScreenMiniled = 0x0005001E; public const uint ScreenMiniled1 = 0x0005001E;
public const uint ScreenMiniled2 = 0x0005002E;
public const uint DevsCPUFan = 0x00110022; public const uint DevsCPUFan = 0x00110022;
public const uint DevsGPUFan = 0x00110023; public const uint DevsGPUFan = 0x00110023;
@@ -129,7 +133,7 @@ public class AsusACPI
public const int MinTotal = 5; public const int MinTotal = 5;
public static int MaxTotal = 150; public static int MaxTotal = 150;
public static int DefaultTotal = 125; public static int DefaultTotal = 80;
public const int MinCPU = 5; public const int MinCPU = 5;
public const int MaxCPU = 100; public const int MaxCPU = 100;
@@ -247,6 +251,11 @@ public class AsusACPI
MaxTotal = 250; MaxTotal = 250;
} }
if (AppConfig.IsG14AMD())
{
DefaultTotal = 125;
}
if (AppConfig.IsX13()) if (AppConfig.IsX13())
{ {
MaxTotal = 75; MaxTotal = 75;
@@ -372,6 +381,23 @@ public class AsusACPI
return CallMethod(DSTS, args); return CallMethod(DSTS, args);
} }
public decimal? GetBatteryDischarge()
{
var buffer = DeviceGetBuffer(BatteryDischarge);
if (buffer[2] > 0)
{
buffer[2] = 0;
return (decimal)BitConverter.ToInt16(buffer, 0) / 100;
}
else
{
return null;
}
}
public int SetGPUEco(int eco) public int SetGPUEco(int eco)
{ {
int ecoFlag = DeviceGet(GPUEco); int ecoFlag = DeviceGet(GPUEco);
@@ -412,6 +438,7 @@ public class AsusACPI
return fan; return fan;
} }
public int SetFanRange(AsusFan device, byte[] curve) public int SetFanRange(AsusFan device, byte[] curve)
{ {
@@ -549,7 +576,6 @@ public class AsusACPI
public bool IsXGConnected() public bool IsXGConnected()
{ {
//return true;
return DeviceGet(GPUXGConnected) == 1; return DeviceGet(GPUXGConnected) == 1;
} }

View File

@@ -49,8 +49,10 @@ namespace GHelper.Display
if (miniled >= 0) if (miniled >= 0)
{ {
Program.acpi.DeviceSet(AsusACPI.ScreenMiniled, miniled, "Miniled"); if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0)
Debug.WriteLine("Miniled " + miniled); Program.acpi.DeviceSet(AsusACPI.ScreenMiniled1, miniled, "Miniled1");
else
Program.acpi.DeviceSet(AsusACPI.ScreenMiniled2, miniled, "Miniled2");
} }
InitScreen(); InitScreen();
@@ -59,7 +61,26 @@ namespace GHelper.Display
public int ToogleMiniled() public int ToogleMiniled()
{ {
int miniled = (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled) == 1) ? 0 : 1; int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1);
int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2);
Logger.WriteLine($"MiniledToggle: {miniled1} {miniled2}");
int miniled;
if (miniled1 >= 0)
{
miniled = (miniled1 == 1) ? 0 : 1;
} else
{
switch (miniled2)
{
case 1: miniled = 2; break;
case 2: miniled = 0; break;
default: miniled = 1; break;
}
}
AppConfig.Set("miniled", miniled); AppConfig.Set("miniled", miniled);
SetScreen(-1, -1, miniled); SetScreen(-1, -1, miniled);
return miniled; return miniled;
@@ -76,12 +97,16 @@ namespace GHelper.Display
bool overdriveSetting = !AppConfig.Is("no_overdrive"); bool overdriveSetting = !AppConfig.Is("no_overdrive");
int overdrive = Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive); int overdrive = Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive);
int miniled = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled);
int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1);
int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2);
int miniled = (miniled1 >= 0) ? miniled1 : miniled2;
bool hdr = false; bool hdr = false;
if (miniled >= 0) if (miniled >= 0)
{ {
Logger.WriteLine($"Miniled: {miniled1} {miniled2}");
AppConfig.Set("miniled", miniled); AppConfig.Set("miniled", miniled);
hdr = ScreenCCD.GetHDRStatus(); hdr = ScreenCCD.GetHDRStatus();
} }
@@ -100,7 +125,8 @@ namespace GHelper.Display
maxFrequency: maxFrequency, maxFrequency: maxFrequency,
overdrive: overdrive, overdrive: overdrive,
overdriveSetting: overdriveSetting, overdriveSetting: overdriveSetting,
miniled: miniled, miniled1: miniled1,
miniled2: miniled2,
hdr: hdr hdr: hdr
); );
}); });

View File

@@ -13,7 +13,6 @@ namespace GHelper
{ {
ScreenControl screenControl = new ScreenControl(); ScreenControl screenControl = new ScreenControl();
ModeControl modeControl = new ModeControl();
ClamshellModeControl clamshellControl = new ClamshellModeControl(); ClamshellModeControl clamshellControl = new ClamshellModeControl();
const string EMPTY = "--------------"; const string EMPTY = "--------------";
@@ -228,6 +227,8 @@ namespace GHelper
checkGpuApps.Visible = false; checkGpuApps.Visible = false;
checkUSBC.Visible = false; checkUSBC.Visible = false;
checkAutoToggleClamshellMode.Visible = false;
checkNoOverdrive.Visible = false;
int apuMem = Program.acpi.GetAPUMem(); int apuMem = Program.acpi.GetAPUMem();
if (apuMem >= 0) if (apuMem >= 0)
@@ -315,11 +316,15 @@ namespace GHelper
if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB() || AppConfig.IsARCNM()) if ((!AppConfig.IsStrix() && !AppConfig.IsZ13()) || AppConfig.IsStrixLimitedRGB() || AppConfig.IsARCNM())
{ {
labelBacklightBar.Visible = false;
checkAwakeBar.Visible = false; if (!AppConfig.IsStrixLimitedRGB())
checkBootBar.Visible = false; {
checkSleepBar.Visible = false; labelBacklightBar.Visible = false;
checkShutdownBar.Visible = false; checkAwakeBar.Visible = false;
checkBootBar.Visible = false;
checkSleepBar.Visible = false;
checkShutdownBar.Visible = false;
}
labelBacklightLid.Visible = false; labelBacklightLid.Visible = false;
checkAwakeLid.Visible = false; checkAwakeLid.Visible = false;

106
app/Fans.Designer.cs generated
View File

@@ -31,14 +31,14 @@ namespace GHelper
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
ChartArea chartArea5 = new ChartArea(); ChartArea chartArea1 = new ChartArea();
Title title5 = new Title(); Title title1 = new Title();
ChartArea chartArea6 = new ChartArea(); ChartArea chartArea2 = new ChartArea();
Title title6 = new Title(); Title title2 = new Title();
ChartArea chartArea7 = new ChartArea(); ChartArea chartArea3 = new ChartArea();
Title title7 = new Title(); Title title3 = new Title();
ChartArea chartArea8 = new ChartArea(); ChartArea chartArea4 = new ChartArea();
Title title8 = new Title(); Title title4 = new Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
panelFans = new Panel(); panelFans = new Panel();
labelTip = new Label(); labelTip = new Label();
@@ -85,6 +85,8 @@ namespace GHelper
panelTitleTemp = new Panel(); panelTitleTemp = new Panel();
pictureTemp = new PictureBox(); pictureTemp = new PictureBox();
labelTempLimit = new Label(); labelTempLimit = new Label();
panelDownload = new Panel();
buttonDownload = new RButton();
panelPower = new Panel(); panelPower = new Panel();
panelApplyPower = new Panel(); panelApplyPower = new Panel();
checkApplyPower = new RCheckBox(); checkApplyPower = new RCheckBox();
@@ -168,6 +170,7 @@ namespace GHelper
((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit();
panelTitleTemp.SuspendLayout(); panelTitleTemp.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit();
panelDownload.SuspendLayout();
panelPower.SuspendLayout(); panelPower.SuspendLayout();
panelApplyPower.SuspendLayout(); panelApplyPower.SuspendLayout();
panelCPU.SuspendLayout(); panelCPU.SuspendLayout();
@@ -257,8 +260,8 @@ namespace GHelper
// //
// chartGPU // chartGPU
// //
chartArea5.Name = "ChartArea1"; chartArea1.Name = "ChartArea1";
chartGPU.ChartAreas.Add(chartArea5); chartGPU.ChartAreas.Add(chartArea1);
chartGPU.Dock = DockStyle.Fill; chartGPU.Dock = DockStyle.Fill;
chartGPU.Location = new Point(12, 493); chartGPU.Location = new Point(12, 493);
chartGPU.Margin = new Padding(2, 10, 2, 10); chartGPU.Margin = new Padding(2, 10, 2, 10);
@@ -266,13 +269,13 @@ namespace GHelper
chartGPU.Size = new Size(782, 463); chartGPU.Size = new Size(782, 463);
chartGPU.TabIndex = 17; chartGPU.TabIndex = 17;
chartGPU.Text = "chartGPU"; chartGPU.Text = "chartGPU";
title5.Name = "Title1"; title1.Name = "Title1";
chartGPU.Titles.Add(title5); chartGPU.Titles.Add(title1);
// //
// chartCPU // chartCPU
// //
chartArea6.Name = "ChartArea1"; chartArea2.Name = "ChartArea1";
chartCPU.ChartAreas.Add(chartArea6); chartCPU.ChartAreas.Add(chartArea2);
chartCPU.Dock = DockStyle.Fill; chartCPU.Dock = DockStyle.Fill;
chartCPU.Location = new Point(12, 10); chartCPU.Location = new Point(12, 10);
chartCPU.Margin = new Padding(2, 10, 2, 10); chartCPU.Margin = new Padding(2, 10, 2, 10);
@@ -280,13 +283,13 @@ namespace GHelper
chartCPU.Size = new Size(782, 463); chartCPU.Size = new Size(782, 463);
chartCPU.TabIndex = 14; chartCPU.TabIndex = 14;
chartCPU.Text = "chartCPU"; chartCPU.Text = "chartCPU";
title6.Name = "Title1"; title2.Name = "Title1";
chartCPU.Titles.Add(title6); chartCPU.Titles.Add(title2);
// //
// chartXGM // chartXGM
// //
chartArea7.Name = "ChartAreaXGM"; chartArea3.Name = "ChartAreaXGM";
chartXGM.ChartAreas.Add(chartArea7); chartXGM.ChartAreas.Add(chartArea3);
chartXGM.Dock = DockStyle.Fill; chartXGM.Dock = DockStyle.Fill;
chartXGM.Location = new Point(12, 1459); chartXGM.Location = new Point(12, 1459);
chartXGM.Margin = new Padding(2, 10, 2, 10); chartXGM.Margin = new Padding(2, 10, 2, 10);
@@ -294,14 +297,14 @@ namespace GHelper
chartXGM.Size = new Size(782, 463); chartXGM.Size = new Size(782, 463);
chartXGM.TabIndex = 14; chartXGM.TabIndex = 14;
chartXGM.Text = "chartXGM"; chartXGM.Text = "chartXGM";
title7.Name = "Title4"; title3.Name = "Title4";
chartXGM.Titles.Add(title7); chartXGM.Titles.Add(title3);
chartXGM.Visible = false; chartXGM.Visible = false;
// //
// chartMid // chartMid
// //
chartArea8.Name = "ChartArea3"; chartArea4.Name = "ChartArea3";
chartMid.ChartAreas.Add(chartArea8); chartMid.ChartAreas.Add(chartArea4);
chartMid.Dock = DockStyle.Fill; chartMid.Dock = DockStyle.Fill;
chartMid.Location = new Point(12, 976); chartMid.Location = new Point(12, 976);
chartMid.Margin = new Padding(2, 10, 2, 10); chartMid.Margin = new Padding(2, 10, 2, 10);
@@ -309,8 +312,8 @@ namespace GHelper
chartMid.Size = new Size(782, 463); chartMid.Size = new Size(782, 463);
chartMid.TabIndex = 14; chartMid.TabIndex = 14;
chartMid.Text = "chartMid"; chartMid.Text = "chartMid";
title8.Name = "Title3"; title4.Name = "Title3";
chartMid.Titles.Add(title8); chartMid.Titles.Add(title4);
chartMid.Visible = false; chartMid.Visible = false;
// //
// panelTitleFans // panelTitleFans
@@ -528,10 +531,11 @@ namespace GHelper
panelAdvanced.Controls.Add(panelTitleAdvanced); panelAdvanced.Controls.Add(panelTitleAdvanced);
panelAdvanced.Controls.Add(panelTemperature); panelAdvanced.Controls.Add(panelTemperature);
panelAdvanced.Controls.Add(panelTitleTemp); panelAdvanced.Controls.Add(panelTitleTemp);
panelAdvanced.Controls.Add(panelDownload);
panelAdvanced.Dock = DockStyle.Top; panelAdvanced.Dock = DockStyle.Top;
panelAdvanced.Location = new Point(10, 1644); panelAdvanced.Location = new Point(10, 1644);
panelAdvanced.Name = "panelAdvanced"; panelAdvanced.Name = "panelAdvanced";
panelAdvanced.Size = new Size(520, 888); panelAdvanced.Size = new Size(520, 992);
panelAdvanced.TabIndex = 14; panelAdvanced.TabIndex = 14;
panelAdvanced.Visible = false; panelAdvanced.Visible = false;
// //
@@ -540,7 +544,7 @@ namespace GHelper
panelAdvancedAlways.AutoSize = true; panelAdvancedAlways.AutoSize = true;
panelAdvancedAlways.Controls.Add(checkApplyUV); panelAdvancedAlways.Controls.Add(checkApplyUV);
panelAdvancedAlways.Dock = DockStyle.Top; panelAdvancedAlways.Dock = DockStyle.Top;
panelAdvancedAlways.Location = new Point(0, 827); panelAdvancedAlways.Location = new Point(0, 931);
panelAdvancedAlways.Name = "panelAdvancedAlways"; panelAdvancedAlways.Name = "panelAdvancedAlways";
panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15); panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15);
panelAdvancedAlways.Size = new Size(520, 61); panelAdvancedAlways.Size = new Size(520, 61);
@@ -566,7 +570,7 @@ namespace GHelper
panelAdvancedApply.AutoSize = true; panelAdvancedApply.AutoSize = true;
panelAdvancedApply.Controls.Add(buttonApplyAdvanced); panelAdvancedApply.Controls.Add(buttonApplyAdvanced);
panelAdvancedApply.Dock = DockStyle.Top; panelAdvancedApply.Dock = DockStyle.Top;
panelAdvancedApply.Location = new Point(0, 747); panelAdvancedApply.Location = new Point(0, 851);
panelAdvancedApply.Name = "panelAdvancedApply"; panelAdvancedApply.Name = "panelAdvancedApply";
panelAdvancedApply.Padding = new Padding(15); panelAdvancedApply.Padding = new Padding(15);
panelAdvancedApply.Size = new Size(520, 80); panelAdvancedApply.Size = new Size(520, 80);
@@ -595,7 +599,7 @@ namespace GHelper
labelRisky.BackColor = Color.IndianRed; labelRisky.BackColor = Color.IndianRed;
labelRisky.Dock = DockStyle.Top; labelRisky.Dock = DockStyle.Top;
labelRisky.ForeColor = SystemColors.ControlLightLight; labelRisky.ForeColor = SystemColors.ControlLightLight;
labelRisky.Location = new Point(0, 504); labelRisky.Location = new Point(0, 608);
labelRisky.Margin = new Padding(0); labelRisky.Margin = new Padding(0);
labelRisky.Name = "labelRisky"; labelRisky.Name = "labelRisky";
labelRisky.Padding = new Padding(10, 10, 10, 5); labelRisky.Padding = new Padding(10, 10, 10, 5);
@@ -611,7 +615,7 @@ namespace GHelper
panelUViGPU.Controls.Add(labelLeftUViGPU); panelUViGPU.Controls.Add(labelLeftUViGPU);
panelUViGPU.Controls.Add(trackUViGPU); panelUViGPU.Controls.Add(trackUViGPU);
panelUViGPU.Dock = DockStyle.Top; panelUViGPU.Dock = DockStyle.Top;
panelUViGPU.Location = new Point(0, 380); panelUViGPU.Location = new Point(0, 484);
panelUViGPU.Margin = new Padding(4); panelUViGPU.Margin = new Padding(4);
panelUViGPU.MaximumSize = new Size(0, 124); panelUViGPU.MaximumSize = new Size(0, 124);
panelUViGPU.Name = "panelUViGPU"; panelUViGPU.Name = "panelUViGPU";
@@ -659,7 +663,7 @@ namespace GHelper
panelUV.Controls.Add(labelLeftUV); panelUV.Controls.Add(labelLeftUV);
panelUV.Controls.Add(trackUV); panelUV.Controls.Add(trackUV);
panelUV.Dock = DockStyle.Top; panelUV.Dock = DockStyle.Top;
panelUV.Location = new Point(0, 256); panelUV.Location = new Point(0, 360);
panelUV.Margin = new Padding(4); panelUV.Margin = new Padding(4);
panelUV.MaximumSize = new Size(0, 124); panelUV.MaximumSize = new Size(0, 124);
panelUV.Name = "panelUV"; panelUV.Name = "panelUV";
@@ -704,7 +708,7 @@ namespace GHelper
panelTitleAdvanced.Controls.Add(pictureUV); panelTitleAdvanced.Controls.Add(pictureUV);
panelTitleAdvanced.Controls.Add(labelTitleUV); panelTitleAdvanced.Controls.Add(labelTitleUV);
panelTitleAdvanced.Dock = DockStyle.Top; panelTitleAdvanced.Dock = DockStyle.Top;
panelTitleAdvanced.Location = new Point(0, 190); panelTitleAdvanced.Location = new Point(0, 294);
panelTitleAdvanced.Name = "panelTitleAdvanced"; panelTitleAdvanced.Name = "panelTitleAdvanced";
panelTitleAdvanced.Size = new Size(520, 66); panelTitleAdvanced.Size = new Size(520, 66);
panelTitleAdvanced.TabIndex = 48; panelTitleAdvanced.TabIndex = 48;
@@ -740,7 +744,7 @@ namespace GHelper
panelTemperature.Controls.Add(labelLeftTemp); panelTemperature.Controls.Add(labelLeftTemp);
panelTemperature.Controls.Add(trackTemp); panelTemperature.Controls.Add(trackTemp);
panelTemperature.Dock = DockStyle.Top; panelTemperature.Dock = DockStyle.Top;
panelTemperature.Location = new Point(0, 66); panelTemperature.Location = new Point(0, 170);
panelTemperature.Margin = new Padding(4); panelTemperature.Margin = new Padding(4);
panelTemperature.MaximumSize = new Size(0, 124); panelTemperature.MaximumSize = new Size(0, 124);
panelTemperature.Name = "panelTemperature"; panelTemperature.Name = "panelTemperature";
@@ -785,7 +789,7 @@ namespace GHelper
panelTitleTemp.Controls.Add(pictureTemp); panelTitleTemp.Controls.Add(pictureTemp);
panelTitleTemp.Controls.Add(labelTempLimit); panelTitleTemp.Controls.Add(labelTempLimit);
panelTitleTemp.Dock = DockStyle.Top; panelTitleTemp.Dock = DockStyle.Top;
panelTitleTemp.Location = new Point(0, 0); panelTitleTemp.Location = new Point(0, 104);
panelTitleTemp.Name = "panelTitleTemp"; panelTitleTemp.Name = "panelTitleTemp";
panelTitleTemp.Size = new Size(520, 66); panelTitleTemp.Size = new Size(520, 66);
panelTitleTemp.TabIndex = 50; panelTitleTemp.TabIndex = 50;
@@ -813,6 +817,38 @@ namespace GHelper
labelTempLimit.TabIndex = 47; labelTempLimit.TabIndex = 47;
labelTempLimit.Text = "Temp Limit"; labelTempLimit.Text = "Temp Limit";
// //
// panelDownload
//
panelDownload.AutoSize = true;
panelDownload.Controls.Add(buttonDownload);
panelDownload.Dock = DockStyle.Top;
panelDownload.Location = new Point(0, 0);
panelDownload.Name = "panelDownload";
panelDownload.Padding = new Padding(20);
panelDownload.Size = new Size(520, 104);
panelDownload.TabIndex = 52;
panelDownload.Visible = false;
//
// buttonDownload
//
buttonDownload.Activated = false;
buttonDownload.AutoSize = true;
buttonDownload.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonDownload.BackColor = SystemColors.ControlLight;
buttonDownload.BorderColor = Color.Transparent;
buttonDownload.BorderRadius = 2;
buttonDownload.Dock = DockStyle.Top;
buttonDownload.FlatStyle = FlatStyle.Flat;
buttonDownload.Location = new Point(20, 20);
buttonDownload.Margin = new Padding(20);
buttonDownload.Name = "buttonDownload";
buttonDownload.Padding = new Padding(10);
buttonDownload.Secondary = true;
buttonDownload.Size = new Size(480, 64);
buttonDownload.TabIndex = 19;
buttonDownload.Text = "Download Advanced Settings Plugin";
buttonDownload.UseVisualStyleBackColor = false;
//
// panelPower // panelPower
// //
panelPower.AutoSize = true; panelPower.AutoSize = true;
@@ -1634,6 +1670,8 @@ namespace GHelper
panelTitleTemp.ResumeLayout(false); panelTitleTemp.ResumeLayout(false);
panelTitleTemp.PerformLayout(); panelTitleTemp.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit();
panelDownload.ResumeLayout(false);
panelDownload.PerformLayout();
panelPower.ResumeLayout(false); panelPower.ResumeLayout(false);
panelPower.PerformLayout(); panelPower.PerformLayout();
panelApplyPower.ResumeLayout(false); panelApplyPower.ResumeLayout(false);
@@ -1793,5 +1831,7 @@ namespace GHelper
private Label labelSlow; private Label labelSlow;
private Label labelLeftSlow; private Label labelLeftSlow;
private TrackBar trackSlow; private TrackBar trackSlow;
private Panel panelDownload;
private RButton buttonDownload;
} }
} }

View File

@@ -213,6 +213,8 @@ namespace GHelper
buttonCalibrate.Click += ButtonCalibrate_Click; buttonCalibrate.Click += ButtonCalibrate_Click;
buttonDownload.Click += ButtonDownload_Click;
ToggleNavigation(0); ToggleNavigation(0);
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false; if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
@@ -221,7 +223,21 @@ namespace GHelper
} }
private void ButtonDownload_Click(object? sender, EventArgs e)
{
RyzenControl.DownloadRing();
panelAdvancedAlways.Visible = true;
panelAdvancedApply.Visible = true;
labelRisky.Visible = true;
panelUViGPU.Visible = true;
panelUV.Visible = true;
panelTitleAdvanced.Visible = true;
panelTemperature.Visible = true;
panelTitleTemp.Visible = true;
VisualiseAdvanced();
}
private void ButtonCalibrate_Click(object? sender, EventArgs e) private void ButtonCalibrate_Click(object? sender, EventArgs e)
{ {
@@ -365,6 +381,24 @@ namespace GHelper
private void VisualiseAdvanced() private void VisualiseAdvanced()
{ {
if (!RyzenControl.IsRingExsists())
{
panelTitleAdvanced.Visible = false;
labelRisky.Visible = false;
panelUV.Visible = false;
panelUViGPU.Visible = false;
panelTitleTemp.Visible = false;
panelTemperature.Visible = false;
panelAdvancedAlways.Visible = false;
panelAdvancedApply.Visible = false;
panelDownload.Visible = true;
} else
{
panelDownload.Visible = false;
}
if (!RyzenControl.IsSupportedUV()) if (!RyzenControl.IsSupportedUV())
{ {
panelTitleAdvanced.Visible = false; panelTitleAdvanced.Visible = false;

View File

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

View File

@@ -284,7 +284,7 @@ namespace GHelper.Gpu
} }
public void ToggleXGM() public void ToggleXGM(bool silent = false)
{ {
Task.Run(async () => Task.Run(async () =>
@@ -296,12 +296,20 @@ namespace GHelper.Gpu
XGM.Reset(); XGM.Reset();
HardwareControl.KillGPUApps(); HardwareControl.KillGPUApps();
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo); if (silent)
if (dialogResult == DialogResult.Yes)
{ {
Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM"); Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM");
await Task.Delay(TimeSpan.FromSeconds(15)); await Task.Delay(TimeSpan.FromSeconds(15));
} }
else
{
DialogResult dialogResult = MessageBox.Show("Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM");
await Task.Delay(TimeSpan.FromSeconds(15));
}
}
} }
else else
{ {

View File

@@ -152,6 +152,8 @@ public class NvidiaGpuControl : IGpuControl
int _clockLimit = GetMaxGPUCLock(); int _clockLimit = GetMaxGPUCLock();
if (_clockLimit < 0 && clock == 0) return 0;
if (_clockLimit != clock) if (_clockLimit != clock)
{ {
if (clock > 0) RunPowershellCommand($"nvidia-smi -lgc 0,{clock}"); if (clock > 0) RunPowershellCommand($"nvidia-smi -lgc 0,{clock}");
@@ -178,10 +180,10 @@ public class NvidiaGpuControl : IGpuControl
if (core < MinCoreOffset || core > MaxCoreOffset) return 0; if (core < MinCoreOffset || core > MaxCoreOffset) return 0;
if (memory < MinMemoryOffset || memory > MaxMemoryOffset) return 0; if (memory < MinMemoryOffset || memory > MaxMemoryOffset) return 0;
if (GetClocks(out int currentCore, out int currentMemory)) GetClocks(out int currentCore, out int currentMemory);
{
if (Math.Abs(core - currentCore) < 5 && Math.Abs(memory - currentMemory) < 5) return 0; // Nothing to set
} if (Math.Abs(core - currentCore) < 5 && Math.Abs(memory - currentMemory) < 5) return 0;
PhysicalGPU internalGpu = _internalGpu!; PhysicalGPU internalGpu = _internalGpu!;

1273
app/Handheld.Designer.cs generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,9 @@ namespace GHelper
public partial class Handheld : RForm public partial class Handheld : RForm
{ {
static string activeBinding = "";
static RButton? activeButton;
public Handheld() public Handheld()
{ {
InitializeComponent(); InitializeComponent();
@@ -41,80 +44,131 @@ namespace GHelper
trackVibra.ValueChanged += Controller_Complete; trackVibra.ValueChanged += Controller_Complete;
FillBinding("m1", "M1", AllyControl.BindM1); ButtonBinding("m1", "M1", buttonM1);
FillBinding("m2", "M2", AllyControl.BindM2); ButtonBinding("m2", "M2", buttonM2);
FillBinding("a", "A"); ButtonBinding("a", "A", buttonA);
FillBinding("b", "B"); ButtonBinding("b", "B", buttonB);
FillBinding("x", "X"); ButtonBinding("x", "X", buttonX);
FillBinding("y", "Y"); ButtonBinding("y", "Y", buttonY);
FillBinding("du", "DPadUp"); ButtonBinding("du", "DPad Up", buttonDPU);
FillBinding("dd", "DPadDown"); ButtonBinding("dd", "DPad Down", buttonDPD);
FillBinding("dl", "DPadLeft");
FillBinding("dr", "DPadRight");
FillBinding("rb", "RBumper"); ButtonBinding("dl", "DPad Left", buttonDPL);
FillBinding("lb", "LBumper"); ButtonBinding("dr", "DPad Right", buttonDPR);
FillBinding("rs", "RStick"); ButtonBinding("rt", "Right Trigger", buttonRT);
FillBinding("ll", "LStick"); ButtonBinding("lt", "Left Trigger", buttonLT);
ButtonBinding("rb", "Right Bumper", buttonRB);
ButtonBinding("lb", "Left Bumper", buttonLB);
ButtonBinding("rs", "Right Stick", buttonRS);
ButtonBinding("ll", "Left Stick", buttonLS);
ButtonBinding("vb", "View", buttonView);
ButtonBinding("mb", "Menu", buttonMenu);
ComboBinding(comboPrimary);
ComboBinding(comboSecondary);
checkController.Checked = AppConfig.Is("controller_disabled");
checkController.CheckedChanged += CheckController_CheckedChanged;
FillBinding("vb", "View");
FillBinding("mb", "Menu");
} }
private RComboBox ComboBinding(string name, int value) private void CheckController_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.Set("controller_disabled", checkController.Checked ? 1 : 0);
AllyControl.ApplyXBoxStatus();
}
private void ComboBinding(RComboBox combo)
{ {
var combo = new RComboBox();
combo.BorderColor = Color.White;
combo.ButtonColor = Color.FromArgb(255, 255, 255);
combo.Dock = DockStyle.Fill;
combo.Name = name;
combo.Margin = new Padding(5, 5, 5, 5);
combo.DropDownStyle = ComboBoxStyle.DropDownList; combo.DropDownStyle = ComboBoxStyle.DropDownList;
combo.DisplayMember = "Value"; combo.DisplayMember = "Value";
combo.ValueMember = "Key"; combo.ValueMember = "Key";
foreach (var item in AllyControl.BindCodes) foreach (var item in AllyControl.BindCodes)
{ combo.Items.Add(new KeyValuePair<string, string>(item.Key, item.Value));
combo.Items.Add(new KeyValuePair<int, string>(item.Key, item.Value));
if (item.Key == value) combo.SelectedItem = item;
}
combo.SelectedValueChanged += Binding_SelectedValueChanged; combo.SelectedValueChanged += Binding_SelectedValueChanged;
return combo;
}
private void FillBinding(string binding, string label, int defaultValue = -1)
{
tableBindings.RowStyles.Add(new RowStyle(SizeType.AutoSize));
tableBindings.Controls.Add(new Label { Text = label, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, tableBindings.RowCount);
tableBindings.Controls.Add(ComboBinding("bind_" + binding, AppConfig.Get("bind_" + binding, defaultValue)), 1, tableBindings.RowCount);
tableBindings.Controls.Add(ComboBinding("bind2_" + binding, AppConfig.Get("bind2_" + binding)), 2, tableBindings.RowCount);
tableBindings.RowCount++;
} }
private void Binding_SelectedValueChanged(object? sender, EventArgs e) private void Binding_SelectedValueChanged(object? sender, EventArgs e)
{ {
if (sender is null) return; if (sender is null) return;
RComboBox combo = (RComboBox)sender; RComboBox combo = (RComboBox)sender;
int value = ((KeyValuePair<int, string>)combo.SelectedItem).Key; string value = ((KeyValuePair<string, string>)combo.SelectedItem).Key;
string binding = "bind" + (combo.Name == "comboPrimary" ? "" : "2") + "_" + activeBinding;
if (value >= 0) AppConfig.Set(combo.Name, value); if (value != "") AppConfig.Set(binding, value);
else AppConfig.Remove(combo.Name); else AppConfig.Remove(binding);
VisualiseButton(activeButton, activeBinding);
AllyControl.ApplyMode(); AllyControl.ApplyMode();
} }
private void SetComboValue(RComboBox combo, string value)
{
foreach (var item in AllyControl.BindCodes)
if (item.Key == value)
{
combo.SelectedItem = item;
return;
}
combo.SelectedIndex = 0;
}
private void VisualiseButton(RButton button, string binding)
{
if (button == null) return;
string primary = AppConfig.GetString("bind_" + binding, "");
string secondary = AppConfig.GetString("bind2_" + binding, "");
if (primary != "" || secondary != "")
{
button.BorderColor = colorStandard;
button.Activated = true;
}
else
{
button.Activated = false;
}
}
private void ButtonBinding(string binding, string label, RButton button)
{
button.Click += (sender, EventArgs) => { buttonBinding_Click(sender, EventArgs, binding, label); };
VisualiseButton(button, binding);
}
void buttonBinding_Click(object sender, EventArgs e, string binding, string label)
{
if (sender is null) return;
RButton button = (RButton)sender;
panelBinding.Visible = true;
activeButton = button;
activeBinding = binding;
labelBinding.Text = "Binding: " + label;
SetComboValue(comboPrimary, AppConfig.GetString("bind_" + binding, ""));
SetComboValue(comboSecondary, AppConfig.GetString("bind2_" + binding, ""));
}
private void Controller_Complete(object? sender, EventArgs e) private void Controller_Complete(object? sender, EventArgs e)
{ {
AllyControl.SetDeadzones(); AllyControl.SetDeadzones();
@@ -201,5 +255,6 @@ namespace GHelper
Top = Program.settingsForm.Top; Top = Program.settingsForm.Top;
Left = Program.settingsForm.Left - Width - 5; Left = Program.settingsForm.Left - Width - 5;
} }
} }
} }

View File

@@ -1,13 +1,12 @@
using GHelper; using GHelper;
using GHelper.Battery;
using GHelper.Fan; using GHelper.Fan;
using GHelper.Gpu; using GHelper.Gpu;
using GHelper.Gpu.NVidia;
using GHelper.Gpu.AMD; using GHelper.Gpu.AMD;
using GHelper.Gpu.NVidia;
using GHelper.Helpers; using GHelper.Helpers;
using System.Diagnostics; using System.Diagnostics;
using System.Management; using System.Management;
using GHelper.Battery;
public static class HardwareControl public static class HardwareControl
{ {
@@ -68,9 +67,16 @@ public static class HardwareControl
chargeCapacity = Convert.ToDecimal(obj["RemainingCapacity"]); chargeCapacity = Convert.ToDecimal(obj["RemainingCapacity"]);
decimal? discharge = Program.acpi.GetBatteryDischarge();
if (discharge is not null)
{
batteryRate = discharge;
return;
}
decimal chargeRate = Convert.ToDecimal(obj["ChargeRate"]); decimal chargeRate = Convert.ToDecimal(obj["ChargeRate"]);
decimal dischargeRate = Convert.ToDecimal(obj["DischargeRate"]); decimal dischargeRate = Convert.ToDecimal(obj["DischargeRate"]);
if (chargeRate > 0) if (chargeRate > 0)
batteryRate = chargeRate / 1000; batteryRate = chargeRate / 1000;
else else
@@ -155,7 +161,8 @@ public static class HardwareControl
return health; return health;
} }
public static float? GetCPUTemp() { public static float? GetCPUTemp()
{
var last = DateTimeOffset.Now.ToUnixTimeSeconds(); var last = DateTimeOffset.Now.ToUnixTimeSeconds();
if (Math.Abs(last - lastUpdate) < 2) return cpuTemp; if (Math.Abs(last - lastUpdate) < 2) return cpuTemp;
@@ -255,7 +262,7 @@ public static class HardwareControl
GpuControl?.Dispose(); GpuControl?.Dispose();
IGpuControl _gpuControl = new NvidiaGpuControl(); IGpuControl _gpuControl = new NvidiaGpuControl();
if (_gpuControl.IsValid) if (_gpuControl.IsValid)
{ {
GpuControl = _gpuControl; GpuControl = _gpuControl;

View File

@@ -69,12 +69,14 @@ namespace GHelper.Helpers
} }
public static void DisableClamshellMode() public static void DisableClamshellMode()
{ {
if (PowerNative.GetLidAction(true) == GetDefaultLidAction()) return;
PowerNative.SetLidAction(GetDefaultLidAction(), true); PowerNative.SetLidAction(GetDefaultLidAction(), true);
Logger.WriteLine("Disengaging Clamshell Mode"); Logger.WriteLine("Disengaging Clamshell Mode");
} }
public static void EnableClamshellMode() public static void EnableClamshellMode()
{ {
if (PowerNative.GetLidAction(true) == 0) return;
PowerNative.SetLidAction(0, true); PowerNative.SetLidAction(0, true);
Logger.WriteLine("Engaging Clamshell Mode"); Logger.WriteLine("Engaging Clamshell Mode");
} }

View File

@@ -0,0 +1,176 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace GHelper.Helpers
{
public static class OnScreenKeyboard
{
static OnScreenKeyboard()
{
var version = Environment.OSVersion.Version;
switch (version.Major)
{
case 6:
switch (version.Minor)
{
case 2:
// Windows 10 (ok)
break;
}
break;
default:
break;
}
}
private static void StartTabTip()
{
var p = Process.Start(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe");
int handle = 0;
while ((handle = NativeMethods.FindWindow("IPTIP_Main_Window", "")) <= 0)
{
Thread.Sleep(100);
}
}
public static void ToggleVisibility()
{
var type = Type.GetTypeFromCLSID(Guid.Parse("4ce576fa-83dc-4F88-951c-9d0782b4e376"));
var instance = (ITipInvocation)Activator.CreateInstance(type);
instance.Toggle(NativeMethods.GetDesktopWindow());
Marshal.ReleaseComObject(instance);
}
public static void Show()
{
int handle = NativeMethods.FindWindow("IPTIP_Main_Window", "");
if (handle <= 0) // nothing found
{
StartTabTip();
Thread.Sleep(100);
}
// on some devices starting TabTip don't show keyboard, on some does ¯\_(ツ)_/¯
if (!IsOpen())
{
ToggleVisibility();
}
}
public static void Hide()
{
if (IsOpen())
{
ToggleVisibility();
}
}
public static bool Close()
{
// find it
int handle = NativeMethods.FindWindow("IPTIP_Main_Window", "");
bool active = handle > 0;
if (active)
{
// don't check style - just close
NativeMethods.SendMessage(handle, NativeMethods.WM_SYSCOMMAND, NativeMethods.SC_CLOSE, 0);
}
return active;
}
public static bool IsOpen()
{
return GetIsOpen1709() ?? GetIsOpenLegacy();
}
[DllImport("user32.dll", SetLastError = false)]
private static extern IntPtr FindWindowEx(IntPtr parent, IntPtr after, string className, string title = null);
[DllImport("user32.dll", SetLastError = false)]
private static extern uint GetWindowLong(IntPtr wnd, int index);
private static bool? GetIsOpen1709()
{
// if there is a top-level window - the keyboard is closed
var wnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowClass1709, WindowCaption1709);
if (wnd != IntPtr.Zero)
return false;
var parent = IntPtr.Zero;
for (; ; )
{
parent = FindWindowEx(IntPtr.Zero, parent, WindowParentClass1709);
if (parent == IntPtr.Zero)
return null; // no more windows, keyboard state is unknown
// if it's a child of a WindowParentClass1709 window - the keyboard is open
wnd = FindWindowEx(parent, IntPtr.Zero, WindowClass1709, WindowCaption1709);
if (wnd != IntPtr.Zero)
return true;
}
}
private static bool GetIsOpenLegacy()
{
var wnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowClass);
if (wnd == IntPtr.Zero)
return false;
var style = GetWindowStyle(wnd);
return style.HasFlag(WindowStyle.Visible)
&& !style.HasFlag(WindowStyle.Disabled);
}
private const string WindowClass = "IPTip_Main_Window";
private const string WindowParentClass1709 = "ApplicationFrameWindow";
private const string WindowClass1709 = "Windows.UI.Core.CoreWindow";
private const string WindowCaption1709 = "Microsoft Text Input Application";
private enum WindowStyle : uint
{
Disabled = 0x08000000,
Visible = 0x10000000,
}
private static WindowStyle GetWindowStyle(IntPtr wnd)
{
return (WindowStyle)GetWindowLong(wnd, -16);
}
}
[ComImport]
[Guid("37c994e7-432b-4834-a2f7-dce1f13b834b")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface ITipInvocation
{
void Toggle(IntPtr hwnd);
}
internal static class NativeMethods
{
[DllImport("user32.dll", EntryPoint = "FindWindow")]
internal static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", EntryPoint = "SendMessage")]
internal static extern int SendMessage(int hWnd, uint Msg, int wParam, int lParam);
[DllImport("user32.dll", EntryPoint = "GetDesktopWindow", SetLastError = false)]
internal static extern IntPtr GetDesktopWindow();
[DllImport("user32.dll", EntryPoint = "GetWindowLong")]
internal static extern int GetWindowLong(int hWnd, int nIndex);
internal const int GWL_STYLE = -16;
internal const int GWL_EXSTYLE = -20;
internal const int WM_SYSCOMMAND = 0x0112;
internal const int SC_CLOSE = 0xF060;
internal const int WS_DISABLED = 0x08000000;
internal const int WS_VISIBLE = 0x10000000;
}
}

View File

@@ -18,6 +18,16 @@ namespace GHelper.Helpers
"AsusCertService" "AsusCertService"
}; };
static List<string> processesAC = new() {
"ArmouryCrateSE.Service",
"LightingService",
};
static List<string> servicesAC = new() {
"ArmouryCrateSEService",
"LightingService",
};
public static bool IsRunning() public static bool IsRunning()
{ {
return Process.GetProcessesByName("AsusOptimization").Count() > 0; return Process.GetProcessesByName("AsusOptimization").Count() > 0;
@@ -36,6 +46,17 @@ namespace GHelper.Helpers
{ {
if (Process.GetProcessesByName(service).Count() > 0) count++; if (Process.GetProcessesByName(service).Count() > 0) count++;
} }
if (AppConfig.IsAlly())
foreach (string service in processesAC)
{
if (Process.GetProcessesByName(service).Count() > 0)
{
count++;
Logger.WriteLine(service);
}
}
return count; return count;
} }
@@ -46,6 +67,16 @@ namespace GHelper.Helpers
{ {
ProcessHelper.StopDisableService(service); ProcessHelper.StopDisableService(service);
} }
if (AppConfig.IsAlly())
{
foreach (string service in servicesAC)
{
ProcessHelper.StopDisableService(service, "Manual");
}
Thread.Sleep(1000);
}
} }
public static void StartAsusServices() public static void StartAsusServices()
@@ -54,6 +85,16 @@ namespace GHelper.Helpers
{ {
ProcessHelper.StartEnableService(service); ProcessHelper.StartEnableService(service);
} }
if (AppConfig.IsAlly())
{
foreach (string service in servicesAC)
{
ProcessHelper.StartEnableService(service);
}
Thread.Sleep(1000);
}
} }
} }

View File

@@ -37,14 +37,14 @@ namespace GHelper.Helpers
return principal.IsInRole(WindowsBuiltInRole.Administrator); return principal.IsInRole(WindowsBuiltInRole.Administrator);
} }
public static void RunAsAdmin(string? param = null) public static void RunAsAdmin(string? param = null, bool force = false)
{ {
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAdmin) < 2000) return; if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAdmin) < 2000) return;
lastAdmin = DateTimeOffset.Now.ToUnixTimeMilliseconds(); lastAdmin = DateTimeOffset.Now.ToUnixTimeMilliseconds();
// Check if the current user is an administrator // Check if the current user is an administrator
if (!IsUserAdministrator()) if (!IsUserAdministrator() || force)
{ {
ProcessStartInfo startInfo = new ProcessStartInfo(); ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.UseShellExecute = true; startInfo.UseShellExecute = true;
@@ -94,11 +94,11 @@ namespace GHelper.Helpers
} }
} }
public static void StopDisableService(string serviceName) public static void StopDisableService(string serviceName, string disable = "Disabled")
{ {
try try
{ {
string script = $"Get-Service -Name \"{serviceName}\" | Stop-Service -Force -PassThru | Set-Service -StartupType Disabled"; string script = $"Get-Service -Name \"{serviceName}\" | Stop-Service -Force -PassThru | Set-Service -StartupType {disable}";
Logger.WriteLine(script); Logger.WriteLine(script);
RunCMD("powershell", script); RunCMD("powershell", script);
} }

View File

@@ -116,11 +116,18 @@ namespace GHelper.Input
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp); if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F14);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F15);
if (!AppConfig.Is("skip_hotkeys")) if (!AppConfig.Is("skip_hotkeys"))
{ {
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F14);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F15);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F16);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F17);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F18);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F19);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F20);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown); hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp); hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown); hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown);
@@ -134,6 +141,13 @@ namespace GHelper.Input
if (actionM2 is not null && actionM2.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeUp); if (actionM2 is not null && actionM2.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeUp);
} }
if (AppConfig.IsAlly())
{
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F1);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F2);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F3);
}
// FN-Lock group // FN-Lock group
if (AppConfig.Is("fn_lock") && !AppConfig.ContainsModel("VivoBook")) if (AppConfig.Is("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
@@ -351,12 +365,36 @@ namespace GHelper.Input
switch (e.Key) switch (e.Key)
{ {
case Keys.F1:
SetBrightness(-10);
break;
case Keys.F2:
SetBrightness(10);
break;
case Keys.F3:
Program.settingsForm.gpuControl.ToggleXGM(true);
break;
case Keys.F14: case Keys.F14:
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco); Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco);
break; break;
case Keys.F15: case Keys.F15:
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeStandard); Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeStandard);
break; break;
case Keys.F16:
modeControl.SetPerformanceMode(2, true);
break;
case Keys.F17:
modeControl.SetPerformanceMode(0, true);
break;
case Keys.F18:
modeControl.SetPerformanceMode(1, true);
break;
case Keys.F19:
modeControl.SetPerformanceMode(3, true);
break;
case Keys.F20:
modeControl.SetPerformanceMode(4, true);
break;
} }
} }
@@ -568,6 +606,12 @@ namespace GHelper.Input
case 56: case 56:
KeyProcess("m4"); KeyProcess("m4");
return; return;
case 162:
OnScreenKeyboard.Show();
return;
case 124:
KeyProcess("m3");
return;
} }
} }

View File

@@ -1,6 +1,6 @@
using HidSharp; using GHelper.USB;
using GHelper.USB; using HidSharp;
using GHelper.Ally; using System.Text;
namespace GHelper.Input namespace GHelper.Input
{ {
@@ -16,17 +16,17 @@ namespace GHelper.Input
var task = Task.Run(Listen); var task = Task.Run(Listen);
} }
private void Listen () { private void Listen()
{
HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID); HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
// Fallback // Fallback
int count = 0; int count = 0;
while (input == null && count++ < 5) while (input == null && count++ < 10)
{ {
Aura.Init(); Thread.Sleep(1000);
Thread.Sleep(2000);
input = AsusHid.FindHidStream(AsusHid.INPUT_ID); input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
} }
@@ -36,6 +36,7 @@ namespace GHelper.Input
return; return;
} }
AsusHid.WriteInput(Encoding.ASCII.GetBytes("ZASUS Tech.Inc."));
Logger.WriteLine($"Input: {input.Device.DevicePath}"); Logger.WriteLine($"Input: {input.Device.DevicePath}");
try try

View File

@@ -415,6 +415,8 @@ namespace GHelper.Mode
return; return;
} }
if (!RyzenControl.IsRingExsists()) return;
try try
{ {
SetUV(AppConfig.GetMode("cpu_uv", 0)); SetUV(AppConfig.GetMode("cpu_uv", 0));

View File

@@ -60,6 +60,16 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ally {
get {
object obj = ResourceManager.GetObject("ally", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -160,6 +170,16 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_animation_32 {
get {
object obj = ResourceManager.GetObject("icons8-animation-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -230,6 +250,16 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_controls_32 {
get {
object obj = ResourceManager.GetObject("icons8-controls-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -660,6 +690,16 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_xbox_rt_32 {
get {
object obj = ResourceManager.GetObject("icons8-xbox-rt-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View File

@@ -136,6 +136,9 @@
<data name="icons8-bicycle-48 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </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"> <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> <value>..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@@ -154,6 +157,9 @@
<data name="icons8-controller-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-controller-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-controls-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-controls-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8-next-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-next-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-next-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-next-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@@ -184,6 +190,9 @@
<data name="icons8-laptop-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-laptop-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-laptop-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-laptop-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="ally" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ally.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_remove_64" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_remove_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@@ -196,8 +205,8 @@
<data name="icons8-keyboard-32 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-keyboard-32 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-keyboard-32 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-keyboard-32 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-xbox-lt-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-video-card-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-video-card-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-video-card-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-video-card-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -229,6 +238,9 @@
<data name="icons8_charging_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_charging_battery_96" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-animation-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-animation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="dot_ultimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@@ -241,8 +253,8 @@
<data name="backlight_down" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="backlight_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-rocket-48" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-spa-flower-48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="dot_standard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -274,8 +286,8 @@
<data name="icons8-gauge-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-gauge-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-gauge-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-gauge-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="standard" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-rocket-48" 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> <value>..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8_fan_32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_fan_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-fan-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-fan-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -313,7 +325,7 @@
<data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-charging-battery-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8-xbox-lt-32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8-xbox-rt-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\icons8-xbox-rt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

View File

@@ -1215,7 +1215,7 @@ namespace GHelper.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Multizone. /// Looks up a localized string similar to Multi Zone.
/// </summary> /// </summary>
internal static string Multizone { internal static string Multizone {
get { get {
@@ -1223,6 +1223,15 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Multi Zone Strong.
/// </summary>
internal static string MultizoneStrong {
get {
return ResourceManager.GetString("MultizoneStrong", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Mute Mic. /// Looks up a localized string similar to Mute Mic.
/// </summary> /// </summary>
@@ -1268,6 +1277,15 @@ namespace GHelper.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to One Zone.
/// </summary>
internal static string OneZone {
get {
return ResourceManager.GetString("OneZone", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Open G-Helper window. /// Looks up a localized string similar to Open G-Helper window.
/// </summary> /// </summary>

View File

@@ -504,7 +504,10 @@ Trotzdem fortfahren?</value>
<value>Maus synchronisieren</value> <value>Maus synchronisieren</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multi-Zone</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mikrofon stummschalten</value> <value>Mikrofon stummschalten</value>
@@ -521,6 +524,9 @@ Trotzdem fortfahren?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Nicht verbunden</value> <value>Nicht verbunden</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>G-Helper Fenster öffnen</value> <value>G-Helper Fenster öffnen</value>
</data> </data>

View File

@@ -506,6 +506,9 @@
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multizona</value>
</data> </data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multizona fuerte</value>
</data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Silenciar micrófono</value> <value>Silenciar micrófono</value>
</data> </data>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>No conectado</value> <value>No conectado</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>Una zona</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Abrir ventana G-Helper</value> <value>Abrir ventana G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Voulez-vous continuer ?</value>
<value>Synchroniser avec le pointeur</value> <value>Synchroniser avec le pointeur</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multi-zone</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Désactiver le micro</value> <value>Désactiver le micro</value>
@@ -521,6 +524,9 @@ Voulez-vous continuer ?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Non connecté</value> <value>Non connecté</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Ouvrir G-Helper</value> <value>Ouvrir G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Do you still want to continue?</value>
<value>Szinkronizálás egérrel</value> <value>Szinkronizálás egérrel</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Többzónás</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mikrofon némítása</value> <value>Mikrofon némítása</value>
@@ -521,6 +524,9 @@ Do you still want to continue?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Nincs csatlakoztatva</value> <value>Nincs csatlakoztatva</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>G-Helper ablak megnyitása</value> <value>G-Helper ablak megnyitása</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Apakah Anda masih ingin melanjutkan?</value>
<value>Sinkronkan dengan mouse</value> <value>Sinkronkan dengan mouse</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Bisukan Mic</value> <value>Bisukan Mic</value>
@@ -521,6 +524,9 @@ Apakah Anda masih ingin melanjutkan?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Tidak Tersambung</value> <value>Tidak Tersambung</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Buka Jendela G-Helper</value> <value>Buka Jendela G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Sei sicuro di voler continuare?</value>
<value>Sincronizza con Mouse</value> <value>Sincronizza con Mouse</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Silenzia microfono</value> <value>Silenzia microfono</value>
@@ -521,6 +524,9 @@ Sei sicuro di voler continuare?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Non Connesso</value> <value>Non Connesso</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Apri G-Helper</value> <value>Apri G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@
<value>마우스와 동기화</value> <value>마우스와 동기화</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>멀티존</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>마이크 음소거</value> <value>마이크 음소거</value>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>연결되지 않음</value> <value>연결되지 않음</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>G-Helper 열기</value> <value>G-Helper 열기</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Vis tiek norite tęsti?</value>
<value>Sinchronizuoti su pele</value> <value>Sinchronizuoti su pele</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Daugiazonis</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mikrofono nutildymas</value> <value>Mikrofono nutildymas</value>
@@ -521,6 +524,9 @@ Vis tiek norite tęsti?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Neprijungta</value> <value>Neprijungta</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Atidaryti G-Helper langą</value> <value>Atidaryti G-Helper langą</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Nadal chcesz kontynuować?</value>
<value>Synchronizuj z myszką</value> <value>Synchronizuj z myszką</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizone</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Wyciszenie mikrofonu</value> <value>Wyciszenie mikrofonu</value>
@@ -521,6 +524,9 @@ Nadal chcesz kontynuować?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Nie połączono</value> <value>Nie połączono</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Otwórz okno G-Helper</value> <value>Otwórz okno G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Do you still want to continue?</value>
<value>Synchronize with mouse</value> <value>Synchronize with mouse</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Desligar microfone</value> <value>Desligar microfone</value>
@@ -521,6 +524,9 @@ Do you still want to continue?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Not Connected</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Abrir G-Helper</value> <value>Abrir G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Quer prosseguir?</value>
<value>Sincronizar com o rato</value> <value>Sincronizar com o rato</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizona</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Desligar microfone</value> <value>Desligar microfone</value>
@@ -521,6 +524,9 @@ Quer prosseguir?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Não conectado</value> <value>Não conectado</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Abrir G-Helper</value> <value>Abrir G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Do you still want to continue?</value>
<value>Synchronize with mouse</value> <value>Synchronize with mouse</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizone</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mute Mic</value> <value>Mute Mic</value>
@@ -521,6 +524,9 @@ Do you still want to continue?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Not Connected</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Open G-Helper window</value> <value>Open G-Helper window</value>
</data> </data>

View File

@@ -504,7 +504,10 @@
<value>Sincronizare cu mouse-ul</value> <value>Sincronizare cu mouse-ul</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Multizone</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Oprire microfon</value> <value>Oprire microfon</value>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Neconectat</value> <value>Neconectat</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Deschide fereastra G-Helper</value> <value>Deschide fereastra G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Yine de devam etmek istiyor musunuz?</value>
<value>Fare ile senkronize edin</value> <value>Fare ile senkronize edin</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Çoklu Bölge</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Mikrofonu Sustur</value> <value>Mikrofonu Sustur</value>
@@ -521,6 +524,9 @@ Yine de devam etmek istiyor musunuz?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Bağlantı Yok</value> <value>Bağlantı Yok</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>G-Helper penceresini aç</value> <value>G-Helper penceresini aç</value>
</data> </data>

View File

@@ -504,7 +504,10 @@
<value>Синхронізувати з мишею</value> <value>Синхронізувати з мишею</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Мультизони</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Вимкнути мікрофон</value> <value>Вимкнути мікрофон</value>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Не під'єднано</value> <value>Не під'єднано</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Відкрити вікно G-Helper</value> <value>Відкрити вікно G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@ Do you still want to continue?</value>
<value>Synchronize with mouse</value> <value>Synchronize with mouse</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>Đèn nền Đa vùng(Multi-Zone)</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>Tắt Mic</value> <value>Tắt Mic</value>
@@ -521,6 +524,9 @@ Do you still want to continue?</value>
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>Not Connected</value> <value>Not Connected</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>Mở cửa sổ G-Helper</value> <value>Mở cửa sổ G-Helper</value>
</data> </data>

View File

@@ -504,7 +504,10 @@
<value>和鼠标同步</value> <value>和鼠标同步</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>多区域设置</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>静音麦克风</value> <value>静音麦克风</value>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>未连接</value> <value>未连接</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>打开G-Helper窗口</value> <value>打开G-Helper窗口</value>
</data> </data>

View File

@@ -250,10 +250,10 @@
<value>閒置幾秒後關閉燈光:插電時 / 使用電池 (0 = 不關閉)</value> <value>閒置幾秒後關閉燈光:插電時 / 使用電池 (0 = 不關閉)</value>
</data> </data>
<data name="BacklightTimeoutBattery" xml:space="preserve"> <data name="BacklightTimeoutBattery" xml:space="preserve">
<value>Backlight Timeout when on battery</value> <value>閒置時關閉燈光(電池模式)</value>
</data> </data>
<data name="BacklightTimeoutPlugged" xml:space="preserve"> <data name="BacklightTimeoutPlugged" xml:space="preserve">
<value>Backlight Timeout when plugged</value> <value>閒置時關閉燈光(充電模式)</value>
</data> </data>
<data name="Balanced" xml:space="preserve"> <data name="Balanced" xml:space="preserve">
<value>平衡模式</value> <value>平衡模式</value>
@@ -271,7 +271,7 @@
<value>僅本次將電力充滿</value> <value>僅本次將電力充滿</value>
</data> </data>
<data name="BiosAndDriverUpdates" xml:space="preserve"> <data name="BiosAndDriverUpdates" xml:space="preserve">
<value>BIOS與驅動程式更新 Updates</value> <value>BIOS與驅動程式更新</value>
</data> </data>
<data name="Boot" xml:space="preserve"> <data name="Boot" xml:space="preserve">
<value>開機時</value> <value>開機時</value>
@@ -504,7 +504,10 @@
<value>與滑鼠同步</value> <value>與滑鼠同步</value>
</data> </data>
<data name="Multizone" xml:space="preserve"> <data name="Multizone" xml:space="preserve">
<value>多區域</value> <value>Multi Zone</value>
</data>
<data name="MultizoneStrong" xml:space="preserve">
<value>Multi Zone Strong</value>
</data> </data>
<data name="MuteMic" xml:space="preserve"> <data name="MuteMic" xml:space="preserve">
<value>麥克風開關</value> <value>麥克風開關</value>
@@ -521,6 +524,9 @@
<data name="NotConnected" xml:space="preserve"> <data name="NotConnected" xml:space="preserve">
<value>未連線</value> <value>未連線</value>
</data> </data>
<data name="OneZone" xml:space="preserve">
<value>One Zone</value>
</data>
<data name="OpenGHelper" xml:space="preserve"> <data name="OpenGHelper" xml:space="preserve">
<value>開啟G-Helper視窗</value> <value>開啟G-Helper視窗</value>
</data> </data>

BIN
app/Resources/ally.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

View File

@@ -4,7 +4,10 @@
// //
using GHelper.Helpers;
using System.Management; using System.Management;
using System.Net;
using System.Reflection;
namespace Ryzen namespace Ryzen
{ {
@@ -52,7 +55,8 @@ namespace Ryzen
CPUName = obj["Name"].ToString(); CPUName = obj["Name"].ToString();
CPUModel = obj["Caption"].ToString(); CPUModel = obj["Caption"].ToString();
} }
} catch (Exception ex) }
catch (Exception ex)
{ {
Logger.WriteLine(ex.Message); Logger.WriteLine(ex.Message);
} }
@@ -142,6 +146,54 @@ namespace Ryzen
return CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H"); return CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H");
} }
public static bool IsRingExsists()
{
string exeDir = Path.GetDirectoryName(Application.ExecutablePath);
return File.Exists(exeDir + "\\" + "WinRing0x64.dll");
}
public static void DownloadRing()
{
var appVersion = new Version(Assembly.GetExecutingAssembly().GetName().Version.ToString());
string requestUri = "https://github.com/seerge/g-helper/releases/download/v" + appVersion.Major + "." + appVersion.Minor + "/PluginAdvancedSettings.zip";
Uri uri = new Uri(requestUri);
string exeDir = Path.GetDirectoryName(Application.ExecutablePath);
string zipName = Path.GetFileName(uri.LocalPath);
string zipLocation = exeDir + "\\" + zipName;
using (WebClient client = new WebClient())
{
Logger.WriteLine(requestUri);
Logger.WriteLine(exeDir);
Logger.WriteLine(zipName);
try
{
client.DownloadFile(uri, zipLocation);
}
catch (Exception ex)
{
Logger.WriteLine(ex.Message);
Logger.WriteLine(ex.ToString());
if (!ProcessHelper.IsUserAdministrator() && !ex.Message.Contains("remote server")) ProcessHelper.RunAsAdmin("uv");
return;
}
try
{
System.IO.Compression.ZipFile.ExtractToDirectory(zipLocation, exeDir, overwriteFiles: true);
File.Delete(zipLocation);
ProcessHelper.RunAsAdmin("uv", true);
}
catch (Exception ex)
{
Logger.WriteLine(ex.ToString());
}
}
}
public static void SetAddresses() public static void SetAddresses()
{ {

View File

@@ -112,12 +112,12 @@ namespace GHelper
labelPeripherals = new Label(); labelPeripherals = new Label();
panelAlly = new Panel(); panelAlly = new Panel();
tableLayoutAlly = new TableLayoutPanel(); tableLayoutAlly = new TableLayoutPanel();
buttonController = new RButton();
buttonBacklight = new RButton(); buttonBacklight = new RButton();
buttonControllerMode = new RButton(); buttonControllerMode = new RButton();
panelAllyTitle = new Panel(); panelAllyTitle = new Panel();
pictureAlly = new PictureBox(); pictureAlly = new PictureBox();
labelAlly = new Label(); labelAlly = new Label();
buttonController = new RButton();
panelMatrix.SuspendLayout(); panelMatrix.SuspendLayout();
tableLayoutMatrix.SuspendLayout(); tableLayoutMatrix.SuspendLayout();
panelMatrixTitle.SuspendLayout(); panelMatrixTitle.SuspendLayout();
@@ -715,7 +715,7 @@ namespace GHelper
buttonFPS.FlatAppearance.BorderSize = 0; buttonFPS.FlatAppearance.BorderSize = 0;
buttonFPS.FlatStyle = FlatStyle.Flat; buttonFPS.FlatStyle = FlatStyle.Flat;
buttonFPS.ForeColor = SystemColors.ControlText; buttonFPS.ForeColor = SystemColors.ControlText;
buttonFPS.Image = Properties.Resources.icons8_video_48; buttonFPS.Image = Properties.Resources.icons8_animation_32;
buttonFPS.ImageAlign = ContentAlignment.MiddleRight; buttonFPS.ImageAlign = ContentAlignment.MiddleRight;
buttonFPS.Location = new Point(4, 4); buttonFPS.Location = new Point(4, 4);
buttonFPS.Margin = new Padding(4); buttonFPS.Margin = new Padding(4);
@@ -1485,6 +1485,28 @@ namespace GHelper
tableLayoutAlly.Size = new Size(787, 80); tableLayoutAlly.Size = new Size(787, 80);
tableLayoutAlly.TabIndex = 23; tableLayoutAlly.TabIndex = 23;
// //
// buttonController
//
buttonController.Activated = false;
buttonController.BackColor = SystemColors.ControlLight;
buttonController.BorderColor = Color.Transparent;
buttonController.BorderRadius = 5;
buttonController.Dock = DockStyle.Fill;
buttonController.FlatAppearance.BorderSize = 0;
buttonController.FlatStyle = FlatStyle.Flat;
buttonController.ForeColor = SystemColors.ControlText;
buttonController.Image = Properties.Resources.icons8_controls_32;
buttonController.ImageAlign = ContentAlignment.MiddleRight;
buttonController.Location = new Point(528, 4);
buttonController.Margin = new Padding(4);
buttonController.Name = "buttonController";
buttonController.Secondary = true;
buttonController.Size = new Size(255, 72);
buttonController.TabIndex = 11;
buttonController.Text = "Controller";
buttonController.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonController.UseVisualStyleBackColor = false;
//
// buttonBacklight // buttonBacklight
// //
buttonBacklight.Activated = false; buttonBacklight.Activated = false;
@@ -1562,27 +1584,6 @@ namespace GHelper
labelAlly.TabIndex = 26; labelAlly.TabIndex = 26;
labelAlly.Text = "Ally Controller"; labelAlly.Text = "Ally Controller";
// //
// buttonController
//
buttonController.Activated = false;
buttonController.BackColor = SystemColors.ControlLight;
buttonController.BorderColor = Color.Transparent;
buttonController.BorderRadius = 5;
buttonController.Dock = DockStyle.Fill;
buttonController.FlatAppearance.BorderSize = 0;
buttonController.FlatStyle = FlatStyle.Flat;
buttonController.ForeColor = SystemColors.ControlText;
buttonController.ImageAlign = ContentAlignment.MiddleRight;
buttonController.Location = new Point(528, 4);
buttonController.Margin = new Padding(4);
buttonController.Name = "buttonController";
buttonController.Secondary = true;
buttonController.Size = new Size(255, 72);
buttonController.TabIndex = 11;
buttonController.Text = "Controller";
buttonController.TextImageRelation = TextImageRelation.ImageBeforeText;
buttonController.UseVisualStyleBackColor = false;
//
// SettingsForm // SettingsForm
// //
AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleDimensions = new SizeF(192F, 192F);

View File

@@ -305,6 +305,9 @@ namespace GHelper
case ControllerMode.Mouse: case ControllerMode.Mouse:
buttonControllerMode.Text = "Mouse"; buttonControllerMode.Text = "Mouse";
break; break;
case ControllerMode.Skip:
buttonControllerMode.Text = "Skip";
break;
default: default:
buttonControllerMode.Text = "Auto"; buttonControllerMode.Text = "Auto";
break; break;
@@ -318,7 +321,7 @@ namespace GHelper
public void VisualiseFPSLimit(int limit) public void VisualiseFPSLimit(int limit)
{ {
buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit < 120) ? limit : "OFF"); buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit <= 120) ? limit : "OFF");
} }
private void SettingsForm_LostFocus(object? sender, EventArgs e) private void SettingsForm_LostFocus(object? sender, EventArgs e)
@@ -926,7 +929,7 @@ namespace GHelper
public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled, bool hdr) public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr)
{ {
ButtonEnabled(button60Hz, screenEnabled); ButtonEnabled(button60Hz, screenEnabled);
@@ -965,10 +968,36 @@ namespace GHelper
panelScreen.Visible = false; panelScreen.Visible = false;
} }
if (miniled >= 0) if (miniled1 >= 0)
{ {
buttonMiniled.Activated = (miniled == 1) || hdr;
buttonMiniled.Enabled = !hdr; buttonMiniled.Enabled = !hdr;
buttonMiniled.Activated = miniled1 == 1 || hdr;
}
else if (miniled2 >= 0)
{
buttonMiniled.Enabled = !hdr;
switch (miniled2)
{
// Multizone On
case 0:
buttonMiniled.Text = Properties.Strings.Multizone;
buttonMiniled.BorderColor = colorStandard;
buttonMiniled.Activated = true;
break;
// Multizone Strong
case 1:
buttonMiniled.Text = Properties.Strings.MultizoneStrong;
buttonMiniled.BorderColor = colorTurbo;
buttonMiniled.Activated = true;
break;
// Multizone Off
case 2:
buttonMiniled.Text = hdr ? Properties.Strings.Multizone : Properties.Strings.OneZone;
buttonMiniled.BorderColor = colorStandard;
buttonMiniled.Activated = hdr;
break;
}
} }
else else
{ {
@@ -995,6 +1024,7 @@ namespace GHelper
if (extraForm != null && extraForm.Text != "") extraForm.Close(); if (extraForm != null && extraForm.Text != "") extraForm.Close();
if (updatesForm != null && updatesForm.Text != "") updatesForm.Close(); if (updatesForm != null && updatesForm.Text != "") updatesForm.Close();
if (matrixForm != null && matrixForm.Text != "") matrixForm.Close(); if (matrixForm != null && matrixForm.Text != "") matrixForm.Close();
if (handheldForm != null && handheldForm.Text != "") handheldForm.Close();
} }
/// <summary> /// <summary>
@@ -1015,6 +1045,7 @@ namespace GHelper
(extraForm != null && extraForm.ContainsFocus) || (extraForm != null && extraForm.ContainsFocus) ||
(updatesForm != null && updatesForm.ContainsFocus) || (updatesForm != null && updatesForm.ContainsFocus) ||
(matrixForm != null && matrixForm.ContainsFocus) || (matrixForm != null && matrixForm.ContainsFocus) ||
(handheldForm != null && handheldForm.ContainsFocus) ||
this.ContainsFocus || this.ContainsFocus ||
(lostFocusCheck && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300); (lostFocusCheck && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300);
} }
@@ -1185,14 +1216,14 @@ namespace GHelper
public void AutoKeyboard() public void AutoKeyboard()
{ {
InputDispatcher.SetBacklightAuto(true);
if (!AppConfig.Is("skip_aura")) if (!AppConfig.Is("skip_aura"))
{ {
Aura.ApplyPower(); Aura.ApplyPower();
Aura.ApplyAura(); Aura.ApplyAura();
} }
InputDispatcher.SetBacklightAuto(true);
if (Program.acpi.IsXGConnected()) if (Program.acpi.IsXGConnected())
XGM.Light(AppConfig.Is("xmg_light")); XGM.Light(AppConfig.Is("xmg_light"));
@@ -1295,10 +1326,16 @@ namespace GHelper
public void VisualiseGPUMode(int GPUMode = -1) public void VisualiseGPUMode(int GPUMode = -1)
{ {
if (AppConfig.IsAlly() && !Program.acpi.IsXGConnected()) if (AppConfig.IsAlly())
{ {
tableGPU.Visible = false; tableGPU.Visible = false;
GPUMode = AsusACPI.GPUModeEco; labelGPU.Text = "GPU";
if (Program.acpi.IsXGConnected())
{
tableAMD.Controls.Add(buttonXGM, 1, 0);
VisualizeXGM();
}
return;
} }
ButtonEnabled(buttonOptimized, true); ButtonEnabled(buttonOptimized, true);
@@ -1341,7 +1378,6 @@ namespace GHelper
VisualizeXGM(GPUMode); VisualizeXGM(GPUMode);
if (isGpuSection) if (isGpuSection)
{ {
menuEco.Checked = buttonEco.Activated; menuEco.Checked = buttonEco.Activated;

View File

@@ -3,7 +3,6 @@ using System.Runtime.InteropServices;
namespace GHelper.UI namespace GHelper.UI
{ {
public class RForm : Form public class RForm : Form
{ {

View File

@@ -110,6 +110,7 @@ namespace GHelper.USB
{ AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraStatic, Properties.Strings.AuraStatic },
{ AuraMode.AuraBreathe, Properties.Strings.AuraBreathe }, { AuraMode.AuraBreathe, Properties.Strings.AuraBreathe },
{ AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle }, { AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle },
{ AuraMode.AuraRainbow, Properties.Strings.AuraRainbow },
{ AuraMode.AuraStrobe, Properties.Strings.AuraStrobe }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe },
}; };
@@ -260,12 +261,29 @@ namespace GHelper.USB
public static void Init() public static void Init()
{ {
AsusHid.Write(new List<byte[]> { AsusHid.Write(new List<byte[]> {
new byte[] { AsusHid.AURA_ID, 0xb9 }, new byte[] { AsusHid.AURA_ID, 0xB9 },
Encoding.ASCII.GetBytes("]ASUS Tech.Inc."), Encoding.ASCII.GetBytes("]ASUS Tech.Inc."),
new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1a }, new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1A },
//Encoding.ASCII.GetBytes("^ASUS Tech.Inc."),
//new byte[] { 0x5e, 0x05, 0x20, 0x31, 0, 0x1a }
}, "Init"); }, "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");
}
} }
@@ -325,7 +343,17 @@ namespace GHelper.USB
if (flags.SleepRear) rear |= 1 << 6; if (flags.SleepRear) rear |= 1 << 6;
if (flags.ShutdownRear) rear |= 1 << 7; if (flags.ShutdownRear) rear |= 1 << 7;
return new byte[] { 0x5d, 0xbd, 0x01, keyb, bar, lid, rear, 0xFF }; return new byte[] { AsusHid.AURA_ID, 0xBD, 0x01, keyb, bar, lid, rear, 0xFF };
}
private static void ApplyAllyPower(AuraPower flags)
{
byte power = 0x00;
if (flags.BootKeyb) power |= 0x01;
if (flags.AwakeKeyb) power |= 0x02;
if (flags.SleepKeyb) power |= 0x04;
if (flags.ShutdownKeyb) power |= 0x08;
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x09, 0x01, power }, "Aura");
} }
public static void ApplyPower() public static void ApplyPower()
@@ -363,6 +391,12 @@ namespace GHelper.USB
flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid"); flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid");
flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid"); flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid");
if (AppConfig.IsAlly())
{
ApplyAllyPower(flags);
return;
}
AsusHid.Write(AuraPowerMessage(flags)); AsusHid.Write(AuraPowerMessage(flags));
if (isACPI) if (isACPI)
@@ -467,7 +501,7 @@ namespace GHelper.USB
byte[] keyBuf = new byte[mapSize]; byte[] keyBuf = new byte[mapSize];
buffer[0] = AsusHid.AURA_ID; buffer[0] = AsusHid.AURA_ID;
buffer[1] = 0xbc; buffer[1] = 0xBC;
buffer[2] = 0; buffer[2] = 0;
buffer[3] = 1; buffer[3] = 1;
buffer[4] = 1; buffer[4] = 1;
@@ -478,7 +512,7 @@ namespace GHelper.USB
if (init) if (init)
{ {
Init(); Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc }); AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xBC });
} }
Array.Clear(keyBuf, 0, keyBuf.Length); Array.Clear(keyBuf, 0, keyBuf.Length);
@@ -515,7 +549,8 @@ namespace GHelper.USB
buffer[6] = 0x00; buffer[6] = 0x00;
buffer[7] = 0x00; buffer[7] = 0x00;
if (isStrix4Zone) { // per zone if (isStrix4Zone)
{ // per zone
var leds_4_zone = packet4Zone.Count(); var leds_4_zone = packet4Zone.Count();
for (int ledIndex = 0; ledIndex < leds_4_zone; ledIndex++) for (int ledIndex = 0; ledIndex < leds_4_zone; ledIndex++)
{ {
@@ -629,7 +664,7 @@ namespace GHelper.USB
int _speed = (Speed == AuraSpeed.Normal) ? 0xeb : (Speed == AuraSpeed.Fast) ? 0xf5 : 0xe1; int _speed = (Speed == AuraSpeed.Normal) ? 0xeb : (Speed == AuraSpeed.Fast) ? 0xf5 : 0xe1;
AsusHid.Write(new List<byte[]> { AuraMessage(Mode, _Color1, _Color2, _speed, isSingleColor), MESSAGE_APPLY, MESSAGE_SET }); AsusHid.Write(new List<byte[]> { AuraMessage(Mode, _Color1, _Color2, _speed, isSingleColor), MESSAGE_SET, MESSAGE_APPLY });
if (isACPI) if (isACPI)
Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed); Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed);
@@ -689,7 +724,7 @@ namespace GHelper.USB
bound.Y += bound.Height / 3; bound.Y += bound.Height / 3;
bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel
Bitmap screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 ; Bitmap screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 ;
Bitmap screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar; Bitmap screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar;
int zones = AURA_ZONES; int zones = AURA_ZONES;

View File

@@ -6,7 +6,7 @@
Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services. Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality without extra bloat and unnecessary services.
Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more! Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, TUF Series, Strix / Scar Series, ProArt, VivoBook and many more!
# [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) # [:floppy_disk:Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
- [FAQ](https://github.com/seerge/g-helper/wiki/FAQ) - [FAQ](https://github.com/seerge/g-helper/wiki/FAQ)
- [Setup and Requirements](https://github.com/seerge/g-helper/wiki/Requirements) - [Setup and Requirements](https://github.com/seerge/g-helper/wiki/Requirements)
@@ -82,25 +82,20 @@ Each BIOS mode is paired with matching Windows Power Mode. You can adjust this s
![GPU Modes](https://github.com/seerge/g-helper/assets/5920850/65c6bdd5-728c-4965-b544-fcf5a85ed6a2) ![GPU Modes](https://github.com/seerge/g-helper/assets/5920850/65c6bdd5-728c-4965-b544-fcf5a85ed6a2)
### 🔖 Important Notice
G-Helper is **NOT** an operating system, firmware or a driver. It **DOESN'T** "run" your hardware in realtime anyhow.
It's an app that lets you select (already predefined and stored in BIOS) operating modes and (optionally) set some settings that already exist on your device (same as Armoury Crate). If you use same mode / settings as in Armoury Crate - performance of your device won't be different.
Role of G-Helper for your laptop is similar to a role of a remote control for your TV.
### :mouse: Asus Mouse and other peripherals support ### :mouse: Asus Mouse and other peripherals support
[Currently supported models](https://github.com/seerge/g-helper/discussions/900) [Currently supported models](https://github.com/seerge/g-helper/discussions/900)
- ROG Harpe Ace Aim Lab Edition
- ROG Keris Wireless
- ROG Chakram X (P708) - ROG Chakram X (P708)
- ROG Chakram Core (P511) - ROG Chakram Core (P511)
- ROG Strix III Gladius III Aimpoint Wireless (P711)
- ROG Gladius II and Gladius II Origin (P502 and P504) - ROG Gladius II and Gladius II Origin (P502 and P504)
- ROG Gladius III - ROG Gladius III
- ROG Gladius III Wireless - ROG Gladius III Wireless
- ROG Harpe Ace Aim Lab Edition
- ROG Keris Wireless
- ROG Strix Carry (P508)
- ROG Strix III Gladius III Aimpoint Wireless (P711)
- ROG Spatha
- ROG Strix Impact II Wireless - ROG Strix Impact II Wireless
- TUF Gaming M4 Wireless (P306) - TUF Gaming M4 Wireless (P306)
- TUF Gaming M3 - TUF Gaming M3
@@ -119,8 +114,13 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
- ``Fn + Shift + F7 / F8`` - Matrix brightness Down / Up - ``Fn + Shift + F7 / F8`` - Matrix brightness Down / Up
- ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up - ``Fn + Shift + F7 / F8`` - Screenpad brightness Down / Up
- ``Ctrl + Shift + F20`` - Mute Microphone - ``Ctrl + Shift + F20`` - Mute Microphone
- ``Ctrl + Shift + Alt + F14`` - Eco Mode - ``Ctrl + Shift + Alt + F14`` - Eco GPU Mode
- ``Ctrl + Shift + Alt + F15`` - Standard Mode - ``Ctrl + Shift + Alt + F15`` - Standard GPU Mode
- ``Ctrl + Shift + Alt + F16`` - Silent
- ``Ctrl + Shift + Alt + F17`` - Balanced
- ``Ctrl + Shift + Alt + F18`` - Turbo
- ``Ctrl + Shift + Alt + F19`` - Custom 1 (if exists)
- ``Ctrl + Shift + Alt + F20`` - Custom 2 (if exists)
- [Custom keybindings / hotkeys](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions) - [Custom keybindings / hotkeys](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions)
------------------ ------------------
@@ -132,13 +132,24 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
------------------ ------------------
**Libraries and projects used** ### 🔖 Important Notice
G-Helper is **NOT** an operating system, firmware, or driver. It **DOES NOT** "run" your hardware in real-time anyhow.
It's an app that lets you select one of the predefined operating modes created by Asus (and stored in BIOS) and optionally(!) set some settings that already exist on your device same as Armoury Crate can. It does it by using the Asus System Control Interface "driver" that Armoury uses for it.
If you use equivalent mode/settings as in Armoury Crate - the performance or the behavior of your device won't be different.
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/drivers/platform/x86/asus-wmi.c) for some basic endpoints in ASUS ACPI/WMI interface
- [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API - [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API
- [Starlight](https://github.com/vddCore/Starlight) for anime matrix communication protocol - [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 - [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) for undervolting using Ryzen System Management Unit
- [AsusCtl](https://gitlab.com/asus-linux/asusctl) for inspiration and some reverse engineering
**Disclaimers** ### Disclaimers
"ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only. "ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only.
THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION. THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION.