Prepare Regist for PS5

This commit is contained in:
Florian Märkl 2020-12-11 16:47:39 +01:00
commit 21ef8fa018
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
7 changed files with 86 additions and 32 deletions

View file

@ -29,6 +29,7 @@ class RegistDialog : public QDialog
QRadioButton *ps4_pre9_radio_button;
QRadioButton *ps4_pre10_radio_button;
QRadioButton *ps4_10_radio_button;
QRadioButton *ps5_radio_button;
QLineEdit *psn_online_id_edit;
QLineEdit *psn_account_id_edit;
QLineEdit *pin_edit;

View file

@ -49,24 +49,27 @@ RegistDialog::RegistDialog(Settings *settings, const QString &host, QWidget *par
psn_account_id_edit->setEnabled(need_account_id);
};
auto version_layout = new QVBoxLayout(nullptr);
ps4_pre9_radio_button = new QRadioButton(tr("< 7.0"), this);
version_layout->addWidget(ps4_pre9_radio_button);
auto target_layout = new QVBoxLayout(nullptr);
ps4_pre9_radio_button = new QRadioButton(tr("PS4 Firmware < 7.0"), this);
target_layout->addWidget(ps4_pre9_radio_button);
connect(ps4_pre9_radio_button, &QRadioButton::toggled, this, UpdatePSNIDEdits);
ps4_pre10_radio_button = new QRadioButton(tr(">= 7.0, < 8.0"), this);
version_layout->addWidget(ps4_pre10_radio_button);
ps4_pre10_radio_button = new QRadioButton(tr("PS4 Firmware >= 7.0, < 8.0"), this);
target_layout->addWidget(ps4_pre10_radio_button);
connect(ps4_pre10_radio_button, &QRadioButton::toggled, this, UpdatePSNIDEdits);
ps4_10_radio_button = new QRadioButton(tr(">= 8.0"), this);
version_layout->addWidget(ps4_10_radio_button);
ps4_10_radio_button = new QRadioButton(tr("PS4 Firmware >= 8.0"), this);
target_layout->addWidget(ps4_10_radio_button);
connect(ps4_10_radio_button, &QRadioButton::toggled, this, UpdatePSNIDEdits);
form_layout->addRow(tr("PS4 Firmware:"), version_layout);
ps5_radio_button = new QRadioButton(tr("PS5"), this);
target_layout->addWidget(ps5_radio_button);
connect(ps5_radio_button, &QRadioButton::toggled, this, UpdatePSNIDEdits);
form_layout->addRow(tr("Console:"), target_layout);
psn_online_id_edit = new QLineEdit(this);
form_layout->addRow(tr("PSN Online-ID (username, case-sensitive):"), psn_online_id_edit);
psn_account_id_edit = new QLineEdit(this);
form_layout->addRow(tr("PSN Account-ID (base64):"), psn_account_id_edit);
ps4_10_radio_button->setChecked(true);
ps5_radio_button->setChecked(true);
UpdatePSNIDEdits();
@ -115,8 +118,10 @@ void RegistDialog::accept()
info.target = CHIAKI_TARGET_PS4_8;
else if(ps4_pre10_radio_button->isChecked())
info.target = CHIAKI_TARGET_PS4_9;
else
else if(ps4_10_radio_button->isChecked())
info.target = CHIAKI_TARGET_PS4_10;
else
info.target = CHIAKI_TARGET_PS5_1;
bool need_account_id = NeedAccountId();
QByteArray psn_id; // keep this out of the if scope