Merge pull request #3947 from zhaowenlan1779/autofill-multiplayer
citra_qt: use Citra Web Service username as default multiplayer nickname
This commit is contained in:
commit
bc30b314d8
|
@ -33,6 +33,10 @@ DirectConnectWindow::DirectConnectWindow(QWidget* parent)
|
|||
|
||||
ui->nickname->setValidator(validation.GetNickname());
|
||||
ui->nickname->setText(UISettings::values.nickname);
|
||||
if (ui->nickname->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->nickname->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
ui->ip->setValidator(validation.GetIP());
|
||||
ui->ip->setText(UISettings::values.ip);
|
||||
ui->port->setValidator(validation.GetPort());
|
||||
|
|
|
@ -54,6 +54,10 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list,
|
|||
|
||||
// Restore the settings:
|
||||
ui->username->setText(UISettings::values.room_nickname);
|
||||
if (ui->username->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->username->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
ui->room_name->setText(UISettings::values.room_name);
|
||||
ui->port->setText(UISettings::values.room_port);
|
||||
ui->max_player->setValue(UISettings::values.max_player);
|
||||
|
|
|
@ -48,6 +48,10 @@ Lobby::Lobby(QWidget* parent, QStandardItemModel* list,
|
|||
|
||||
ui->nickname->setValidator(validation.GetNickname());
|
||||
ui->nickname->setText(UISettings::values.nickname);
|
||||
if (ui->nickname->text().isEmpty() && !Settings::values.citra_username.empty()) {
|
||||
// Use Citra Web Service user name as nickname by default
|
||||
ui->nickname->setText(QString::fromStdString(Settings::values.citra_username));
|
||||
}
|
||||
|
||||
// UI Buttons
|
||||
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
||||
|
|
Reference in New Issue