diff --git a/app/Properties/Resources.Designer.cs b/app/Properties/Resources.Designer.cs
index 3a7831aa..c7831a70 100644
--- a/app/Properties/Resources.Designer.cs
+++ b/app/Properties/Resources.Designer.cs
@@ -330,6 +330,16 @@ namespace GHelper.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap icons8_video_48 {
+ get {
+ object obj = ResourceManager.GetObject("icons8_video_48", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/app/Properties/Resources.resx b/app/Properties/Resources.resx
index 9dbe76e7..7d70d000 100644
--- a/app/Properties/Resources.resx
+++ b/app/Properties/Resources.resx
@@ -211,4 +211,7 @@
..\Resources\icons8-help-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/app/Resources/icons8-video-48.png b/app/Resources/icons8-video-48.png
new file mode 100644
index 00000000..94a689db
Binary files /dev/null and b/app/Resources/icons8-video-48.png differ
diff --git a/app/Settings.Designer.cs b/app/Settings.Designer.cs
index 93304ddb..5d88c4e7 100644
--- a/app/Settings.Designer.cs
+++ b/app/Settings.Designer.cs
@@ -68,6 +68,7 @@ namespace GHelper
buttonStandard = new RButton();
buttonOptimized = new RButton();
buttonUltimate = new RButton();
+ buttonXGM = new RButton();
panelScreen = new Panel();
labelMidFan = new Label();
labelTipScreen = new Label();
@@ -534,19 +535,21 @@ namespace GHelper
panelGPU.Location = new Point(10, 210);
panelGPU.Margin = new Padding(8);
panelGPU.Name = "panelGPU";
- panelGPU.Padding = new Padding(0, 0, 0, 10);
+ panelGPU.Padding = new Padding(0, 0, 0, 45);
panelGPU.Size = new Size(810, 237);
panelGPU.TabIndex = 37;
//
// labelTipGPU
//
labelTipGPU.ForeColor = SystemColors.GrayText;
- labelTipGPU.Location = new Point(24, 191);
+ labelTipGPU.Location = new Point(44, 191);
labelTipGPU.Margin = new Padding(4, 0, 4, 0);
labelTipGPU.Name = "labelTipGPU";
labelTipGPU.Size = new Size(760, 36);
labelTipGPU.TabIndex = 20;
- labelTipGPU.Text = " ";
+ labelTipGPU.Text = "";
+ labelTipGPU.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
+
//
// pictureGPU
//
@@ -593,8 +596,9 @@ namespace GHelper
tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableGPU.Controls.Add(buttonEco, 0, 0);
tableGPU.Controls.Add(buttonStandard, 1, 0);
- tableGPU.Controls.Add(buttonOptimized, 2, 0);
tableGPU.Controls.Add(buttonUltimate, 2, 0);
+ tableGPU.Controls.Add(buttonXGM, 3, 0);
+ tableGPU.Controls.Add(buttonOptimized, 3, 0);
tableGPU.Location = new Point(16, 60);
tableGPU.Margin = new Padding(8, 4, 8, 4);
tableGPU.Name = "tableGPU";
@@ -691,6 +695,30 @@ namespace GHelper
buttonUltimate.Text = Properties.Strings.UltimateMode;
buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText;
buttonUltimate.UseVisualStyleBackColor = false;
+ //
+ // buttonXGM
+ //
+ buttonXGM.Activated = false;
+ buttonXGM.BackColor = SystemColors.ControlLightLight;
+ buttonXGM.BorderColor = Color.Transparent;
+ buttonXGM.BorderRadius = 5;
+ buttonXGM.Dock = DockStyle.Top;
+ buttonXGM.FlatAppearance.BorderSize = 0;
+ buttonXGM.FlatStyle = FlatStyle.Flat;
+ buttonXGM.ForeColor = SystemColors.ControlText;
+ buttonXGM.Image = Properties.Resources.icons8_video_48;
+ buttonXGM.ImageAlign = ContentAlignment.BottomCenter;
+ buttonXGM.Location = new Point(390, 4);
+ buttonXGM.Margin = new Padding(4);
+ buttonXGM.Name = "buttonXGM";
+ buttonXGM.Secondary = false;
+ buttonXGM.Size = new Size(185, 120);
+ buttonXGM.TabIndex = 2;
+ buttonXGM.Text = "XG Mobile";
+ buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText;
+ buttonXGM.UseVisualStyleBackColor = false;
+ buttonXGM.Visible = false;
+
//
// panelScreen
//
@@ -1078,6 +1106,7 @@ namespace GHelper
private Label labelGPU;
private Label labelGPUFan;
private TableLayoutPanel tableGPU;
+ private RButton buttonXGM;
private RButton buttonUltimate;
private RButton buttonStandard;
private RButton buttonEco;
diff --git a/app/Settings.cs b/app/Settings.cs
index 01394f81..67c88fee 100644
--- a/app/Settings.cs
+++ b/app/Settings.cs
@@ -50,6 +50,7 @@ namespace GHelper
buttonStandard.BorderColor = colorStandard;
buttonUltimate.BorderColor = colorTurbo;
buttonOptimized.BorderColor = colorEco;
+ buttonXGM.BorderColor = colorTurbo;
button60Hz.BorderColor = SystemColors.ActiveBorder;
button120Hz.BorderColor = SystemColors.ActiveBorder;
@@ -112,6 +113,8 @@ namespace GHelper
buttonUltimate.MouseMove += ButtonUltimate_MouseHover;
buttonUltimate.MouseLeave += ButtonGPU_MouseLeave;
+ buttonXGM.Click += ButtonXGM_Click;
+
buttonScreenAuto.MouseMove += ButtonScreenAuto_MouseHover;
buttonScreenAuto.MouseLeave += ButtonScreen_MouseLeave;
@@ -146,6 +149,18 @@ namespace GHelper
}
+ private void ButtonXGM_Click(object? sender, EventArgs e)
+ {
+ if (Program.wmi.DeviceGet(ASUSWmi.GPUXG) == 1)
+ {
+ Program.wmi.DeviceSet(ASUSWmi.GPUXG, 0, "GPU XGM");
+ } else
+ {
+ Program.wmi.DeviceSet(ASUSWmi.GPUXG, 1, "GPU XGM");
+ }
+ InitXGM();
+ }
+
private void SliderBattery_ValueChanged(object? sender, EventArgs e)
{
SetBatteryChargeLimit(sliderBattery.Value);
@@ -856,6 +871,7 @@ namespace GHelper
if (this.Visible)
{
InitScreen();
+ InitXGM();
this.Left = Screen.FromControl(this).WorkingArea.Width - 10 - this.Width;
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
@@ -1171,6 +1187,17 @@ namespace GHelper
}
+ public void InitXGM()
+ {
+ int connected = Program.wmi.DeviceGet(ASUSWmi.GPUXGConnected);
+ int enabled = Program.wmi.DeviceGet(ASUSWmi.GPUXG);
+
+ buttonXGM.Visible = (connected == 1);
+ buttonXGM.Activated = (enabled == 1);
+
+ }
+
+
public int InitGPUMode()
{
@@ -1202,6 +1229,8 @@ namespace GHelper
ButtonEnabled(buttonStandard, true);
ButtonEnabled(buttonUltimate, true);
+ InitXGM();
+
VisualiseGPUMode(GpuMode);
return GpuMode;