mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
P-cores fix
This commit is contained in:
@@ -686,7 +686,7 @@ public class AsusACPI
|
|||||||
public (int, int) GetCores(bool max = false)
|
public (int, int) GetCores(bool max = false)
|
||||||
{
|
{
|
||||||
int value = Program.acpi.DeviceGet(max ? CORES_MAX : CORES_CPU);
|
int value = Program.acpi.DeviceGet(max ? CORES_MAX : CORES_CPU);
|
||||||
//value = max ? 0x806 : 0x605;
|
//value = max ? 0x406 : 0x605;
|
||||||
|
|
||||||
if (value < 0) return (-1, -1);
|
if (value < 0) return (-1, -1);
|
||||||
Logger.WriteLine("Cores" + (max ? "Max" : "") + ": 0x" + value.ToString("X4"));
|
Logger.WriteLine("Cores" + (max ? "Max" : "") + ": 0x" + value.ToString("X4"));
|
||||||
|
|||||||
@@ -414,6 +414,8 @@ namespace GHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eCoresMax = Math.Max(8, eCoresMax);
|
||||||
|
|
||||||
panelCores.Visible = true;
|
panelCores.Visible = true;
|
||||||
|
|
||||||
comboCoresE.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboCoresE.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
@@ -431,11 +433,11 @@ namespace GHelper
|
|||||||
|
|
||||||
private void ButtonCores_Click(object? sender, EventArgs e)
|
private void ButtonCores_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Program.acpi.SetCores(AsusACPI.ECoreMin + comboCoresE.SelectedIndex, AsusACPI.PCoreMin + comboCoresP.SelectedIndex);
|
||||||
DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertAPUMemoryRestart, Properties.Strings.AlertAPUMemoryRestartTitle, MessageBoxButtons.YesNo);
|
DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertAPUMemoryRestart, Properties.Strings.AlertAPUMemoryRestartTitle, MessageBoxButtons.YesNo);
|
||||||
|
|
||||||
if (dialogResult == DialogResult.Yes)
|
if (dialogResult == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Program.acpi.SetCores(comboCoresE.SelectedIndex, comboCoresP.SelectedIndex);
|
|
||||||
Process.Start("shutdown", "/r /t 1");
|
Process.Start("shutdown", "/r /t 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user