citra_qt/multiplayer: Disallow hosting rooms when preferred game is not selected
which can happen if the game list is empty, and would result in a 400 being returned from the server as the preferred_game field is empty.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user