From 366d4c7744fdf36bf934aadda9fe0ac6b12fa6cd Mon Sep 17 00:00:00 2001 From: spycrab Date: Thu, 10 Aug 2017 15:41:01 +0200 Subject: [PATCH] Qt/NetPlay: Use TraversalClient::FailureReason --- Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp | 12 ++++++------ Source/Core/DolphinQt2/NetPlay/NetPlayDialog.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp index e0c16eedd3..5b9ada6474 100644 --- a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp @@ -497,23 +497,23 @@ void NetPlayDialog::OnConnectionLost() DisplayMessage(tr("Lost connection to NetPlay server..."), "red"); } -void NetPlayDialog::OnTraversalError(int error) +void NetPlayDialog::OnTraversalError(TraversalClient::FailureReason error) { QueueOnObject(this, [this, error] { switch (error) { - case TraversalClient::BadHost: + case TraversalClient::FailureReason::BadHost: QMessageBox::critical(this, tr("Traversal Error"), tr("Couldn't look up central server")); QDialog::reject(); break; - case TraversalClient::VersionTooOld: + case TraversalClient::FailureReason::VersionTooOld: QMessageBox::critical(this, tr("Traversal Error"), tr("Dolphin is too old for traversal server")); QDialog::reject(); break; - case TraversalClient::ServerForgotAboutUs: - case TraversalClient::SocketSendError: - case TraversalClient::ResendTimeout: + case TraversalClient::FailureReason::ServerForgotAboutUs: + case TraversalClient::FailureReason::SocketSendError: + case TraversalClient::FailureReason::ResendTimeout: UpdateGUI(); break; } diff --git a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.h b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.h index 9915ab7940..bf10962692 100644 --- a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.h +++ b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.h @@ -46,7 +46,7 @@ public: void OnPadBufferChanged(u32 buffer) override; void OnDesync(u32 frame, const std::string& player) override; void OnConnectionLost() override; - void OnTraversalError(int error) override; + void OnTraversalError(TraversalClient::FailureReason error) override; bool IsRecording() override; std::string FindGame(const std::string& game) override; void ShowMD5Dialog(const std::string& file_identifier) override;