diff --git a/app/AnimeMatrix/AniMatrixControl.cs b/app/AnimeMatrix/AniMatrixControl.cs index 7c826411..7262f2bb 100644 --- a/app/AnimeMatrix/AniMatrixControl.cs +++ b/app/AnimeMatrix/AniMatrixControl.cs @@ -103,7 +103,14 @@ namespace GHelper.AnimeMatrix switch ((SlashMode)running) { case SlashMode.Static: - deviceSlash.SetStatic(brightness); + var custom = AppConfig.GetString("slash_custom"); + if (custom is not null && custom.Length > 0) + { + deviceSlash.SetCustom(AppConfig.StringToBytes(custom)); + } else + { + deviceSlash.SetStatic(brightness); + } break; default: deviceSlash.SetMode((SlashMode)running); @@ -465,6 +472,7 @@ namespace GHelper.AnimeMatrix int matrixZoom = AppConfig.Get("matrix_zoom", 100); int matrixContrast = AppConfig.Get("matrix_contrast", 100); + int matrixGamma = AppConfig.Get("matrix_gamma", 0); int matrixSpeed = AppConfig.Get("matrix_speed", 50); @@ -486,9 +494,9 @@ namespace GHelper.AnimeMatrix image.SelectActiveFrame(dimension, i); if (rotation == MatrixRotation.Planar) - deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); + deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); else - deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); + deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); deviceMatrix.AddFrame(); } @@ -503,9 +511,9 @@ namespace GHelper.AnimeMatrix else { if (rotation == MatrixRotation.Planar) - deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); + deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); else - deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast); + deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); deviceMatrix.Present(); } diff --git a/app/AnimeMatrix/AnimeMatrixDevice.cs b/app/AnimeMatrix/AnimeMatrixDevice.cs index 5e5c5c47..01c91d3a 100644 --- a/app/AnimeMatrix/AnimeMatrixDevice.cs +++ b/app/AnimeMatrix/AnimeMatrixDevice.cs @@ -344,21 +344,21 @@ namespace GHelper.AnimeMatrix if (present) Present(); } - private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100) + private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100, int gamma = 0) { for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) { var pixel = bmp.GetPixel(x, y); - var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255); + var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255); if (color > 20) SetLedDiagonal(x, y, (byte)color, deltaX, deltaY - (FullRows / 2) - 1); } } } - private void SetBitmapLinear(Bitmap bmp, int contrast = 100) + private void SetBitmapLinear(Bitmap bmp, int contrast = 100, int gamma = 0) { for (int y = 0; y < bmp.Height; y++) { @@ -366,7 +366,7 @@ namespace GHelper.AnimeMatrix if (x % 2 == y % 2) { var pixel = bmp.GetPixel(x, y); - var color = Math.Min((pixel.R + pixel.G + pixel.B) * contrast / 300, 255); + var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255); if (color > 20) SetLedPlanar(x / 2, y, (byte)color); } @@ -413,7 +413,7 @@ namespace GHelper.AnimeMatrix Present(); } - public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100) + public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0) { int width = MaxColumns / 2 * 6; int height = MaxRows; @@ -440,11 +440,11 @@ namespace GHelper.AnimeMatrix } Clear(); - SetBitmapLinear(bmp, contrast); + SetBitmapLinear(bmp, contrast, gamma); } } - public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100) + public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0) { int width = MaxRows + FullRows; int height = MaxColumns + FullRows; @@ -471,7 +471,7 @@ namespace GHelper.AnimeMatrix } Clear(); - SetBitmapDiagonal(bmp, -panX, height + panY, contrast); + SetBitmapDiagonal(bmp, -panX, height + panY, contrast, gamma); } } diff --git a/app/AnimeMatrix/SlashDevice.cs b/app/AnimeMatrix/SlashDevice.cs index f2027260..4adb065c 100644 --- a/app/AnimeMatrix/SlashDevice.cs +++ b/app/AnimeMatrix/SlashDevice.cs @@ -119,13 +119,18 @@ namespace GHelper.AnimeMatrix public void SetStatic(int brightness = 0) { - byte brightnessByte = (byte)(brightness * 85.333); + SetCustom(Enumerable.Repeat((byte)(brightness * 85.333), 7).ToArray()); + } + + public void SetCustom(byte[] data) + { Set(Packet(0xD2, 0x02, 0x01, 0x08, 0xAC), "Static"); Set(Packet(0xD3, 0x03, 0x01, 0x08, 0xAC, 0xFF, 0xFF, 0x01, 0x05, 0xFF, 0xFF), "StaticSettings"); Set(Packet(0xD4, 0x00, 0x00, 0x01, 0xAC), "StaticSave"); - Set(Packet(0xD3, 0x00, 0x00, 0x07, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte, brightnessByte), "Static White"); + byte[] payload = new byte[] { 0xD3, 0x00, 0x00, 0x07 }; + Set(Packet(payload.Concat(data.Take(7)).ToArray()), "Static Data"); } public void SetOptions(bool status, int brightness = 0, int interval = 0) diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index 32207182..18cafb84 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -79,6 +79,7 @@ public class AsusACPI public const uint ScreenOverdrive = 0x00050019; public const uint ScreenMiniled1 = 0x0005001E; public const uint ScreenMiniled2 = 0x0005002E; + public const uint ScreenFHD = 0x0005001C; public const uint DevsCPUFan = 0x00110022; public const uint DevsGPUFan = 0x00110023; diff --git a/app/Display/ScreenControl.cs b/app/Display/ScreenControl.cs index dc0f6ceb..b48552f6 100644 --- a/app/Display/ScreenControl.cs +++ b/app/Display/ScreenControl.cs @@ -1,4 +1,6 @@ -namespace GHelper.Display +using System.Diagnostics; + +namespace GHelper.Display { public class ScreenControl { @@ -69,6 +71,18 @@ InitScreen(); } + public void ToogleFHD() + { + int fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD); + Logger.WriteLine($"FHD Toggle: {fhd}"); + + DialogResult dialogResult = MessageBox.Show("Changing display mode requires reboot", Properties.Strings.AlertUltimateTitle, MessageBoxButtons.YesNo); + if (dialogResult == DialogResult.Yes) + { + Program.acpi.DeviceSet(AsusACPI.ScreenFHD, (fhd == 1) ? 0 : 1, "FHD"); + Process.Start("shutdown", "/r /t 1"); + } + } public int ToogleMiniled() { @@ -125,6 +139,12 @@ bool screenEnabled = (frequency >= 0); + int fhd = -1; + if (AppConfig.IsDUO()) + { + fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD); + } + AppConfig.Set("frequency", frequency); AppConfig.Set("overdrive", overdrive); @@ -139,7 +159,8 @@ overdriveSetting: overdriveSetting, miniled1: miniled1, miniled2: miniled2, - hdr: hdr + hdr: hdr, + fhd: fhd ); }); diff --git a/app/Extra.cs b/app/Extra.cs index 431f0d5d..63f38115 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -716,7 +716,7 @@ namespace GHelper private void PictureHelp_Click(object? sender, EventArgs e) { - Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper#custom-hotkey-actions") { UseShellExecute = true }); + Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions") { UseShellExecute = true }); } private void CheckNoOverdrive_CheckedChanged(object? sender, EventArgs e) diff --git a/app/GHelper.csproj b/app/GHelper.csproj index 0208481f..44c1a7c9 100644 --- a/app/GHelper.csproj +++ b/app/GHelper.csproj @@ -15,7 +15,7 @@ AnyCPU False True - 0.167 + 0.168 diff --git a/app/Matrix.Designer.cs b/app/Matrix.Designer.cs index 62443eb0..79a06b46 100644 --- a/app/Matrix.Designer.cs +++ b/app/Matrix.Designer.cs @@ -35,6 +35,10 @@ panelMain = new Panel(); panelButtons = new Panel(); buttonReset = new UI.RButton(); + panelGamma = new Panel(); + labelGamma = new Label(); + labelGammaTitle = new Label(); + trackGamma = new TrackBar(); panelContrast = new Panel(); labelContrast = new Label(); labelContrastTitle = new Label(); @@ -53,6 +57,8 @@ panelPicture.SuspendLayout(); panelMain.SuspendLayout(); panelButtons.SuspendLayout(); + panelGamma.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)trackGamma).BeginInit(); panelContrast.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackContrast).BeginInit(); panelRotation.SuspendLayout(); @@ -117,6 +123,7 @@ // panelMain.AutoSize = true; panelMain.Controls.Add(panelButtons); + panelMain.Controls.Add(panelGamma); panelMain.Controls.Add(panelContrast); panelMain.Controls.Add(panelRotation); panelMain.Controls.Add(panelScaling); @@ -125,7 +132,7 @@ panelMain.Dock = DockStyle.Top; panelMain.Location = new Point(20, 20); panelMain.Name = "panelMain"; - panelMain.Size = new Size(834, 959); + panelMain.Size = new Size(834, 1104); panelMain.TabIndex = 5; // // panelButtons @@ -133,7 +140,7 @@ panelButtons.Controls.Add(buttonReset); panelButtons.Controls.Add(buttonPicture); panelButtons.Dock = DockStyle.Top; - panelButtons.Location = new Point(0, 865); + panelButtons.Location = new Point(0, 1010); panelButtons.Name = "panelButtons"; panelButtons.Size = new Size(834, 94); panelButtons.TabIndex = 6; @@ -157,6 +164,52 @@ buttonReset.TextImageRelation = TextImageRelation.ImageBeforeText; buttonReset.UseVisualStyleBackColor = false; // + // panelGamma + // + panelGamma.AutoSize = true; + panelGamma.Controls.Add(labelGamma); + panelGamma.Controls.Add(labelGammaTitle); + panelGamma.Controls.Add(trackGamma); + panelGamma.Dock = DockStyle.Top; + panelGamma.Location = new Point(0, 865); + panelGamma.Name = "panelGamma"; + panelGamma.Size = new Size(834, 145); + panelGamma.TabIndex = 7; + // + // labelGamma + // + labelGamma.Anchor = AnchorStyles.Top | AnchorStyles.Right; + labelGamma.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); + labelGamma.Location = new Point(673, 17); + labelGamma.Name = "labelGamma"; + labelGamma.Size = new Size(125, 32); + labelGamma.TabIndex = 4; + labelGamma.Text = "Brightness"; + labelGamma.TextAlign = ContentAlignment.TopRight; + // + // labelGammaTitle + // + labelGammaTitle.AutoSize = true; + labelGammaTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); + labelGammaTitle.Location = new Point(16, 17); + labelGammaTitle.Name = "labelGammaTitle"; + labelGammaTitle.Size = new Size(134, 32); + labelGammaTitle.TabIndex = 3; + labelGammaTitle.Text = "Brightness"; + // + // trackGamma + // + trackGamma.LargeChange = 50; + trackGamma.Location = new Point(16, 52); + trackGamma.Maximum = 100; + trackGamma.Minimum = -100; + trackGamma.Name = "trackGamma"; + trackGamma.Size = new Size(782, 90); + trackGamma.SmallChange = 10; + trackGamma.TabIndex = 2; + trackGamma.TickFrequency = 20; + trackGamma.TickStyle = TickStyle.TopLeft; + // // panelContrast // panelContrast.AutoSize = true; @@ -172,13 +225,13 @@ // labelContrast // labelContrast.Anchor = AnchorStyles.Top | AnchorStyles.Right; - labelContrast.AutoSize = true; labelContrast.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); - labelContrast.Location = new Point(705, 17); + labelContrast.Location = new Point(701, 17); labelContrast.Name = "labelContrast"; labelContrast.Size = new Size(103, 32); labelContrast.TabIndex = 4; labelContrast.Text = "Contrast"; + labelContrast.TextAlign = ContentAlignment.TopRight; // // labelContrastTitle // @@ -310,7 +363,7 @@ AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoSize = true; - ClientSize = new Size(874, 1006); + ClientSize = new Size(874, 1142); Controls.Add(panelMain); MaximizeBox = false; MinimizeBox = false; @@ -326,6 +379,9 @@ panelMain.ResumeLayout(false); panelMain.PerformLayout(); panelButtons.ResumeLayout(false); + panelGamma.ResumeLayout(false); + panelGamma.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)trackGamma).EndInit(); panelContrast.ResumeLayout(false); panelContrast.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackContrast).EndInit(); @@ -361,5 +417,9 @@ private Label labelContrast; private Label labelContrastTitle; private TrackBar trackContrast; + private Panel panelGamma; + private Label labelGamma; + private Label labelGammaTitle; + private TrackBar trackGamma; } } \ No newline at end of file diff --git a/app/Matrix.cs b/app/Matrix.cs index 78c2a4a5..0600173d 100644 --- a/app/Matrix.cs +++ b/app/Matrix.cs @@ -47,10 +47,14 @@ namespace GHelper trackZoom.ValueChanged += TrackZoom_Changed; trackZoom.Value = Math.Min(trackZoom.Maximum, AppConfig.Get("matrix_zoom", 100)); - trackContrast.MouseUp += TrackContrast_MouseUp; ; - trackContrast.ValueChanged += TrackContrast_ValueChanged; ; + trackContrast.MouseUp += TrackMatrix_MouseUp; + trackContrast.ValueChanged += TrackMatrix_ValueChanged; trackContrast.Value = Math.Min(trackContrast.Maximum, AppConfig.Get("matrix_contrast", 100)); + trackGamma.MouseUp += TrackMatrix_MouseUp; + trackGamma.ValueChanged += TrackMatrix_ValueChanged; + trackGamma.Value = Math.Min(trackGamma.Maximum, AppConfig.Get("matrix_gamma", 0)); + VisualiseMatrix(); comboScaling.DropDownStyle = ComboBoxStyle.DropDownList; @@ -67,17 +71,19 @@ namespace GHelper } - private void TrackContrast_ValueChanged(object? sender, EventArgs e) + private void TrackMatrix_ValueChanged(object? sender, EventArgs e) { VisualiseMatrix(); } - private void TrackContrast_MouseUp(object? sender, MouseEventArgs e) + private void TrackMatrix_MouseUp(object? sender, MouseEventArgs e) { AppConfig.Set("matrix_contrast", trackContrast.Value); + AppConfig.Set("matrix_gamma", trackGamma.Value); SetMatrixPicture(); } + private void ComboRotation_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_rotation", comboRotation.SelectedIndex); @@ -104,10 +110,12 @@ namespace GHelper { labelZoom.Text = trackZoom.Value + "%"; labelContrast.Text = trackContrast.Value + "%"; + labelGamma.Text = trackGamma.Value + "%"; } private void ButtonReset_Click(object? sender, EventArgs e) { + AppConfig.Set("matrix_gamma", 0); AppConfig.Set("matrix_contrast", 100); AppConfig.Set("matrix_zoom", 100); AppConfig.Set("matrix_x", 0); @@ -115,6 +123,7 @@ namespace GHelper trackZoom.Value = 100; trackContrast.Value = 100; + trackGamma.Value = 0; SetMatrixPicture(); diff --git a/app/Mode/ModeControl.cs b/app/Mode/ModeControl.cs index 92c74954..858a6dc2 100644 --- a/app/Mode/ModeControl.cs +++ b/app/Mode/ModeControl.cs @@ -285,6 +285,7 @@ namespace GHelper.Mode { bool allAMD = Program.acpi.IsAllAmdPPT(); + bool isAMD = RyzenControl.IsAMD(); int limit_total = AppConfig.GetMode("limit_total"); int limit_cpu = AppConfig.GetMode("limit_cpu"); @@ -312,7 +313,7 @@ namespace GHelper.Mode Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, limit_slow, "PowerLimit A0"); customPower = limit_total; } - else if (RyzenControl.IsAMD()) + else if (isAMD) { if (ProcessHelper.IsUserAdministrator()) @@ -331,10 +332,9 @@ namespace GHelper.Mode Program.acpi.DeviceSet(AsusACPI.PPT_CPUB0, limit_cpu, "PowerLimit B0"); customPower = limit_cpu; } - else if (Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models + else if (isAMD && Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models { Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, limit_fast, "PowerLimit C1"); - customPower = limit_fast; } diff --git a/app/Properties/Strings.da.resx b/app/Properties/Strings.da.resx new file mode 100644 index 00000000..6be752fe --- /dev/null +++ b/app/Properties/Strings.da.resx @@ -0,0 +1,797 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Acceleration + + + Kan ikke oprette forbindelse til ASUS ACPI. Applikationen kan ikke fungere uden. Prøv at installere Asus System Control Interface + + + Genstart din enhed for at anvende ændringerne + + + Genstart nu? + + + Ser ud til at GPU er i kraftig brug, vil du deaktivere den? + + + Øko-tilstand + + + Slukning af Ultimativ tilstand kræver genstart + + + Ultimativ tilstand kræver genstart + + + Genstart nu? + + + Ally Controller + + + Animationshastighed + + + Anime Matrix + + + Appen kører allerede + + + G-Helper kører allerede. Tjek systembakken for et ikon. + + + Anvend + + + Anvend blæserkurve + + + Anvend strømgrænser + + + Automatisk justering af Windows strømtilstande + + + Hukommelse tildelt til GPU + + + Kørende Asus-tjenester + + + Batteritilstand + + + Vejrtrækning + + + Med uret + + + Farvecyklus + + + Komet + + + Mod uret + + + Hurtig + + + Lystilstand + + + Normal + + + Regnbue + + + Tilfældig + + + Reager + + + Langsom + + + Statisk + + + Strobelys + + + Alle + + + Dock + + + Logo + + + Scroll-hjul + + + Underglød + + + Anvend automatisk + + + Automatisk + + + Sætter 60 Hz for at spare på batteri, og tilbage når tilsluttet + + + Vågen + + + Lav + + + Maksimal + + + Mellem + + + Slukket + + + Timeout tilsluttet / på batteri (0 - TIL) + + + Baggrundslys timeout på batteri + + + Timeout for baggrundslys når tilsluttet + + + Balanceret + + + Opladning + + + Batteriopladningsgrænse + + + Batteritilstand + + + Engangsopladning til 100% + + + Binding + + + Primær + + + Sekundær + + + BIOS og driveropdateringer + + + Boot + + + Boot-lyd + + + Lysstyrke + + + Lysstyrke ned + + + Lysstyrke op + + + Sort og hvid bakkeikon + + + Kalibrer + + + Oplader + + + Farve + + + Kontrast + + + Controller + + + CPU Boost + + + Brugerdefineret + + + Deceleration + + + Standard + + + Deaktiver Controller + + + Deaktiver ved lukning af låg + + + Deaktiver overdrive på skærmen + + + Aflader + + + Hent farveprofiler + + + Hent + + + Drivere og software + + + Deaktiverer dGPU for at spare på batteriet + + + Øko + + + Aktiver GPU ved nedlukning (forhindrer problemer med Øko-tilstand) + + + Deaktivering af dGPU ved at gå i Øko-tilstand, mens visningstilstand i NVIDIA Kontrolpanel ikke er indstillet til Optimus kan forårsage problemer med lysstyrkekontrol indtil efter næste genstart. + +Vil du stadig fortsætte? + + + NVIDIA Visningstilstand er ikke indstillet til Optimus + + + Energiindstillinger + + + Eksporter profil + + + Ekstra + + + Ekstra indstillinger + + + Standard fabriksindstillinger + + + Blæserkurver + + + CPU blæserkurveprofil + + + GPU blæserkurveprofil + + + Midt blæserprofil + + + Blæserprofiler + + + Blæsere og kraft + + + Blæser + + + Blæser + Kraft + + + Flimmerfri dæmpning + + + Aktiver Fn + F genvejstaster uden Fn + + + FN-lås fra + + + FN-lås til + + + Dynamisk boost + + + Skifter + + + Core Clock forskydning + + + Memory Clock forskydning + + + GPU- tilstand + + + Kun iGPU + + + iGPU + dGPU + + + dGPU eksklusivt + + + GPU- strøm + + + GPU-indstillinger + + + Temperaturmål + + + Minutter til dvale i standby på batteriet (0 - OFF) + + + Høj + + + Billedrotation + + + Importer profil + + + Tastebindinger + + + Tastatur + + + Stop alle apps der bruger GPU når du skifter til Øko + + + Bærbar baggrundsbelysning + + + Bærbar tastatur + + + Bærbar skærm + + + LED statusindikatorer + + + Låg + + + Lightbar + + + Belysning + + + Låseskærm + + + Logo + + + Lav + + + Venstre stick dødzoner + + + Venstre udløser dødzoner + + + Lydvisualisering + + + Binær banner + + + Kraftigt + + + Ur + + + Dæmpet + + + ROG logo + + + Middel + + + Slukket + + + Billede + + + Maks. opdateringshastighed for lavere latenstid + + + 60Hz opdateringshastighed for at spare på batteriet + + + minut + + + minutter + + + Vinkel snapping + + + Automatisk slukning efter + + + Knaprespons + + + Import mislykkedes. Den valgte fil er ikke en gyldig museprofil eller den er korrupteret. + + + Løfteafstand + + + Lav batteriadvarsel ved + + + Ydelse + + + Synkroniser med mus + + + Multizone + + + Multizone stærk + + + Lydløs + + + Lydløs mikrofon + + + Aldrig + + + Nye opdateringer + + + Ingen nye opdateringer + + + Ikke tilsluttet + + + Fra + + + Til + + + En zone + + + Åbn G-Helper vindue + + + Optimeret + + + Skift til Øko på batteri og til Standard, når tilsluttet strøm + + + Hold GPU deaktiveret på USB-C-oplader i optimeret tilstand + + + Andet + + + Overdrive + + + Tilstand + + + Tilbehør + + + Billede / Gif + + + Afspil / Pause + + + Polling Rate + + + Kraftgrænser + + + Kraftgrænser er en eksperimentel funktion. Brug omhyggeligt og på egen risiko! + + + PrintScreen + + + Profil + + + Afslut + + + Nulstil + + + Noget bruger dGPU og forhindrer Øko-tilstand. Lad G-Helper forsøge at genstarte dGPU i enhedshåndtering? (fortsæt på egen risiko) + + + RPM + + + Højre stick dødzoner + + + Højre udløser dødzoner + + + Kør ved opstart + + + Skaleringskvalitet + + + Screenpad lysstyrke ned + + + Skærmtastatur lysstyrke op + + + Luk ned + + + Lydløs + + + Standby + + + Aktiverer dGPU til standardbrug + + + Standard + + + Start + + + Starter tjenester + + + Startfejl + + + Stop + + + Stop GPU-programmer + + + Stopper tjenester + + + Slå Aura til/fra + + + Automatisk slå Clamshell tilstand til/fra + + + Slå Fn-Lock til/fra + + + Slå MiniLED til/fra (hvis understøttet) + + + Slå skærmen til/fra + + + Turbo + + + Slukket + + + Deaktiver på batteri + + + Kobler bærbar skærm direkte til dGPU, hvilket maksimerer FPS + + + Ultimativ + + + Undervolting er en eksperimentel og risikabel funktion. Hvis de anvendte værdier er for lave for din hardware, kan det blive ustabilt, lukke ned eller forårsage datakorruption. Hvis du ønsker at prøve - start fra små værdier først, klik på Anvend og test hvad der virker for dig. + + + Ikke muted + + + Opdateringer + + + Version + + + Vibrationsstyrke + + + Visuel tilstand + + + Visuelle tilstande er ikke tilgængelige, når HDR er aktiv + + + Visuelle tilstande er ikke tilgængelige, når laptopskærmen er slukket + + + Lydstyrke ned + + + Lydløs + + + Lydstyrke op + + + Hold altid appvinduet øverst + + + Zoom + + \ No newline at end of file diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs index a5ea04be..b05ac806 100644 --- a/app/Settings.Designer.cs +++ b/app/Settings.Designer.cs @@ -88,6 +88,7 @@ namespace GHelper button60Hz = new RButton(); button120Hz = new RButton(); buttonMiniled = new RButton(); + buttonFHD = new RButton(); panelScreenTitle = new Panel(); labelMidFan = new Label(); pictureScreen = new PictureBox(); @@ -189,7 +190,7 @@ namespace GHelper panelMatrix.Controls.Add(tableLayoutMatrix); panelMatrix.Controls.Add(panelMatrixTitle); panelMatrix.Dock = DockStyle.Top; - panelMatrix.Location = new Point(11, 1051); + panelMatrix.Location = new Point(11, 1071); panelMatrix.Margin = new Padding(0); panelMatrix.Name = "panelMatrix"; panelMatrix.Padding = new Padding(20, 20, 20, 11); @@ -369,7 +370,7 @@ namespace GHelper panelBattery.Controls.Add(sliderBattery); panelBattery.Controls.Add(panelBatteryTitle); panelBattery.Dock = DockStyle.Top; - panelBattery.Location = new Point(11, 1705); + panelBattery.Location = new Point(11, 1725); panelBattery.Margin = new Padding(0); panelBattery.Name = "panelBattery"; panelBattery.Padding = new Padding(20, 20, 20, 11); @@ -461,7 +462,7 @@ namespace GHelper panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelFooter.Controls.Add(tableButtons); panelFooter.Dock = DockStyle.Top; - panelFooter.Location = new Point(11, 1881); + panelFooter.Location = new Point(11, 1901); panelFooter.Margin = new Padding(0); panelFooter.Name = "panelFooter"; panelFooter.Padding = new Padding(20); @@ -1042,7 +1043,7 @@ namespace GHelper panelScreen.Margin = new Padding(0); panelScreen.Name = "panelScreen"; panelScreen.Padding = new Padding(20, 11, 20, 0); - panelScreen.Size = new Size(827, 167); + panelScreen.Size = new Size(827, 187); panelScreen.TabIndex = 2; panelScreen.TabStop = true; // @@ -1050,7 +1051,7 @@ namespace GHelper // labelTipScreen.Dock = DockStyle.Top; labelTipScreen.ForeColor = SystemColors.GrayText; - labelTipScreen.Location = new Point(20, 131); + labelTipScreen.Location = new Point(20, 151); labelTipScreen.Margin = new Padding(4, 0, 4, 0); labelTipScreen.Name = "labelTipScreen"; labelTipScreen.Size = new Size(787, 36); @@ -1069,13 +1070,14 @@ namespace GHelper tableScreen.Controls.Add(button60Hz, 1, 0); tableScreen.Controls.Add(button120Hz, 2, 0); tableScreen.Controls.Add(buttonMiniled, 3, 0); + tableScreen.Controls.Add(buttonFHD, 3, 0); tableScreen.Dock = DockStyle.Top; tableScreen.Location = new Point(20, 51); tableScreen.Margin = new Padding(8, 4, 8, 4); tableScreen.Name = "tableScreen"; tableScreen.RowCount = 1; tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F)); - tableScreen.Size = new Size(787, 80); + tableScreen.Size = new Size(787, 100); tableScreen.TabIndex = 23; // // buttonScreenAuto @@ -1147,15 +1149,36 @@ namespace GHelper buttonMiniled.FlatAppearance.BorderSize = 0; buttonMiniled.FlatStyle = FlatStyle.Flat; buttonMiniled.ForeColor = SystemColors.ControlText; - buttonMiniled.Location = new Point(592, 4); + buttonMiniled.Location = new Point(4, 84); buttonMiniled.Margin = new Padding(4); buttonMiniled.Name = "buttonMiniled"; buttonMiniled.Secondary = false; - buttonMiniled.Size = new Size(191, 72); + buttonMiniled.Size = new Size(188, 12); buttonMiniled.TabIndex = 12; buttonMiniled.Text = Properties.Strings.Multizone; buttonMiniled.UseVisualStyleBackColor = false; // + // buttonFHD + // + buttonFHD.Activated = false; + buttonFHD.BackColor = SystemColors.ControlLightLight; + buttonFHD.BorderColor = Color.Transparent; + buttonFHD.BorderRadius = 5; + buttonFHD.CausesValidation = false; + buttonFHD.Dock = DockStyle.Fill; + buttonFHD.FlatAppearance.BorderSize = 0; + buttonFHD.FlatStyle = FlatStyle.Flat; + buttonFHD.ForeColor = SystemColors.ControlText; + buttonFHD.Location = new Point(592, 4); + buttonFHD.Margin = new Padding(4); + buttonFHD.Name = "buttonFHD"; + buttonFHD.Secondary = false; + buttonFHD.Size = new Size(191, 72); + buttonFHD.TabIndex = 13; + buttonFHD.Text = "FHD"; + buttonFHD.UseVisualStyleBackColor = false; + buttonFHD.Visible = false; + // // panelScreenTitle // panelScreenTitle.Controls.Add(labelMidFan); @@ -1209,7 +1232,7 @@ namespace GHelper panelKeyboard.Controls.Add(tableLayoutKeyboard); panelKeyboard.Controls.Add(panelKeyboardTitle); panelKeyboard.Dock = DockStyle.Top; - panelKeyboard.Location = new Point(11, 1374); + panelKeyboard.Location = new Point(11, 1394); panelKeyboard.Margin = new Padding(0); panelKeyboard.Name = "panelKeyboard"; panelKeyboard.Padding = new Padding(20); @@ -1393,7 +1416,7 @@ namespace GHelper panelVersion.Controls.Add(labelCharge); panelVersion.Controls.Add(checkStartup); panelVersion.Dock = DockStyle.Top; - panelVersion.Location = new Point(11, 1825); + panelVersion.Location = new Point(11, 1845); panelVersion.Margin = new Padding(4); panelVersion.Name = "panelVersion"; panelVersion.Size = new Size(827, 56); @@ -1419,7 +1442,7 @@ namespace GHelper panelPeripherals.Controls.Add(tableLayoutPeripherals); panelPeripherals.Controls.Add(panelPeripheralsTile); panelPeripherals.Dock = DockStyle.Top; - panelPeripherals.Location = new Point(11, 1506); + panelPeripherals.Location = new Point(11, 1526); panelPeripherals.Margin = new Padding(0); panelPeripherals.Name = "panelPeripherals"; panelPeripherals.Padding = new Padding(20, 20, 20, 11); @@ -1561,7 +1584,7 @@ namespace GHelper panelAlly.Controls.Add(tableLayoutAlly); panelAlly.Controls.Add(panelAllyTitle); panelAlly.Dock = DockStyle.Top; - panelAlly.Location = new Point(11, 1234); + panelAlly.Location = new Point(11, 1254); panelAlly.Margin = new Padding(0); panelAlly.Name = "panelAlly"; panelAlly.Padding = new Padding(20, 20, 20, 0); @@ -1698,7 +1721,7 @@ namespace GHelper panelGamma.Controls.Add(sliderGamma); panelGamma.Controls.Add(panelGammaTitle); panelGamma.Dock = DockStyle.Top; - panelGamma.Location = new Point(11, 818); + panelGamma.Location = new Point(11, 838); panelGamma.Margin = new Padding(0); panelGamma.Name = "panelGamma"; panelGamma.Padding = new Padding(20, 11, 20, 11); @@ -2095,6 +2118,7 @@ namespace GHelper private RComboBox comboColorTemp; private RButton buttonInstallColor; private Label labelVisual; + private RButton buttonFHD; private RButton buttonAutoTDP; } } diff --git a/app/Settings.cs b/app/Settings.cs index 2b4c5762..a07dc2d5 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -159,6 +159,7 @@ namespace GHelper button120Hz.Click += Button120Hz_Click; buttonScreenAuto.Click += ButtonScreenAuto_Click; buttonMiniled.Click += ButtonMiniled_Click; + buttonFHD.Click += ButtonFHD_Click; buttonQuit.Click += ButtonQuit_Click; @@ -216,6 +217,9 @@ namespace GHelper button120Hz.MouseMove += Button120Hz_MouseHover; button120Hz.MouseLeave += ButtonScreen_MouseLeave; + buttonFHD.MouseMove += ButtonFHD_MouseHover; + buttonFHD.MouseLeave += ButtonScreen_MouseLeave; + buttonUpdates.Click += ButtonUpdates_Click; sliderBattery.MouseUp += SliderBattery_MouseUp; @@ -268,6 +272,11 @@ namespace GHelper InitVisual(); } + private void ButtonFHD_Click(object? sender, EventArgs e) + { + screenControl.ToogleFHD(); + } + private void SliderBattery_KeyUp(object? sender, KeyEventArgs e) { BatteryControl.SetBatteryChargeLimit(sliderBattery.Value); @@ -786,6 +795,11 @@ namespace GHelper Program.settingsForm.RefreshSensors(); } + private void ButtonFHD_MouseHover(object? sender, EventArgs e) + { + labelTipScreen.Text = "Switch to "+ ((buttonFHD.Text == "FHD") ? "UHD" : "FHD") + " Mode"; + } + private void Button120Hz_MouseHover(object? sender, EventArgs e) { labelTipScreen.Text = Properties.Strings.MaxRefreshTooltip; @@ -1104,7 +1118,7 @@ namespace GHelper checkMatrixLid.Visible = true; } - comboMatrix.SelectedIndex = Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1); + comboMatrix.SelectedIndex = Math.Max(0, Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1)); comboMatrixRunning.SelectedIndex = Math.Min(AppConfig.Get("matrix_running", 0), comboMatrixRunning.Items.Count - 1); comboInterval.SelectedIndex = Math.Min(AppConfig.Get("matrix_interval", 0), comboInterval.Items.Count - 1); @@ -1164,7 +1178,7 @@ namespace GHelper - public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr) + public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr, int fhd) { ButtonEnabled(button60Hz, screenEnabled); @@ -1203,6 +1217,12 @@ namespace GHelper panelScreen.Visible = false; } + if (fhd >= 0) + { + buttonFHD.Visible = true; + buttonFHD.Text = fhd > 0 ? "FHD" : "UHD"; + } + if (miniled1 >= 0) { buttonMiniled.Enabled = !hdr; diff --git a/app/Updates.Designer.cs b/app/Updates.Designer.cs index 80291320..9728a777 100644 --- a/app/Updates.Designer.cs +++ b/app/Updates.Designer.cs @@ -112,9 +112,9 @@ namespace GHelper // labelUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelUpdates.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); - labelUpdates.Location = new Point(919, 19); + labelUpdates.Location = new Point(864, 19); labelUpdates.Name = "labelUpdates"; - labelUpdates.Size = new Size(245, 32); + labelUpdates.Size = new Size(302, 32); labelUpdates.TabIndex = 4; labelUpdates.Text = "Updates Available"; // diff --git a/docs/README.md b/docs/README.md index aa8eccf8..9ce23037 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,6 +22,10 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13 | ----------------- | ---------------- | | [Josh Cravey](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [cbutters Tech](https://www.youtube.com/watch?v=6aVdwJKZSSc) | +## 📰 Articles +1. https://binaryfork.com/ghelper-armoury-crate-alternative-10216/ +2. https://www.digitaltrends.com/computing/g-helper-armoury-crate-alternative/ + ## :gift: Advantages 1. Seamless and automatic GPU switching @@ -57,8 +61,6 @@ Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13 - Auto Screen refresh rate (60Hz on battery and max Hz when plugged) - Keyboard backlight timeout on battery or when plugged in -_To keep auto switching and hotkeys working the app needs to stay running in the tray. It doesn't consume any resources._ - ### :rocket: Performance Modes @@ -154,7 +156,7 @@ If you use equivalent mode/settings as in Armoury Crate - the performance or the The role of G-Helper for your laptop is similar to the role of a remote control for your TV. ### Libraries and projects used -- [Linux Kernel](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c) for some basic endpoints in ASUS ACPI/WMI interface +- [Linux Kernel](https://github.com/torvalds/linux/blob/master/include/linux/platform_data/x86/asus-wmi.h) for some basic endpoints in ASUS ACPI/WMI interface - [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API - [Starlight](https://github.com/vddCore/Starlight) for anime matrix communication protocol - [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) for undervolting using Ryzen System Management Unit