mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Intel Cores UI tweaks
This commit is contained in:
@@ -149,6 +149,12 @@ public class AsusACPI
|
||||
public const int MinGPUTemp = 75;
|
||||
public const int MaxGPUTemp = 87;
|
||||
|
||||
public const int PCoreMin = 4;
|
||||
public const int ECoreMin = 0;
|
||||
|
||||
public const int PCoreMax = 16;
|
||||
public const int ECoreMax = 16;
|
||||
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr CreateFile(
|
||||
@@ -690,7 +696,7 @@ public class AsusACPI
|
||||
|
||||
public void SetCores(int eCores, int pCores)
|
||||
{
|
||||
if (eCores < 0 || eCores > 16 || pCores < 0 || pCores > 16) return;
|
||||
if (eCores < ECoreMin || eCores > ECoreMax || pCores < PCoreMin || pCores > PCoreMax) return;
|
||||
int value = (eCores << 8) | pCores;
|
||||
Program.acpi.DeviceSet(CORES_CPU, value, "Cores (0x" + value.ToString("X4") + ")");
|
||||
}
|
||||
|
||||
4
app/Extra.Designer.cs
generated
4
app/Extra.Designer.cs
generated
@@ -1330,7 +1330,7 @@ namespace GHelper
|
||||
comboCoresP.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
comboCoresP.FormattingEnabled = true;
|
||||
comboCoresP.ItemHeight = 32;
|
||||
comboCoresP.Location = new Point(701, 10);
|
||||
comboCoresP.Location = new Point(543, 10);
|
||||
comboCoresP.Margin = new Padding(4, 12, 4, 9);
|
||||
comboCoresP.Name = "comboCoresP";
|
||||
comboCoresP.Size = new Size(150, 40);
|
||||
@@ -1346,7 +1346,7 @@ namespace GHelper
|
||||
comboCoresE.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
comboCoresE.FormattingEnabled = true;
|
||||
comboCoresE.ItemHeight = 32;
|
||||
comboCoresE.Location = new Point(543, 10);
|
||||
comboCoresE.Location = new Point(702, 10);
|
||||
comboCoresE.Margin = new Padding(4, 12, 4, 9);
|
||||
comboCoresE.Name = "comboCoresE";
|
||||
comboCoresE.Size = new Size(150, 40);
|
||||
|
||||
@@ -419,11 +419,11 @@ namespace GHelper
|
||||
comboCoresE.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboCoresP.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
|
||||
for (int i = 0; i <= eCoresMax; i++) comboCoresE.Items.Add(i.ToString() + " Ecores");
|
||||
for (int i = 0; i <= pCoresMax; i++) comboCoresP.Items.Add(i.ToString() + " Pcores");
|
||||
for (int i = AsusACPI.PCoreMin; i <= pCoresMax; i++) comboCoresP.Items.Add(i.ToString() + " Pcores");
|
||||
for (int i = AsusACPI.ECoreMin; i <= eCoresMax; i++) comboCoresE.Items.Add(i.ToString() + " Ecores");
|
||||
|
||||
comboCoresE.SelectedIndex = Math.Min(eCores, eCoresMax);
|
||||
comboCoresP.SelectedIndex = Math.Min(pCores, pCoresMax);
|
||||
comboCoresP.SelectedIndex = Math.Max(Math.Min(pCores - AsusACPI.PCoreMin, comboCoresP.Items.Count - 1), 0);
|
||||
comboCoresE.SelectedIndex = Math.Max(Math.Min(eCores - AsusACPI.ECoreMin, comboCoresE.Items.Count - 1), 0);
|
||||
|
||||
buttonCores.Click += ButtonCores_Click;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user