mount hdd by default, add hdd write protect option.

This commit is contained in:
ITotalJustice
2025-05-26 19:25:09 +01:00
parent 793b36fd59
commit 3ca82463cc
5 changed files with 45 additions and 4 deletions

View File

@@ -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;
}
}

View File

@@ -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 {