aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSera <62521228+SeraUQ@users.noreply.github.com>2021-01-19 03:31:59 +0100
committerGitHub <noreply@github.com>2021-01-19 13:31:59 +1100
commit2fe3b8e58c63196327214319f5d9654a4b3d30b2 (patch)
treefb2f727a70ad0252ac937c501b99b1215fa3b751
parent734747ae5806f85a9378d446d246b7eb27012bb6 (diff)
Fix some GLXBadDrawable crashes on linux (#1900)
Fixes the crashes on linux when you stop emulation, and when you try to exit the emulator while a game is running. Also tested on windows without problems on my side.
-rw-r--r--Ryujinx/Ui/MainWindow.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index 778afd12..1c847f4a 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -593,7 +593,6 @@ namespace Ryujinx.Ui
ToggleExtraWidgets(true);
}
- _viewBox.Remove(GlRendererWidget);
GlRendererWidget.Exit();
if(GlRendererWidget.Window != Window && GlRendererWidget.Window != null)
@@ -606,6 +605,7 @@ namespace Ryujinx.Ui
_windowsMultimediaTimerResolution?.Dispose();
_windowsMultimediaTimerResolution = null;
+ _viewBox.Remove(GlRendererWidget);
_viewBox.Add(_gameTableWindow);
_gameTableWindow.Expand = true;
@@ -713,6 +713,7 @@ namespace Ryujinx.Ui
// Wait for the other thread to dispose the HLE context before exiting.
_deviceExitStatus.WaitOne();
+ GlRendererWidget.Dispose();
}
}
@@ -1202,4 +1203,4 @@ namespace Ryujinx.Ui
UpdateGameTable();
}
}
-} \ No newline at end of file
+}