mount hdd by default, add hdd write protect option.
This commit is contained in:
@@ -1192,11 +1192,15 @@ void FsView::OnDeleteCallback() {
|
||||
bool empty{};
|
||||
m_fs->IsDirEmpty(full_path, &empty);
|
||||
if (empty) {
|
||||
m_fs->DeleteDirectory(full_path);
|
||||
if (auto rc = m_fs->DeleteDirectory(full_path); R_FAILED(rc)) {
|
||||
App::PushErrorBox(rc, "Failed to delete directory"_i18n);
|
||||
}
|
||||
use_progress_box = false;
|
||||
}
|
||||
} else {
|
||||
m_fs->DeleteFile(full_path);
|
||||
if (auto rc = m_fs->DeleteFile(full_path); R_FAILED(rc)) {
|
||||
App::PushErrorBox(rc, "Failed to delete file"_i18n);
|
||||
}
|
||||
use_progress_box = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,6 +280,10 @@ MainMenu::MainMenu() {
|
||||
App::SetHddEnable(enable);
|
||||
}));
|
||||
|
||||
options->Add(std::make_shared<SidebarEntryBool>("Hdd write protect"_i18n, App::GetWriteProtect(), [](bool& enable){
|
||||
App::SetWriteProtect(enable);
|
||||
}));
|
||||
|
||||
if (m_update_state == UpdateState::Update) {
|
||||
options->Add(std::make_shared<SidebarEntryCallback>("Download update: "_i18n + m_update_version, [this](){
|
||||
App::Push(std::make_shared<ProgressBox>(0, "Downloading "_i18n, "Sphaira v" + m_update_version, [this](auto pbox) -> Result {
|
||||
|
||||
Reference in New Issue
Block a user