mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-17 10:35:26 +00:00
23 lines
630 B
C#
23 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.
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|