diff --git a/src/citra_qt/multiplayer/host_room.cpp b/src/citra_qt/multiplayer/host_room.cpp index 2a815fa2c4..8abe84f92e 100644 --- a/src/citra_qt/multiplayer/host_room.cpp +++ b/src/citra_qt/multiplayer/host_room.cpp @@ -111,6 +111,10 @@ void HostRoomWindow::Host() { NetworkMessage::ShowError(NetworkMessage::PORT_NOT_VALID); return; } + if (ui->game_list->currentIndex() == -1) { + NetworkMessage::ShowError(NetworkMessage::GAME_NOT_SELECTED); + return; + } if (auto member = Network::GetRoomMember().lock()) { if (member->GetState() == Network::RoomMember::State::Joining) { return; diff --git a/src/citra_qt/multiplayer/message.cpp b/src/citra_qt/multiplayer/message.cpp index 36e465acb5..28d692c1e3 100644 --- a/src/citra_qt/multiplayer/message.cpp +++ b/src/citra_qt/multiplayer/message.cpp @@ -16,6 +16,9 @@ const ConnectionError USERNAME_NOT_VALID_SERVER( QT_TR_NOOP("Username is already in use or not valid. Please choose another.")); const ConnectionError IP_ADDRESS_NOT_VALID(QT_TR_NOOP("IP is not a valid IPv4 address.")); const ConnectionError PORT_NOT_VALID(QT_TR_NOOP("Port must be a number between 0 to 65535.")); +const ConnectionError GAME_NOT_SELECTED(QT_TR_NOOP( + "You must choose a Preferred Game to host a room. If you do not have any games in your game " + "list yet, add a game folder by clicking on the plus icon in the game list.")); const ConnectionError NO_INTERNET( QT_TR_NOOP("Unable to find an internet connection. Check your internet settings.")); const ConnectionError UNABLE_TO_CONNECT( diff --git a/src/citra_qt/multiplayer/message.h b/src/citra_qt/multiplayer/message.h index 955b90847e..7b1caa5fd9 100644 --- a/src/citra_qt/multiplayer/message.h +++ b/src/citra_qt/multiplayer/message.h @@ -27,6 +27,7 @@ extern const ConnectionError ROOMNAME_NOT_VALID; extern const ConnectionError USERNAME_NOT_VALID_SERVER; extern const ConnectionError IP_ADDRESS_NOT_VALID; extern const ConnectionError PORT_NOT_VALID; +extern const ConnectionError GAME_NOT_SELECTED; extern const ConnectionError NO_INTERNET; extern const ConnectionError UNABLE_TO_CONNECT; extern const ConnectionError ROOM_IS_FULL;