aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-05-07 18:37:48 +0200
committerGitHub <noreply@github.com>2021-05-07 13:37:48 -0300
commitacb1647c86ee8410817ae22b38fcd481a07fe84d (patch)
tree10a852ca7bd068e60151e24c044e4cc4b0f11854
parent7aed7808be17150df54e8961064abaa4f8a7cd10 (diff)
Fix embedded game rendering (#2275)
This fix an issue when after a relaunch of a game containing other games (embedded games), the renderer window size would be 1x1. This bug was introduced by #2260.
-rw-r--r--Ryujinx/Ui/RendererWidgetBase.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx/Ui/RendererWidgetBase.cs b/Ryujinx/Ui/RendererWidgetBase.cs
index 5270e31e..1e388747 100644
--- a/Ryujinx/Ui/RendererWidgetBase.cs
+++ b/Ryujinx/Ui/RendererWidgetBase.cs
@@ -64,6 +64,9 @@ namespace Ryujinx.Ui
private GraphicsDebugLevel _glLogLevel;
private string _gpuVendorName;
+ private int _windowHeight;
+ private int _windowWidth;
+
public RendererWidgetBase(InputManager inputManager, GraphicsDebugLevel glLogLevel)
{
_inputManager = inputManager;
@@ -225,7 +228,10 @@ namespace Ryujinx.Ui
Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window);
- Renderer?.Window.SetSize(evnt.Width * monitor.ScaleFactor, evnt.Height * monitor.ScaleFactor);
+ _windowWidth = evnt.Width * monitor.ScaleFactor;
+ _windowHeight = evnt.Height * monitor.ScaleFactor;
+
+ Renderer?.Window.SetSize(_windowWidth, _windowHeight);
return result;
}
@@ -293,6 +299,7 @@ namespace Ryujinx.Ui
{
Device = device;
Renderer = Device.Gpu.Renderer;
+ Renderer?.Window.SetSize(_windowWidth, _windowHeight);
}
public void Render()