Skip to content

Commit

Permalink
Merge branch 'main' into slash_lightning
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Feb 11, 2024
2 parents 7639950 + 1d30699 commit 6e88cd2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions app/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ public static bool IsSingleColor()
return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13") || IsARCNM() || ContainsModel("GA502IU");
}

public static bool IsInputBacklight()
{
return ContainsModel("GA503") || ContainsModel("GA403");
}

public static bool IsStrix()
{
return ContainsModel("Strix") || ContainsModel("Scar") || ContainsModel("G703G");
Expand All @@ -389,6 +394,11 @@ public static bool IsStrixLimitedRGB()
return (ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM") || ContainsModel("G531G")) && !Is("per_key_rgb");
}

public static bool IsNoAirplaneMode()
{
return ContainsModel("FX506");
}

public static bool IsNoDirectRGB()
{
return ContainsModel("GA503") || ContainsModel("G533Q");
Expand Down
2 changes: 1 addition & 1 deletion app/Input/InputDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static void HandleEvent(int EventID)
KeyProcess("m6");
return;
case 136: // FN + F12
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane");
if (!AppConfig.IsNoAirplaneMode()) Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane");
return;
case 181: // FN + Numpad Enter
KeyProcess("fne");
Expand Down
12 changes: 8 additions & 4 deletions app/Ryzen/RyzenControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using GHelper.Helpers;
using System.Management;
using System.Net;
using System.Reflection;

namespace Ryzen
{
Expand All @@ -23,7 +22,6 @@ internal class RyzenControl
public static int MinTemp => AppConfig.Get("min_temp", 75);
public const int MaxTemp = 98;

public static string[] FAM = { "RAVEN", "PICASSO", "DALI", "RENOIR/LUCIENNE", "MATISSE", "VANGOGH", "VERMEER", "CEZANNE/BARCELO", "REMBRANDT", "PHOENIX", "RAPHAEL/DRAGON RANGE" };
public static int FAMID { get; protected set; }

public static string CPUModel = "";
Expand All @@ -42,6 +40,7 @@ internal class RyzenControl
//PHEONIX - 9
//RAPHAEL/DRAGON RANGE - 10
//MENDOCINO - 11
//HAWKPOINT - 12

public static void Init()
{
Expand Down Expand Up @@ -108,7 +107,7 @@ public static void Init()
FAMID = 8; //REMBRANDT
}

if (CPUModel.Contains("Model " + Convert.ToString(116)))
if (CPUModel.Contains("Model " + Convert.ToString(116)) || CPUModel.Contains("Model " + Convert.ToString(120)))
{
FAMID = 9; //PHEONIX
}
Expand All @@ -123,6 +122,11 @@ public static void Init()
FAMID = 11; //MENDOCINO
}

if (CPUModel.Contains("Model " + Convert.ToString(117)))
{
FAMID = 12; //HAWKPOINT
}

Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}");

SetAddresses();
Expand Down Expand Up @@ -224,7 +228,7 @@ public static void SetAddresses()
Smu.PSMU_ADDR_RSP = 0x3B10A80;
Smu.PSMU_ADDR_ARG = 0x3B10A88;
}
else if (FAMID == 5 || FAMID == 8 || FAMID == 9 || FAMID == 11)
else if (FAMID == 5 || FAMID == 8 || FAMID == 9 || FAMID == 11 || FAMID == 12)
{
Smu.MP1_ADDR_MSG = 0x3B10528;
Smu.MP1_ADDR_RSP = 0x3B10578;
Expand Down
2 changes: 1 addition & 1 deletion app/USB/Aura.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public static void ApplyBrightness(int brightness, string log = "Backlight", boo

if (AppConfig.IsAlly()) ApplyAura();

if (AppConfig.ContainsModel("GA503"))
if (AppConfig.IsInputBacklight())
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4, (byte)brightness }, log);
});

Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contributio
### ⌨️ Keybindings

- ``Fn + F5 / Fn + Shift + F5`` - Toggle Performance Modes forwards / backwards
- ``Shift + Fn + F7 / F8`` - Set Anime Matrix / Slash Lightning brightness Down / Up
- ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - Toggle Performance Modes forwards / backwards
- ``Ctrl + Shift + F12`` - Open G-Helper window
- ``Ctrl + M1 / M2`` - Screen brightness Down / Up
Expand Down

0 comments on commit 6e88cd2

Please sign in to comment.