Remove another NativeLibrary.Load -> exception catch.

This time with Optimus stuff.
This commit is contained in:
Pieter-Jan Briers
2021-11-28 23:13:50 +01:00
parent 229d1c248b
commit 87ef010348

View File

@@ -15,17 +15,11 @@ namespace Robust.Client.Graphics.Clyde
RuntimeInformation.ProcessArchitecture == Architecture.X64 &&
Environment.GetEnvironmentVariable("ROBUST_INTEGRATED_GPU") != "1")
{
try
{
// We force load nvapi64.dll so nvidia gives us the dedicated GPU on optimus laptops.
// This is 100x easier than nvidia's documented approach of NvOptimusEnablement,
// and works while developing.
NativeLibrary.Load("nvapi64.dll");
}
catch (Exception)
{
// If this fails whatever.
}
// We force load nvapi64.dll so nvidia gives us the dedicated GPU on optimus laptops.
// This is 100x easier than nvidia's documented approach of NvOptimusEnablement,
// and works while developing.
NativeLibrary.TryLoad("nvapi64.dll", out _);
// If this fails whatever.
}
if (OperatingSystem.IsWindows())