mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
GPU apps stopping fix
This commit is contained in:
@@ -55,7 +55,16 @@ public class NvidiaGpuControl : IGpuControl
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Process[] processes = internalGpu.GetActiveApplications();
|
Process[] processes = internalGpu.GetActiveApplications();
|
||||||
foreach (Process process in processes) ProcessHelper.KillByProcess(process);
|
foreach (Process process in processes)
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Logger.WriteLine("Kill:" + process.ProcessName);
|
||||||
|
ProcessHelper.KillByProcess(process);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteLine(ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -993,7 +993,10 @@ namespace GHelper
|
|||||||
|
|
||||||
private void ButtonStopGPU_Click(object? sender, EventArgs e)
|
private void ButtonStopGPU_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
HardwareControl.KillGPUApps();
|
if (HardwareControl.GpuControl is not null)
|
||||||
|
{
|
||||||
|
HardwareControl.GpuControl.KillGPUApps();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void RefreshSensors(bool force = false)
|
public async void RefreshSensors(bool force = false)
|
||||||
@@ -1615,7 +1618,7 @@ namespace GHelper
|
|||||||
if (eco < 0 && mux < 0)
|
if (eco < 0 && mux < 0)
|
||||||
{
|
{
|
||||||
isGpuSection = false;
|
isGpuSection = false;
|
||||||
|
|
||||||
buttonEco.Visible = false;
|
buttonEco.Visible = false;
|
||||||
buttonStandard.Visible = false;
|
buttonStandard.Visible = false;
|
||||||
buttonUltimate.Visible = false;
|
buttonUltimate.Visible = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user