From 7a6d055094846b7787f9b8c0f238c0c68709f632 Mon Sep 17 00:00:00 2001 From: crueter Date: Sun, 1 Nov 2026 21:53:04 +0100 Subject: [PATCH] [desktop] queue FirstFrameDisplayed to fix loading screen race (#4536) Signed-off-by: crueter - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md). - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Authored-by: Bitekiyo <334587657+Bitekiyo@users.noreply.github.com> Co-authored-by: Bitekiyo <334587657+Bitekiyo@users.noreply.github.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4536 --- src/yuzu/bootmanager.cpp | 3 ++- src/yuzu/main_window.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 308db3621b..d45083b4b9 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -131,7 +131,8 @@ GRenderWindow::GRenderWindow(MainWindow* parent, strict_context_required = QGuiApplication::platformName() == QStringLiteral("wayland") || QGuiApplication::platformName() == QStringLiteral("wayland-egl"); - connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &MainWindow::OnLoadComplete); + connect(this, &GRenderWindow::FirstFrameDisplayed, parent, &MainWindow::OnLoadComplete, + Qt::QueuedConnection); connect(this, &GRenderWindow::ExecuteProgramSignal, parent, &MainWindow::OnExecuteProgram, Qt::QueuedConnection); connect(this, &GRenderWindow::ExitSignal, parent, &MainWindow::OnExit, Qt::QueuedConnection); diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index 217f8d0356..635a4238a2 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -3147,6 +3147,10 @@ bool MainWindow::ConfirmShutdownGame() { void MainWindow::OnLoadComplete() { loading_screen->OnLoadComplete(); + if (emulation_running) { + render_window->show(); + render_window->setFocus(); + } perf_overlay = new PerformanceOverlay(this); perf_overlay->setVisible(ui->action_Show_Performance_Overlay->isChecked());