ForceDedicatedGpu.cs 452 B

12345678910111213141516
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Common.System
  3. {
  4. public static class ForceDedicatedGpu
  5. {
  6. public static void Nvidia()
  7. {
  8. if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
  9. {
  10. // NOTE: If the DLL exists, we can load it to force the usage of the dedicated Nvidia Gpu.
  11. NativeLibrary.TryLoad("nvapi64.dll", out _);
  12. }
  13. }
  14. }
  15. }