summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2022-08-22 15:57:49 +0200
committerGitHub <noreply@github.com>2022-08-22 15:57:49 +0200
commit1845a13cbe537e194104be774738ad73de408815 (patch)
tree8c87420b4df1a5d8c799947e608d3fa8fbeebbc8 /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
parent8b7e6f18637e35187759d055d2bc0a282552d70f (diff)
parent403f3693da03f6211a9c04f947f22aed34bdb8a5 (diff)
Merge pull request #10905 from shuffle2/netplay-hash
netplay: use sha1 instead of md5
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index 4a297acea3..b994bd93f3 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -45,8 +45,8 @@
#include "Core/SyncIdentifier.h"
#include "DolphinQt/NetPlay/ChunkedProgressDialog.h"
+#include "DolphinQt/NetPlay/GameDigestDialog.h"
#include "DolphinQt/NetPlay/GameListDialog.h"
-#include "DolphinQt/NetPlay/MD5Dialog.h"
#include "DolphinQt/NetPlay/PadMappingDialog.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/QtUtils/QueueOnObject.h"
@@ -100,7 +100,7 @@ NetPlayDialog::NetPlayDialog(const GameListModel& game_list_model,
setWindowIcon(Resources::GetAppIcon());
m_pad_mapping = new PadMappingDialog(this);
- m_md5_dialog = new MD5Dialog(this);
+ m_game_digest_dialog = new GameDigestDialog(this);
m_chunked_progress_dialog = new ChunkedProgressDialog(this);
ResetExternalIP();
@@ -182,19 +182,20 @@ void NetPlayDialog::CreateMainLayout()
m_network_mode_group->addAction(m_golf_mode_action);
m_fixed_delay_action->setChecked(true);
- m_md5_menu = m_menu_bar->addMenu(tr("Checksum"));
- m_md5_menu->addAction(tr("Current game"), this, [this] {
- Settings::Instance().GetNetPlayServer()->ComputeMD5(m_current_game_identifier);
+ m_game_digest_menu = m_menu_bar->addMenu(tr("Checksum"));
+ m_game_digest_menu->addAction(tr("Current game"), this, [this] {
+ Settings::Instance().GetNetPlayServer()->ComputeGameDigest(m_current_game_identifier);
});
- m_md5_menu->addAction(tr("Other game..."), this, [this] {
+ m_game_digest_menu->addAction(tr("Other game..."), this, [this] {
GameListDialog gld(m_game_list_model, this);
if (gld.exec() != QDialog::Accepted)
return;
- Settings::Instance().GetNetPlayServer()->ComputeMD5(gld.GetSelectedGame().GetSyncIdentifier());
+ Settings::Instance().GetNetPlayServer()->ComputeGameDigest(
+ gld.GetSelectedGame().GetSyncIdentifier());
});
- m_md5_menu->addAction(tr("SD Card"), this, [] {
- Settings::Instance().GetNetPlayServer()->ComputeMD5(
+ m_game_digest_menu->addAction(tr("SD Card"), this, [] {
+ Settings::Instance().GetNetPlayServer()->ComputeGameDigest(
NetPlay::NetPlayClient::GetSDCardIdentifier());
});
@@ -506,7 +507,7 @@ void NetPlayDialog::show(std::string nickname, bool use_traversal)
m_data_menu->menuAction()->setVisible(is_hosting);
m_network_menu->menuAction()->setVisible(is_hosting);
- m_md5_menu->menuAction()->setVisible(is_hosting);
+ m_game_digest_menu->menuAction()->setVisible(is_hosting);
#ifdef HAS_LIBMGBA
m_hide_remote_gbas_action->setVisible(is_hosting);
#else
@@ -1175,39 +1176,39 @@ void NetPlayDialog::SaveSettings()
Config::SetBase(Config::NETPLAY_NETWORK_MODE, network_mode);
}
-void NetPlayDialog::ShowMD5Dialog(const std::string& title)
+void NetPlayDialog::ShowGameDigestDialog(const std::string& title)
{
QueueOnObject(this, [this, title] {
- m_md5_menu->setEnabled(false);
+ m_game_digest_menu->setEnabled(false);
- if (m_md5_dialog->isVisible())
- m_md5_dialog->close();
+ if (m_game_digest_dialog->isVisible())
+ m_game_digest_dialog->close();
- m_md5_dialog->show(QString::fromStdString(title));
+ m_game_digest_dialog->show(QString::fromStdString(title));
});
}
-void NetPlayDialog::SetMD5Progress(int pid, int progress)
+void NetPlayDialog::SetGameDigestProgress(int pid, int progress)
{
QueueOnObject(this, [this, pid, progress] {
- if (m_md5_dialog->isVisible())
- m_md5_dialog->SetProgress(pid, progress);
+ if (m_game_digest_dialog->isVisible())
+ m_game_digest_dialog->SetProgress(pid, progress);
});
}
-void NetPlayDialog::SetMD5Result(int pid, const std::string& result)
+void NetPlayDialog::SetGameDigestResult(int pid, const std::string& result)
{
QueueOnObject(this, [this, pid, result] {
- m_md5_dialog->SetResult(pid, result);
- m_md5_menu->setEnabled(true);
+ m_game_digest_dialog->SetResult(pid, result);
+ m_game_digest_menu->setEnabled(true);
});
}
-void NetPlayDialog::AbortMD5()
+void NetPlayDialog::AbortGameDigest()
{
QueueOnObject(this, [this] {
- m_md5_dialog->close();
- m_md5_menu->setEnabled(true);
+ m_game_digest_dialog->close();
+ m_game_digest_menu->setEnabled(true);
});
}