0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Common/GraphicsDriver/DriverUtilities.cs
2021-04-18 17:34:00 +01:00

22 lines
630 B
C#

using System;
namespace Ryujinx.Common.GraphicsDriver
{
public static class DriverUtilities
{
public static void ToggleOGLThreading(bool enabled)
{
Environment.SetEnvironmentVariable("mesa_glthread", enabled.ToString());
Environment.SetEnvironmentVariable("__GL_THREADED_OPTIMIZATIONS", enabled ? "1" : "0");
try
{
NVThreadedOptimization.SetThreadedOptimization(enabled);
}
catch
{
// NVAPI is not available, or couldn't change the application profile.
}
}
}
}