Merge branch 'main' into slash_lightning

This commit is contained in:
Serge
2024-02-11 16:23:51 +01:00
5 changed files with 21 additions and 6 deletions

View File

@@ -379,6 +379,11 @@ public static class AppConfig
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");
@@ -389,6 +394,11 @@ public static class AppConfig
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");

View File

@@ -638,7 +638,7 @@ namespace GHelper.Input
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");

View File

@@ -7,7 +7,6 @@
using GHelper.Helpers;
using System.Management;
using System.Net;
using System.Reflection;
namespace Ryzen
{
@@ -23,7 +22,6 @@ namespace Ryzen
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 = "";
@@ -42,6 +40,7 @@ namespace Ryzen
//PHEONIX - 9
//RAPHAEL/DRAGON RANGE - 10
//MENDOCINO - 11
//HAWKPOINT - 12
public static void Init()
{
@@ -108,7 +107,7 @@ namespace Ryzen
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
}
@@ -123,6 +122,11 @@ namespace Ryzen
FAMID = 11; //MENDOCINO
}
if (CPUModel.Contains("Model " + Convert.ToString(117)))
{
FAMID = 12; //HAWKPOINT
}
Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}");
SetAddresses();
@@ -224,7 +228,7 @@ namespace Ryzen
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;

View File

@@ -298,7 +298,7 @@ namespace GHelper.USB
if (AppConfig.IsAlly()) ApplyAura();
if (AppConfig.ContainsModel("GA503"))
if (AppConfig.IsInputBacklight())
AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4, (byte)brightness }, log);
});