mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Merge branch 'master' of https://github.com/MarioPartyNetplay/Dolphin-MPN
This commit is contained in:
commit
1b8bdf7de7
899 changed files with 294977 additions and 411008 deletions
|
@ -125,7 +125,7 @@ void ChunkedProgressDialog::SetProgress(const int pid, const u64 progress)
|
|||
{
|
||||
QString player_name = GetPlayerNameFromPID(pid);
|
||||
|
||||
if (!m_status_labels.count(pid))
|
||||
if (!m_status_labels.contains(pid))
|
||||
return;
|
||||
|
||||
const float acquired = progress / 1024.0f / 1024.0f;
|
||||
|
|
|
@ -122,7 +122,7 @@ void GameDigestDialog::SetProgress(int pid, int progress)
|
|||
{
|
||||
QString player_name = GetPlayerNameFromPID(pid);
|
||||
|
||||
if (!m_status_labels.count(pid))
|
||||
if (!m_status_labels.contains(pid))
|
||||
return;
|
||||
|
||||
m_status_labels[pid]->setText(
|
||||
|
@ -134,7 +134,7 @@ void GameDigestDialog::SetResult(int pid, const std::string& result)
|
|||
{
|
||||
QString player_name = GetPlayerNameFromPID(pid);
|
||||
|
||||
if (!m_status_labels.count(pid))
|
||||
if (!m_status_labels.contains(pid))
|
||||
return;
|
||||
|
||||
m_status_labels[pid]->setText(
|
||||
|
|
|
@ -105,7 +105,7 @@ void NetPlayBrowser::Refresh()
|
|||
std::map<std::string, std::string> filters;
|
||||
|
||||
if (m_check_hide_incompatible->isChecked())
|
||||
filters["version"] = Common::GetScmDescStr();
|
||||
filters["version"] = "MPN";
|
||||
|
||||
if (!m_edit_name->text().isEmpty())
|
||||
filters["name"] = m_edit_name->text().toStdString();
|
||||
|
|
|
@ -264,7 +264,7 @@ void NetPlayDialog::CreateMainLayout()
|
|||
|
||||
m_main_layout->addLayout(options_widget, 2, 0, 1, -1, Qt::AlignRight);
|
||||
m_main_layout->setRowStretch(1, 1000);
|
||||
|
||||
m_buffer_size_box->setFixedSize(100, 20);
|
||||
setLayout(m_main_layout);
|
||||
}
|
||||
|
||||
|
@ -665,7 +665,7 @@ void NetPlayDialog::UpdateGUI()
|
|||
|
||||
auto* name_item = new QTableWidgetItem(QString::fromStdString(p->name));
|
||||
name_item->setToolTip(name_item->text());
|
||||
const auto& status_info = player_status.count(p->game_status) ?
|
||||
const auto& status_info = player_status.contains(p->game_status) ?
|
||||
player_status.at(p->game_status) :
|
||||
std::make_pair(QStringLiteral("?"), QStringLiteral("?"));
|
||||
auto* status_item = new QTableWidgetItem(status_info.first);
|
||||
|
@ -978,7 +978,7 @@ void NetPlayDialog::`(u32 frame, const std::string& player)
|
|||
"red", OSD::Duration::VERY_LONG);
|
||||
|
||||
OSD::AddTypedMessage(OSD::MessageType::NetPlayDesync,
|
||||
"Possible desync detected at frame %2. Game restart advised.",
|
||||
"Possible desync detected. Game restart advised.",
|
||||
OSD::Duration::VERY_LONG, OSD::Color::RED);
|
||||
}
|
||||
|
||||
|
@ -1288,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;
|
||||
|
|
|
@ -371,7 +371,7 @@ void NetPlaySetupDialog::show()
|
|||
m_host_server_name->setText(QString::fromStdString(nickname));
|
||||
}
|
||||
m_connection_type->setCurrentIndex(1);
|
||||
m_tab_widget->setCurrentIndex(2); // start on browser
|
||||
m_tab_widget->setCurrentIndex(2);
|
||||
|
||||
PopulateGameList();
|
||||
QDialog::show();
|
||||
|
@ -444,7 +444,7 @@ void NetPlaySetupDialog::RefreshBrowser()
|
|||
filters["name"] = m_edit_name->text().toStdString();
|
||||
|
||||
if (true)
|
||||
filters["version"] = Common::GetScmDescStr();
|
||||
filters["version"] = "MPN";
|
||||
|
||||
if (!m_radio_all->isChecked())
|
||||
filters["password"] = std::to_string(m_radio_private->isChecked());
|
||||
|
@ -526,7 +526,7 @@ void NetPlaySetupDialog::UpdateListBrowser()
|
|||
auto* game_id = new QTableWidgetItem(QString::fromStdString(entry.game_id));
|
||||
auto* player_count = new QTableWidgetItem(QStringLiteral("%1").arg(entry.player_count));
|
||||
|
||||
const bool enabled = Common::GetScmDescStr() == entry.version;
|
||||
const bool enabled = true;
|
||||
|
||||
for (const auto& item : {name, game_id, player_count, in_game})
|
||||
item->setFlags(enabled ? Qt::ItemIsEnabled | Qt::ItemIsSelectable : Qt::NoItemFlags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue