From 868a321e140b04088dbd315d5d76ea62547eb40b Mon Sep 17 00:00:00 2001 From: Collecting Date: Wed, 14 Jan 2026 23:11:15 +0000 Subject: [PATCH] multiplayer_room_overlay.cpp: Cleanup Signed-off-by: Collecting --- src/citron/util/multiplayer_room_overlay.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/citron/util/multiplayer_room_overlay.cpp b/src/citron/util/multiplayer_room_overlay.cpp index 58575c075..dc01d8236 100644 --- a/src/citron/util/multiplayer_room_overlay.cpp +++ b/src/citron/util/multiplayer_room_overlay.cpp @@ -224,6 +224,11 @@ void MultiplayerRoomOverlay::ConnectToRoom() { chat_room_widget->Initialize(&room_network); is_chat_initialized = true; } + + // This ensures the server doesn't use stale data from a previous session. + if (room_member->IsConnected() && !main_window->IsEmulationRunning()) { + room_member->SendGameInfo({}); + } } else { ClearUI(); } @@ -268,9 +273,8 @@ void MultiplayerRoomOverlay::UpdateRoomData() { } } - // Ensure we don't think we are emulating if the status is "Not playing a game" - bool is_emulating = !local_game_info.name.empty() && - local_game_info.name != tr("Not playing a game").toStdString(); + // Check local emulator state so the UI updates instantly when stopping a game + bool is_emulating = main_window && main_window->IsEmulationRunning(); int point_size = UISettings::IsGamescope() ? 11 : 10; if (this->width() < 340) point_size = 10;