Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Dec 19, 2022
1 parent fb0efaa commit e662fb8
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Pages/ClockControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</StackPanel>
</StackPanel>

<StackPanel Margin="0,16,0,0">
<StackPanel Margin="0,16,0,0" Visibility="Collapsed">
<CheckBox Name="cbRaddGPUCore" Content="Radeon dGPU Settings:" FontSize="17.2" Foreground="White" BorderThickness="0,1,1,1" Padding="4,-4,0,0" Margin="3,0,0,0" />
<StackPanel Margin="20,5,0,0">
<RadioButton IsChecked="True" Name="rbFactory" Style="{DynamicResource RadioButtonStyleNormal}" Foreground="White" FontSize="16">Default</RadioButton>
Expand Down
105 changes: 58 additions & 47 deletions Pages/ClockControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using System.IO;
using System.Diagnostics;
using LibreHardwareMonitor.Hardware;
using System.Security.Cryptography;

namespace AATUV3.Pages
{
Expand Down Expand Up @@ -57,10 +58,10 @@ public ClockControl()
else if (Settings.Default.RadOption == 3) rbOCVRAM.IsChecked = true;
else if (Settings.Default.RadOption == 4) rbMan.IsChecked = true;

GetPowerInfo();
getGPURange();
getVRAMInfo();
getGPUClocks();
//GetPowerInfo();
//getGPURange();
//getVRAMInfo();
//getGPUClocks();
}

private void Disable_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -95,10 +96,20 @@ private async void Apply_Click(object sender, RoutedEventArgs e)

if (cbCoreVolt.IsChecked == true)
{
double vid = Math.Round((double)nudCoreVolt.Value / 1000, 2);
SendCommand.set_oc_volt(Convert.ToUInt32((1.55 - vid) / 0.00625));
SendCommand.set_oc_volt(Convert.ToUInt32((1.55 - vid) / 0.00625));
SendCommand.set_enable_oc();
if(Families.FAMID == 10)
{
double vid = ((double)nudCoreVolt.Value - 1125) / 5 + 1200;
SendCommand.set_oc_volt(Convert.ToUInt32(vid));
SendCommand.set_oc_volt(Convert.ToUInt32(vid));
SendCommand.set_enable_oc();
}
else
{
double vid = Math.Round((double)nudCoreVolt.Value / 1000, 2);
SendCommand.set_oc_volt(Convert.ToUInt32((1.55 - vid) / 0.00625));
SendCommand.set_oc_volt(Convert.ToUInt32((1.55 - vid) / 0.00625));
SendCommand.set_enable_oc();
}
i++;
}

Expand Down Expand Up @@ -152,45 +163,45 @@ private async void Apply_Click(object sender, RoutedEventArgs e)
i++;
}

if (cbRaddGPUCore.IsChecked == true)
{
// Get path
string path = "\\bin\\vramoc.exe";
string path2 = "\\bin\\coreoc.exe";
string path3 = "\\bin\\auto.exe";
string path4 = "\\bin\\power.exe";

// Pass settings on to be applied
if (rbFactory.IsChecked == true) BasicExeBackend.ApplySettings(path3, "0", true);
else if (rbUVGPU.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 0", true);
else if (rbOCGPU.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 1", true);
else if (rbOCVRAM.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 2", true);
else
{
power = (int)nudPower.Value;
minClock = (int)nudMinClockCore.Value;
maxClock = (int)nudMaxClockCore.Value;
Volt = (int)nudVoltage.Value;
VRAMClock = (int)nudVRAMClockMem.Value;
VRAMMode = 1;

await Task.Run(() =>
{
BasicExeBackend.ApplySettings(path3, "0", true);
Thread.Sleep(250);
BasicExeBackend.ApplySettings(path2, "3 " + minClock + " " + maxClock + " " + Volt, true);
Thread.Sleep(100);
BasicExeBackend.ApplySettings(path4, "1 " + power, true);
Thread.Sleep(100);
BasicExeBackend.ApplySettings(path, "4 " + VRAMClock, true);
Thread.Sleep(250);
BasicExeBackend.ApplySettings(path, "3 " + VRAMMode, true);
Thread.Sleep(100);
});

}
i++;
}
//if (cbRaddGPUCore.IsChecked == true)
//{
// // Get path
// string path = "\\bin\\vramoc.exe";
// string path2 = "\\bin\\coreoc.exe";
// string path3 = "\\bin\\auto.exe";
// string path4 = "\\bin\\power.exe";

// // Pass settings on to be applied
// if (rbFactory.IsChecked == true) BasicExeBackend.ApplySettings(path3, "0", true);
// else if (rbUVGPU.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 0", true);
// else if (rbOCGPU.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 1", true);
// else if (rbOCVRAM.IsChecked == true) BasicExeBackend.ApplySettings(path3, "1 2", true);
// else
// {
// power = (int)nudPower.Value;
// minClock = (int)nudMinClockCore.Value;
// maxClock = (int)nudMaxClockCore.Value;
// Volt = (int)nudVoltage.Value;
// VRAMClock = (int)nudVRAMClockMem.Value;
// VRAMMode = 1;

// await Task.Run(() =>
// {
// BasicExeBackend.ApplySettings(path3, "0", true);
// Thread.Sleep(250);
// BasicExeBackend.ApplySettings(path2, "3 " + minClock + " " + maxClock + " " + Volt, true);
// Thread.Sleep(100);
// BasicExeBackend.ApplySettings(path4, "1 " + power, true);
// Thread.Sleep(100);
// BasicExeBackend.ApplySettings(path, "4 " + VRAMClock, true);
// Thread.Sleep(250);
// BasicExeBackend.ApplySettings(path, "3 " + VRAMMode, true);
// Thread.Sleep(100);
// });

// }
// i++;
//}

if (i == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion Pages/HomeMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<RadioButton Style="{DynamicResource ButtonWithIcon}" Tag="{DynamicResource GitHub}" Margin="440,397,160,33" FontSize="20" Foreground="White" Content="Latest Releases" Height="70" Width="250" Click="Releases_Click"/>
<TextBlock Foreground="White" FontSize="16" Margin="1,0,0,-1.5" HorizontalAlignment="Left" VerticalAlignment="Bottom">

<Run Text="Universal x86 Tuning Utility - V1.0.0 Beta 9.1"/>
<Run Text="Universal x86 Tuning Utility - V1.0.0 Beta Build 9.2"/>
<LineBreak/>
<Run Text="Created by JamesCJ, sbski, and ProjectSBC"/>
</TextBlock>
Expand Down
2 changes: 1 addition & 1 deletion Scripts/GlobalVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class GlobalVariables
public static System.Diagnostics.Process magpieProcess = new System.Diagnostics.Process();
public static System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();

public static bool AdaptivePerf = true;
public static bool AdaptivePerf = false;

public static void UpdateMagpie()
{
Expand Down

0 comments on commit e662fb8

Please sign in to comment.