Move DirectX Texture2D initialization to after OpenVR Init

This allows us to create the texture on the correct GPU.
This commit is contained in:
BenjaminZehowlt
2023-11-12 20:52:04 -05:00
committed by Natsumi
parent e436492c99
commit 928422e5b9
4 changed files with 26 additions and 37 deletions

View File

@@ -20,7 +20,6 @@ namespace VRCX
public static string ConfigLocation;
public static string Version { get; private set; }
public static bool LaunchDebug;
public static bool GPUFix;
private static readonly NLog.Logger logger = NLog.LogManager.GetLogger("VRCX");
static Program()
{
@@ -143,7 +142,6 @@ namespace VRCX
ProcessMonitor.Instance.Init();
SQLiteLegacy.Instance.Init();
VRCXStorage.Load();
LoadFromConfig();
CpuMonitor.Instance.Init();
Discord.Instance.Init();
WebApi.Instance.Init();
@@ -170,14 +168,5 @@ namespace VRCX
SQLiteLegacy.Instance.Exit();
ProcessMonitor.Instance.Exit();
}
/// <summary>
/// Sets GPUFix to true if it is not already set and the VRCX_GPUFix key in the database is true.
/// </summary>
private static void LoadFromConfig()
{
if (!GPUFix)
GPUFix = VRCXStorage.Instance.Get("VRCX_GPUFix") == "true";
}
}
}