citra-emu
/
citra
Archived
1
0
Fork 0

use enum and add default case

This commit is contained in:
BreadFish64 2018-01-18 21:02:55 -06:00
parent d462eacefb
commit 169b076913
2 changed files with 6 additions and 2 deletions

View File

@ -33,12 +33,12 @@ void CompatDB::Submit() {
compatibility->addButton(ui->radioButton_IntroMenu, 4);
compatibility->addButton(ui->radioButton_WontBoot, 5);
switch (currentId()) {
case 1:
case CompatDBPage::SelectionPage:
if (compatibility->checkedId() == -1) {
button(NextButton)->setEnabled(false);
}
break;
case 2:
case CompatDBPage::FinalPage:
LOG_DEBUG(Frontend, "Compatibility Rating: %d", compatibility->checkedId());
Core::Telemetry().AddField(Telemetry::FieldType::UserFeedback, "Compatibility",
compatibility->checkedId());
@ -46,6 +46,8 @@ void CompatDB::Submit() {
// workaround
button(QWizard::CancelButton)->setVisible(false);
break;
default:
LOG_ERROR(Frontend, "Unexpected page: %d", currentId());
}
}

View File

@ -25,3 +25,5 @@ private slots:
void Submit();
void EnableNext();
};
enum CompatDBPage { IntroPage = 0, SelectionPage = 1, FinalPage = 2 };