diff --git a/Dotnet/Overlay/Cef/VRCXVRCef.cs b/Dotnet/Overlay/Cef/VRCXVRCef.cs index 2f1e561d..d6573f5e 100644 --- a/Dotnet/Overlay/Cef/VRCXVRCef.cs +++ b/Dotnet/Overlay/Cef/VRCXVRCef.cs @@ -123,7 +123,7 @@ namespace VRCX _adapter, D3DDriverType.Unknown, Software: default, - (uint)(CreateDeviceFlag.BgraSupport | CreateDeviceFlag.Debug), + (uint)(CreateDeviceFlag.BgraSupport | (Program.LaunchDebug ? CreateDeviceFlag.Debug : 0)), null, 0, D3D11.SdkVersion, @@ -136,7 +136,8 @@ namespace VRCX _multithread = _device.QueryInterface(); _multithread.SetMultithreadProtected(true); - _device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!)); + if (Program.LaunchDebug) + _device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!)); _texture1.Dispose(); SilkMarshal.ThrowHResult diff --git a/Dotnet/Overlay/Cef/VRCXVRLegacy.cs b/Dotnet/Overlay/Cef/VRCXVRLegacy.cs index 163f41de..2d8d5222 100644 --- a/Dotnet/Overlay/Cef/VRCXVRLegacy.cs +++ b/Dotnet/Overlay/Cef/VRCXVRLegacy.cs @@ -117,7 +117,7 @@ namespace VRCX _adapter, D3DDriverType.Unknown, Software: default, - (uint)(CreateDeviceFlag.BgraSupport | CreateDeviceFlag.Debug), + (uint)(CreateDeviceFlag.BgraSupport | (Program.LaunchDebug ? CreateDeviceFlag.Debug : 0)), null, 0, D3D11.SdkVersion, @@ -130,7 +130,8 @@ namespace VRCX _multithread = _device.QueryInterface(); _multithread.SetMultithreadProtected(true); - _device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!)); + if (Program.LaunchDebug) + _device.SetInfoQueueCallback(msg => logger.Info(SilkMarshal.PtrToString((nint)msg.PDescription)!)); _texture1.Dispose(); SilkMarshal.ThrowHResult @@ -148,7 +149,8 @@ namespace VRCX Quality = 0 }, BindFlags = (uint)BindFlag.ShaderResource, - CPUAccessFlags = (uint)CpuAccessFlag.Write + CPUAccessFlags = (uint)CpuAccessFlag.Write, + Usage = Usage.Dynamic }, null, ref _texture1) ); @@ -168,7 +170,8 @@ namespace VRCX Quality = 0 }, BindFlags = (uint)BindFlag.ShaderResource, - CPUAccessFlags = (uint)CpuAccessFlag.Write + CPUAccessFlags = (uint)CpuAccessFlag.Write, + Usage = Usage.Dynamic }, null, ref _texture2) ); }