Display a proper error message when no disc is inserted

This commit is contained in:
Maschell 2021-10-11 22:15:23 +02:00
parent 8f1cfdc982
commit b50185f8aa
2 changed files with 8 additions and 1 deletions

View File

@ -172,6 +172,8 @@ void ApplicationState::render() {
WiiUScreen::drawLinef("Dumping done! Press A to continue");
} else if (this->state == STATE_DUMP_APP_FILES_DONE) {
WiiUScreen::drawLinef("Dumping done! Press A to continue");
} else if (this->state == STATE_PLEASE_INSERT_DISC) {
WiiUScreen::drawLinef("Please insert a Disc. Press A to continue");
}
printFooter();
WiiUScreen::flipBuffers();
@ -245,7 +247,7 @@ void ApplicationState::update(Input *input) {
}
DEBUG_FUNCTION_LINE("STATE_OPEN_ODD1");
if (this->retryCount-- <= 0) {
this->setError(ERROR_OPEN_ODD1);
this->state = STATE_PLEASE_INSERT_DISC;
return;
}
auto ret = IOSUHAX_FSA_RawOpen(gFSAfd, "/dev/odd01", &(this->oddFd));
@ -474,6 +476,10 @@ void ApplicationState::update(Input *input) {
this->writtenSector = 0;
return;
}
} else if (this->state == STATE_PLEASE_INSERT_DISC){
if (entrySelected(input)) {
this->state = STATE_WELCOME_SCREEN;
}
}
}

View File

@ -54,6 +54,7 @@ public:
STATE_WELCOME_SCREEN,
STATE_CHOOSE_TARGET,
STATE_OPEN_ODD1,
STATE_PLEASE_INSERT_DISC,
STATE_DUMP_APP_FILES,
STATE_DUMP_APP_FILES_DONE,
STATE_READ_DISC_INFO,