Qt/NetPlay: Use TraversalClient::FailureReason
This commit is contained in:
parent
e41a9905c0
commit
366d4c7744
|
@ -497,23 +497,23 @@ void NetPlayDialog::OnConnectionLost()
|
||||||
DisplayMessage(tr("Lost connection to NetPlay server..."), "red");
|
DisplayMessage(tr("Lost connection to NetPlay server..."), "red");
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetPlayDialog::OnTraversalError(int error)
|
void NetPlayDialog::OnTraversalError(TraversalClient::FailureReason error)
|
||||||
{
|
{
|
||||||
QueueOnObject(this, [this, error] {
|
QueueOnObject(this, [this, error] {
|
||||||
switch (error)
|
switch (error)
|
||||||
{
|
{
|
||||||
case TraversalClient::BadHost:
|
case TraversalClient::FailureReason::BadHost:
|
||||||
QMessageBox::critical(this, tr("Traversal Error"), tr("Couldn't look up central server"));
|
QMessageBox::critical(this, tr("Traversal Error"), tr("Couldn't look up central server"));
|
||||||
QDialog::reject();
|
QDialog::reject();
|
||||||
break;
|
break;
|
||||||
case TraversalClient::VersionTooOld:
|
case TraversalClient::FailureReason::VersionTooOld:
|
||||||
QMessageBox::critical(this, tr("Traversal Error"),
|
QMessageBox::critical(this, tr("Traversal Error"),
|
||||||
tr("Dolphin is too old for traversal server"));
|
tr("Dolphin is too old for traversal server"));
|
||||||
QDialog::reject();
|
QDialog::reject();
|
||||||
break;
|
break;
|
||||||
case TraversalClient::ServerForgotAboutUs:
|
case TraversalClient::FailureReason::ServerForgotAboutUs:
|
||||||
case TraversalClient::SocketSendError:
|
case TraversalClient::FailureReason::SocketSendError:
|
||||||
case TraversalClient::ResendTimeout:
|
case TraversalClient::FailureReason::ResendTimeout:
|
||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
void OnPadBufferChanged(u32 buffer) override;
|
void OnPadBufferChanged(u32 buffer) override;
|
||||||
void OnDesync(u32 frame, const std::string& player) override;
|
void OnDesync(u32 frame, const std::string& player) override;
|
||||||
void OnConnectionLost() override;
|
void OnConnectionLost() override;
|
||||||
void OnTraversalError(int error) override;
|
void OnTraversalError(TraversalClient::FailureReason error) override;
|
||||||
bool IsRecording() override;
|
bool IsRecording() override;
|
||||||
std::string FindGame(const std::string& game) override;
|
std::string FindGame(const std::string& game) override;
|
||||||
void ShowMD5Dialog(const std::string& file_identifier) override;
|
void ShowMD5Dialog(const std::string& file_identifier) override;
|
||||||
|
|
Loading…
Reference in New Issue