diff --git a/Source/Core/Core/MarioPartyNetplay/Discord.cpp b/Source/Core/Core/MarioPartyNetplay/Discord.cpp index b5570ad9c4..d73057123b 100644 --- a/Source/Core/Core/MarioPartyNetplay/Discord.cpp +++ b/Source/Core/Core/MarioPartyNetplay/Discord.cpp @@ -15,28 +15,49 @@ bool mpn_update_discord() if (CurrentState.Scenes != NULL && CurrentState.Scene != NULL) RichPresence.state = CurrentState.Scene->Name.c_str(); + DiscordRichPresence discord_presence = {}; + if (CurrentState.Addresses != NULL) { char Details[128] = ""; if (CurrentState.Boards && CurrentState.Board) { - DiscordRichPresence discord_presence = {}; - snprintf(Details, sizeof(Details), "Players: %d/4 Turn: %d/%d", - discord_presence.partySize, - mpn_read_value(CurrentState.Addresses->CurrentTurn, 1), - mpn_read_value(CurrentState.Addresses->TotalTurns, 1)); + if (discord_presence.partySize > 0) + { + snprintf(Details, sizeof(Details), "Players: %d/4 Turn: %d/%d", discord_presence.partySize, + mpn_read_value(CurrentState.Addresses->CurrentTurn, 1), + mpn_read_value(CurrentState.Addresses->TotalTurns, 1)); - RichPresence.smallImageKey = CurrentState.Board->Icon.c_str(); - RichPresence.smallImageText = CurrentState.Board->Name.c_str(); + RichPresence.smallImageKey = CurrentState.Board->Icon.c_str(); + RichPresence.smallImageText = CurrentState.Board->Name.c_str(); + } + else if (discord_presence.partySize = 0) + { + snprintf(Details, sizeof(Details), "Players: 1/4 Turn: %d/%d", + mpn_read_value(CurrentState.Addresses->CurrentTurn, 1), + mpn_read_value(CurrentState.Addresses->TotalTurns, 1)); + + RichPresence.smallImageKey = CurrentState.Board->Icon.c_str(); + RichPresence.smallImageText = CurrentState.Board->Name.c_str(); + } } else { - snprintf(Details, sizeof(Details), "Players: 1/4"); - RichPresence.smallImageKey = ""; - RichPresence.smallImageText = ""; + if (discord_presence.partySize > 0) + { + snprintf(Details, sizeof(Details), "Players: %d/4", discord_presence.partySize); + RichPresence.smallImageKey = ""; + RichPresence.smallImageText = ""; + } + else if (discord_presence.partySize = 0) + { + snprintf(Details, sizeof(Details), "Players: 1/4"); + RichPresence.smallImageKey = ""; + RichPresence.smallImageText = ""; + } + RichPresence.details = Details; } - RichPresence.details = Details; } RichPresence.startTimestamp = std::time(nullptr); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 480e1dee16..0f3592df1c 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -1005,10 +1005,10 @@ bool MainWindow::RequestStopNetplay() auto confirm = ModalMessageBox::question( confirm_parent, tr("Quitter!"), m_stop_requested ? tr("A user closed down their game from the netplay lobby. " - "This could the Netplay session has ended due to someone ragequitting! " + "This means the Netplay session has ended! " "Do you want to stop the current emulation?") : tr("A user closed down their game from the netplay lobby. " - "This could the Netplay session has ended due to someone ragequitting" + "This means the Netplay session has ended! " "Do you want to stop the current emulation?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::NoButton, Qt::ApplicationModal);