diff options
author | FearlessTobi <thm.frey@gmail.com> | 2022-08-27 03:41:19 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-08-27 03:41:19 +0200 |
commit | 2b6ac4463c06cfdf50b1d150311a217d2ee11688 (patch) | |
tree | b3c6e200499949a98a42b05f96bcc01134ca2ef5 /src/yuzu/multiplayer/message.cpp | |
parent | 339758c9fce9a211f85f62182d8fa0e1115c229b (diff) |
yuzu/multiplayer: Warn when game is running or no network interface is selected
Diffstat (limited to 'src/yuzu/multiplayer/message.cpp')
-rw-r--r-- | src/yuzu/multiplayer/message.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/multiplayer/message.cpp b/src/yuzu/multiplayer/message.cpp index 94d7a38b83..758b5b731d 100644 --- a/src/yuzu/multiplayer/message.cpp +++ b/src/yuzu/multiplayer/message.cpp @@ -49,6 +49,9 @@ const ConnectionError ErrorManager::PERMISSION_DENIED( QT_TR_NOOP("You do not have enough permission to perform this action.")); const ConnectionError ErrorManager::NO_SUCH_USER(QT_TR_NOOP( "The user you are trying to kick/ban could not be found.\nThey may have left the room.")); +const ConnectionError ErrorManager::NO_INTERFACE_SELECTED( + QT_TR_NOOP("No network interface is selected.\nPlease go to Configure -> System -> Network and " + "make a selection.")); static bool WarnMessage(const std::string& title, const std::string& text) { return QMessageBox::Ok == QMessageBox::warning(nullptr, QObject::tr(title.c_str()), @@ -60,6 +63,13 @@ void ErrorManager::ShowError(const ConnectionError& e) { QMessageBox::critical(nullptr, tr("Error"), tr(e.GetString().c_str())); } +bool WarnGameRunning() { + return WarnMessage( + QT_TR_NOOP("Game already running"), + QT_TR_NOOP("Joining a room when the game is already running is discouraged " + "and can cause the room feature not to work correctly.\nProceed anyway?")); +} + bool WarnCloseRoom() { return WarnMessage( QT_TR_NOOP("Leave Room"), |