From e9f8b9925f87805633c3654bfee0c5a128b85d87 Mon Sep 17 00:00:00 2001 From: BearOso Date: Tue, 7 Mar 2023 14:06:59 -0600 Subject: [PATCH] Gtk: Refresh window canvas when first displayed. Wayland/OpenGL doesn't receive a redraw cue after Gtk resizes the window and it scales a 256x224 corner of the larger surface up with the viewport extension. --- gtk/src/gtk_s9x.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/src/gtk_s9x.cpp b/gtk/src/gtk_s9x.cpp index 078ed672..5a7f1d74 100644 --- a/gtk/src/gtk_s9x.cpp +++ b/gtk/src/gtk_s9x.cpp @@ -228,6 +228,14 @@ void S9xNoROMLoaded() static bool S9xPauseFunc() { + static bool first_clear = false; + + if (!first_clear) + { + top_level->refresh(); + first_clear = true; + } + S9xProcessEvents(true); if (!S9xNetplayPush())