mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-25 10:48:40 +00:00
meh
This commit is contained in:
parent
2c393d35f0
commit
98c174edc4
520 changed files with 74815 additions and 58942 deletions
|
@ -235,19 +235,19 @@ void NetPlayBrowser::accept()
|
|||
|
||||
if (m_sessions[index].has_password)
|
||||
{
|
||||
auto* dialog = new QInputDialog(this);
|
||||
QInputDialog dialog(this);
|
||||
|
||||
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dialog->setWindowTitle(tr("Enter password"));
|
||||
dialog->setLabelText(tr("This session requires a password:"));
|
||||
dialog->setWindowModality(Qt::WindowModal);
|
||||
dialog->setTextEchoMode(QLineEdit::Password);
|
||||
dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dialog.setWindowTitle(tr("Enter password"));
|
||||
dialog.setLabelText(tr("This session requires a password:"));
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setTextEchoMode(QLineEdit::Password);
|
||||
|
||||
SetQWidgetWindowDecorations(dialog);
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
SetQWidgetWindowDecorations(&dialog);
|
||||
if (dialog.exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
const std::string password = dialog->textValue().toStdString();
|
||||
const std::string password = dialog.textValue().toStdString();
|
||||
|
||||
auto decrypted_id = session.DecryptID(password);
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "Core/IOS/FS/FileSystem.h"
|
||||
#include "Core/NetPlayServer.h"
|
||||
#include "Core/SyncIdentifier.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "DolphinQt/NetPlay/ChunkedProgressDialog.h"
|
||||
#include "DolphinQt/NetPlay/GameDigestDialog.h"
|
||||
|
@ -584,7 +585,7 @@ void NetPlayDialog::UpdateDiscordPresence()
|
|||
m_current_game_name);
|
||||
};
|
||||
|
||||
if (Core::IsRunning())
|
||||
if (Core::IsRunning(Core::System::GetInstance()))
|
||||
return use_default();
|
||||
|
||||
if (IsHosting())
|
||||
|
@ -808,7 +809,7 @@ void NetPlayDialog::DisplayMessage(const QString& msg, const std::string& color,
|
|||
|
||||
QColor c(color.empty() ? QStringLiteral("white") : QString::fromStdString(color));
|
||||
|
||||
if (g_ActiveConfig.bShowNetPlayMessages && Core::IsRunning())
|
||||
if (g_ActiveConfig.bShowNetPlayMessages && Core::IsRunning(Core::System::GetInstance()))
|
||||
g_netplay_chat_ui->AppendChat(msg.toStdString(),
|
||||
{static_cast<float>(c.redF()), static_cast<float>(c.greenF()),
|
||||
static_cast<float>(c.blueF())});
|
||||
|
@ -908,7 +909,7 @@ void NetPlayDialog::OnMsgStopGame()
|
|||
|
||||
void NetPlayDialog::OnMsgPowerButton()
|
||||
{
|
||||
if (!Core::IsRunning())
|
||||
if (!Core::IsRunning(Core::System::GetInstance()))
|
||||
return;
|
||||
QueueOnObject(this, [] { UICommon::TriggerSTMPowerEvent(); });
|
||||
}
|
||||
|
@ -972,9 +973,13 @@ void NetPlayDialog::OnHostInputAuthorityChanged(bool enabled)
|
|||
|
||||
void NetPlayDialog::OnDesync(u32 frame, const std::string& player)
|
||||
{
|
||||
DisplayMessage(tr("Possible desync detected: %1 might have desynced at frame %2")
|
||||
DisplayMessage(tr("Possible desync detected: %1 might have desynced at frame %2. Game restart advised.")
|
||||
.arg(QString::fromStdString(player), QString::number(frame)),
|
||||
"red", OSD::Duration::VERY_LONG);
|
||||
|
||||
OSD::AddTypedMessage(OSD::MessageType::NetPlayDesync,
|
||||
"Possible desync detected. Game restart advised.",
|
||||
OSD::Duration::VERY_LONG, OSD::Color::RED);
|
||||
}
|
||||
|
||||
void NetPlayDialog::OnConnectionLost()
|
||||
|
@ -1283,3 +1288,13 @@ void NetPlayDialog::SetHostWiiSyncData(std::vector<u64> titles, std::string redi
|
|||
if (client)
|
||||
client->SetWiiSyncData(nullptr, std::move(titles), std::move(redirect_folder));
|
||||
}
|
||||
|
||||
void NetPlayDialog::OnActiveGeckoCodes(std::string codeStr)
|
||||
{
|
||||
DisplayMessage(QString::fromStdString(codeStr), "cornflowerblue");
|
||||
}
|
||||
|
||||
void NetPlayDialog::OnActiveARCodes(std::string codeStr)
|
||||
{
|
||||
DisplayMessage(QString::fromStdString(codeStr), "cornflowerblue");
|
||||
}
|
|
@ -118,6 +118,9 @@ private:
|
|||
|
||||
void SendMessage(const std::string& message);
|
||||
|
||||
void OnActiveGeckoCodes(std::string codeStr);
|
||||
void OnActiveARCodes(std::string codeStr);
|
||||
|
||||
// Chat
|
||||
QGroupBox* m_chat_box;
|
||||
QTextEdit* m_chat_edit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue