Skip to content

Commit 7f723ec

Browse files
authored
Merge pull request #65 from w3irDv/enh/mngslot
force manual backup always to root backupset
2 parents d6a5424 + a491957 commit 7f723ec

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/menu/MainMenuState.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ ApplicationState::eSubState MainMenuState::update(Input *input) {
5151
if (input->get(TRIGGER, PAD_BUTTON_A)) {
5252
switch (cursorPos) {
5353
case 0:
54-
//BackupSetList::setBackupSetToRoot();
5554
this->state = STATE_DO_SUBSTATE;
5655
this->subState = std::make_unique<WiiUTitleListState>(this->wiiutitles, this->wiiuTitlesCount);
5756
break;
5857
case 1:
59-
//BackupSetList::setBackupSetToRoot();
6058
this->state = STATE_DO_SUBSTATE;
6159
this->subState = std::make_unique<vWiiTitleListState>(this->wiititles, this->vWiiTitlesCount);
6260
break;
@@ -65,12 +63,10 @@ ApplicationState::eSubState MainMenuState::update(Input *input) {
6563
this->subState = std::make_unique<BatchBackupState>(this->wiiutitles, this->wiititles, this->wiiuTitlesCount, this->vWiiTitlesCount);
6664
break;
6765
case 3:
68-
//BackupSetList::setBackupSetToRoot();
6966
this->state = STATE_DO_SUBSTATE;
7067
this->subState = std::make_unique<BatchRestoreState>(this->wiiutitles, this->wiititles, this->wiiuTitlesCount, this->vWiiTitlesCount);
7168
break;
7269
case 4:
73-
//BackupSetList::setBackupSetToRoot();
7470
this->state = STATE_DO_SUBSTATE;
7571
this->substateCalled = STATE_BACKUPSET_MENU;
7672
this->subState = std::make_unique<BackupSetListState>();

src/menu/TitleOptionsState.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ void TitleOptionsState::render() {
248248
ApplicationState::eSubState TitleOptionsState::update(Input *input) {
249249
if (this->state == STATE_TITLE_OPTIONS) {
250250
if (input->get(TRIGGER, PAD_BUTTON_B)) {
251-
BackupSetList::setBackupSetSubPathToRoot(); // reset nxt operations to current backupSet
252251
return SUBSTATE_RETURN;
253252
}
254253
if (input->get(TRIGGER, PAD_BUTTON_X))

src/menu/TitleTaskState.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ ApplicationState::eSubState TitleTaskState::update(Input *input) {
7575
if (!this->title.saveInit) {
7676
promptError(LanguageUtils::gettext("No save to Backup."));
7777
noError = false;
78-
}
78+
} else
79+
BackupSetList::setBackupSetSubPathToRoot(); // from backup menu, always backup to root
7980
}
8081

8182
if (this->task == restore) {
@@ -89,10 +90,12 @@ ApplicationState::eSubState TitleTaskState::update(Input *input) {
8990
if (!this->title.saveInit) {
9091
promptError(LanguageUtils::gettext("No save to Wipe."));
9192
noError = false;
92-
}
93+
} else
94+
BackupSetList::setBackupSetSubPathToRoot(); // default behaviour: unaware of backupsets
9395
}
9496

9597
if ((this->task == importLoadiine) || (this->task == exportLoadiine)) {
98+
BackupSetList::setBackupSetSubPathToRoot(); // default behaviour: unaware of backupsets
9699
char gamePath[PATH_SIZE];
97100
memset(versionList, 0, 0x100 * sizeof(int));
98101
if (!getLoadiineGameSaveDir(gamePath, this->title.productCode, this->title.longName, this->title.highID, this->title.lowID)) {
@@ -115,7 +118,8 @@ ApplicationState::eSubState TitleTaskState::update(Input *input) {
115118
if (!this->title.saveInit) {
116119
promptError(LanguageUtils::gettext("No save to Copy."));
117120
noError = false;
118-
}
121+
} else
122+
BackupSetList::setBackupSetSubPathToRoot(); // default behaviour: unaware of backupsets
119123
}
120124
if (noError) {
121125
DrawUtils::setRedraw(true);

src/savemng.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ void copySavedata(Title *title, Title *titleb, int8_t wiiuuser, int8_t wiiuuser_
997997
int slotb = getEmptySlot(titleb->highID, titleb->lowID);
998998
if ((slotb >= 0) && promptConfirm(ST_YES_NO, LanguageUtils::gettext("Backup current savedata first to next empty slot?"))) {
999999
backupSavedata(titleb, slotb, wiiuuser, common, LanguageUtils::gettext("pre-copyToOtherDev backup"));
1000-
promptError(LanguageUtils::gettext("Backup done. Now copying Savedata."));
1000+
promptError(LanguageUtils::gettext("Backup done. Now copying Savedata."));
10011001
}
10021002

10031003
std::string path = (isUSB ? (getUSB() + "/usr/save").c_str() : "storage_mlc01:/usr/save");

0 commit comments

Comments
 (0)