Extra logs

This commit is contained in:
Serge
2023-05-10 23:24:54 +02:00
parent 62512a7c05
commit 6d85376734
2 changed files with 6 additions and 5 deletions

View File

@@ -101,9 +101,9 @@ public class NvidiaGpuControl : IGpuControl
var pnpDeviceId = internalGpu.BusInformation.PCIIdentifiers.ToString(); var pnpDeviceId = internalGpu.BusInformation.PCIIdentifiers.ToString();
Logger.WriteLine("Device ID:"+ pnpDeviceId); Logger.WriteLine("Device ID:"+ pnpDeviceId);
RunCMD("pnputil", $"/disable-device /deviceid \"{pnpDeviceId}\""); RunCMD("pnputil", $"/disable-device /deviceid \"{pnpDeviceId}\"");
Thread.Sleep(2000); Thread.Sleep(3000);
RunCMD("pnputil", $"/enable-device /deviceid \"{pnpDeviceId}\""); RunCMD("pnputil", $"/enable-device /deviceid \"{pnpDeviceId}\"");
Thread.Sleep(1000); Thread.Sleep(2000);
} }
catch (Exception ex ) catch (Exception ex )
{ {

View File

@@ -629,8 +629,8 @@ public class NativeMethods
displayNum = count; displayNum = count;
} }
count++; count++;
Logger.WriteLine(device.outputTechnology.ToString()); //Logger.WriteLine(device.outputTechnology.ToString());
Logger.WriteLine(device.monitorFriendlyDeviceName); //Logger.WriteLine(device.monitorFriendlyDeviceName);
} }
var screens = Screen.AllScreens; var screens = Screen.AllScreens;
@@ -644,7 +644,7 @@ public class NativeMethods
{ {
laptopScreen = screen.DeviceName; laptopScreen = screen.DeviceName;
} }
Logger.WriteLine(screen.DeviceName); //Logger.WriteLine(screen.DeviceName);
count++; count++;
} }
} }
@@ -761,6 +761,7 @@ public class NativeMethods
{ {
PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme)); PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme));
PowerSetActiveOverlayScheme(new Guid(scheme)); PowerSetActiveOverlayScheme(new Guid(scheme));
Logger.WriteLine(scheme);
} }
public static void SetPowerScheme(int mode) public static void SetPowerScheme(int mode)