summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-06-11 20:01:57 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-06-11 20:04:11 +0200
commitfa2aac1bf5c3f55fde8cf6069ac7957eda109308 (patch)
tree8b1ae01ee32b51c31c8cc401224120b00481e12f
parentMerge pull request #6450 from lat9nq/update-sdl (diff)
downloadyuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar.gz
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar.bz2
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar.lz
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar.xz
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.tar.zst
yuzu-fa2aac1bf5c3f55fde8cf6069ac7957eda109308.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 19339ff2d..be8933c5c 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1946,6 +1946,18 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
const auto full = res == selections.constFirst();
const auto entry_size = CalculateRomFSEntrySize(extracted, full);
+ // The minimum required space is the size of the extracted RomFS + 1 GiB
+ const auto minimum_free_space = extracted->GetSize() + 0x40000000;
+
+ if (full && Common::FS::GetFreeSpaceSize(path) < minimum_free_space) {
+ QMessageBox::warning(this, tr("RomFS Extraction Failed!"),
+ tr("There is not enough free space at %1 to extract the RomFS. Please "
+ "free up space or select a different dump directory at "
+ "Emulation > Configure > System > Filesystem > Dump Root")
+ .arg(QString::fromStdString(path)));
+ return;
+ }
+
QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0,
static_cast<s32>(entry_size), this);
progress.setWindowModality(Qt::WindowModal);