mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Check for optimization service before setting backlight
This commit is contained in:
@@ -55,26 +55,13 @@ public class NvidiaGpuControl : IGpuControl
|
||||
try
|
||||
{
|
||||
Process[] processes = internalGpu.GetActiveApplications();
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
try
|
||||
{
|
||||
process?.Kill();
|
||||
Logger.WriteLine("Stopped: " + process.ProcessName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
foreach (Process process in processes) ProcessHelper.KillByProcess(process);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//NVIDIA.RestartDisplayDriver();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user