mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
fix 1/2
This commit is contained in:
parent
126b10e05a
commit
f161453af9
2 changed files with 34 additions and 13 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue