Skip to content

Commit

Permalink
Improve return, fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschell committed Oct 16, 2021
1 parent 9d607fb commit 7a6a4ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 2 additions & 3 deletions source/GMPartitionsDumperState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,10 @@ void GMPartitionsDumperState::setError(GMPartitionsDumperState::eErrorState err)
}

std::string GMPartitionsDumperState::getPathForDevice(eDumpTarget target) const {
if(target == TARGET_SD){
return "fs:/vol/external01/";
} else if (target == TARGET_NTFS){
if (target == TARGET_NTFS){
return "ntfs0:/";
}
return "fs:/vol/external01/";
}

std::string GMPartitionsDumperState::ErrorMessage() const {
Expand Down
9 changes: 2 additions & 7 deletions source/WUDDumperState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ WUDDumperState::~WUDDumperState() {
}

ApplicationState::eSubState WUDDumperState::update(Input *input) {
if (this->state == STATE_RETURN) {
return ApplicationState::SUBSTATE_RETURN;
}
if (this->state == STATE_ERROR) {
if (entrySelected(input)) {
return ApplicationState::SUBSTATE_RETURN;
Expand Down Expand Up @@ -79,7 +76,7 @@ ApplicationState::eSubState WUDDumperState::update(Input *input) {
}
} else if (this->state == STATE_PLEASE_INSERT_DISC) {
if (entrySelected(input)) {
this->state = STATE_RETURN;
return SUBSTATE_RETURN;
}
} else if (this->state == STATE_READ_DISC_INFO) {
if (IOSUHAX_FSA_RawRead(gFSAfd, this->sectorBuf, READ_SECTOR_SIZE, 1, 0, this->oddFd) >= 0) {
Expand Down Expand Up @@ -218,7 +215,7 @@ ApplicationState::eSubState WUDDumperState::update(Input *input) {
} else if (this->state == STATE_DUMP_DISC_DONE) {
WiiUScreen::drawLinef("Dumping done! Press A to continue");
if (entrySelected(input)) {
this->state = STATE_RETURN;
return SUBSTATE_RETURN;
}

return ApplicationState::SUBSTATE_RUNNING;
Expand Down Expand Up @@ -284,8 +281,6 @@ void WUDDumperState::render() {
}
} else if (this->state == STATE_DUMP_DISC_DONE) {
WiiUScreen::drawLinef("Dumping done! Press A to continue");
} else if (this->state == STATE_RETURN) {
WiiUScreen::drawLinef("Returning");
}

ApplicationState::printFooter();
Expand Down
1 change: 0 additions & 1 deletion source/WUDDumperState.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class WUDDumperState : public ApplicationState {

enum eDumpState {
STATE_ERROR,
STATE_RETURN,
STATE_OPEN_ODD1,
STATE_PLEASE_INSERT_DISC,
STATE_READ_DISC_INFO,
Expand Down

0 comments on commit 7a6a4ab

Please sign in to comment.