From a9ad983c137744472eeeebcc7ee2588d9398ee58 Mon Sep 17 00:00:00 2001
From: german77 <juangerman-13@hotmail.com>
Date: Sat, 1 Jan 2022 17:57:43 -0600
Subject: [PATCH] yuzu: Fix UI elements not updating correctly

---
 src/yuzu/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 1e02d715b9..53f11a9ac6 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1547,6 +1547,8 @@ void GMainWindow::ShutdownGame() {
     emu_thread->wait();
     emu_thread = nullptr;
 
+    emulation_running = false;
+
     discord_rpc->Update();
 
     // The emulation is stopped, so closing the window or not does not matter anymore
@@ -1585,8 +1587,6 @@ void GMainWindow::ShutdownGame() {
     emu_frametime_label->setVisible(false);
     renderer_status_button->setEnabled(true);
 
-    emulation_running = false;
-
     game_path.clear();
 
     // When closing the game, destroy the GLWindow to clear the context after the game is closed