diff options
Diffstat (limited to 'Ryujinx/Ui/RendererWidgetBase.cs')
-rw-r--r-- | Ryujinx/Ui/RendererWidgetBase.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Ryujinx/Ui/RendererWidgetBase.cs b/Ryujinx/Ui/RendererWidgetBase.cs index a3ff4708..22e8d5c3 100644 --- a/Ryujinx/Ui/RendererWidgetBase.cs +++ b/Ryujinx/Ui/RendererWidgetBase.cs @@ -74,6 +74,7 @@ namespace Ryujinx.Ui private InputManager _inputManager; private IKeyboard _keyboardInterface; private GraphicsDebugLevel _glLogLevel; + private string _gpuBackendName; private string _gpuVendorName; private bool _isMouseInClient; @@ -120,7 +121,12 @@ namespace Ryujinx.Ui public abstract void SwapBuffers(object image); - public abstract string GetGpuVendorName(); + protected abstract string GetGpuBackendName(); + + private string GetGpuVendorName() + { + return Renderer.GetHardwareInfo().GpuVendor; + } private void HideCursorStateChanged(object sender, ReactiveEventArgs<bool> state) { @@ -227,7 +233,7 @@ namespace Ryujinx.Ui WindowWidth = evnt.Width * monitor.ScaleFactor; WindowHeight = evnt.Height * monitor.ScaleFactor; - Renderer?.Window.SetSize(WindowWidth, WindowHeight); + Renderer?.Window?.SetSize(WindowWidth, WindowHeight); return result; } @@ -308,7 +314,7 @@ namespace Ryujinx.Ui } Renderer = renderer; - Renderer?.Window.SetSize(WindowWidth, WindowHeight); + Renderer?.Window?.SetSize(WindowWidth, WindowHeight); if (Renderer != null) { @@ -387,6 +393,7 @@ namespace Ryujinx.Ui Device.Gpu.Renderer.Initialize(_glLogLevel); + _gpuBackendName = GetGpuBackendName(); _gpuVendorName = GetGpuVendorName(); Device.Gpu.Renderer.RunLoop(() => @@ -432,6 +439,7 @@ namespace Ryujinx.Ui StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs( Device.EnableDeviceVsync, Device.GetVolume(), + _gpuBackendName, dockedMode, ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(), $"Game: {Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)", @@ -477,7 +485,7 @@ namespace Ryujinx.Ui renderLoopThread.Start(); Thread nvStutterWorkaround = null; - if (Renderer is Graphics.OpenGL.Renderer) + if (Renderer is Graphics.OpenGL.OpenGLRenderer) { nvStutterWorkaround = new Thread(NVStutterWorkaround) { |