1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-10 22:46:39 +00:00
Ryujinx/Ryujinx.Common/GraphicsDriver/DriverUtilities.cs
edisionnano 5c3112aaeb
Convert the bool to a lowercase string (#3080)
mesa_glthread doesn't accept PascalCase input
2022-02-06 12:52:39 -03:00

22 lines
640 B
C#

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