mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
UI message cleanup
This commit is contained in:
parent
64dbd97731
commit
1b7c2a36d8
1 changed files with 11 additions and 8 deletions
|
@ -64,9 +64,7 @@ static bool SwitchMemstickFolderTo(Path newMemstickFolder) {
|
||||||
File::CreateFullPath(newMemstickFolder);
|
File::CreateFullPath(newMemstickFolder);
|
||||||
}
|
}
|
||||||
if (!File::WriteDataToFile(true, "1", 1, testWriteFile)) {
|
if (!File::WriteDataToFile(true, "1", 1, testWriteFile)) {
|
||||||
// settingInfo_->Show(sy->T("ChangingMemstickPathInvalid", "That path couldn't be used to save Memory Stick files."), nullptr);
|
return false;
|
||||||
// TODO: Display an error!
|
|
||||||
return UI::EVENT_DONE;
|
|
||||||
}
|
}
|
||||||
File::Delete(testWriteFile);
|
File::Delete(testWriteFile);
|
||||||
} else {
|
} else {
|
||||||
|
@ -150,8 +148,11 @@ UI::EventReturn MemStickScreen::OnUseInternalStorage(UI::EventParams ¶ms) {
|
||||||
if (initialSetup_) {
|
if (initialSetup_) {
|
||||||
// There's not gonna be any files here in this case since it's a fresh install.
|
// There's not gonna be any files here in this case since it's a fresh install.
|
||||||
// Let's just accept it and move on. No need to move files either.
|
// Let's just accept it and move on. No need to move files either.
|
||||||
SwitchMemstickFolderTo(pendingMemStickFolder_);
|
if (SwitchMemstickFolderTo(pendingMemStickFolder_)) {
|
||||||
TriggerFinish(DialogResult::DR_OK);
|
TriggerFinish(DialogResult::DR_OK);
|
||||||
|
} else {
|
||||||
|
// This can't really happen?? Not worth making an error message.
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Always ask for confirmation when called from the UI. Likely there's already some data.
|
// Always ask for confirmation when called from the UI. Likely there's already some data.
|
||||||
screenManager()->push(new ConfirmMemstickMoveScreen(pendingMemStickFolder_, false));
|
screenManager()->push(new ConfirmMemstickMoveScreen(pendingMemStickFolder_, false));
|
||||||
|
@ -364,13 +365,15 @@ UI::EventReturn ConfirmMemstickMoveScreen::OnConfirm(UI::EventParams ¶ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Successful so far, switch the memstick folder.
|
// Successful so far, switch the memstick folder.
|
||||||
SwitchMemstickFolderTo(newMemstickFolder_);
|
if (!SwitchMemstickFolderTo(newMemstickFolder_)) {
|
||||||
|
// TODO: More precise errors.
|
||||||
|
error_ = iz->T("That folder doesn't work as a memstick folder.");
|
||||||
|
return UI::EVENT_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
// If the chosen folder already had a config, reload it!
|
// If the chosen folder already had a config, reload it!
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (g_Config.Save("MemstickPathChanged")) {
|
if (g_Config.Save("MemstickPathChanged")) {
|
||||||
TriggerFinish(DialogResult::DR_OK);
|
TriggerFinish(DialogResult::DR_OK);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue