diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 12 |
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 | |||
| 1946 | const auto full = res == selections.constFirst(); | 1946 | const auto full = res == selections.constFirst(); |
| 1947 | const auto entry_size = CalculateRomFSEntrySize(extracted, full); | 1947 | const auto entry_size = CalculateRomFSEntrySize(extracted, full); |
| 1948 | 1948 | ||
| 1949 | // The minimum required space is the size of the extracted RomFS + 1 GiB | ||
| 1950 | const auto minimum_free_space = extracted->GetSize() + 0x40000000; | ||
| 1951 | |||
| 1952 | if (full && Common::FS::GetFreeSpaceSize(path) < minimum_free_space) { | ||
| 1953 | QMessageBox::warning(this, tr("RomFS Extraction Failed!"), | ||
| 1954 | tr("There is not enough free space at %1 to extract the RomFS. Please " | ||
| 1955 | "free up space or select a different dump directory at " | ||
| 1956 | "Emulation > Configure > System > Filesystem > Dump Root") | ||
| 1957 | .arg(QString::fromStdString(path))); | ||
| 1958 | return; | ||
| 1959 | } | ||
| 1960 | |||
| 1949 | QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0, | 1961 | QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0, |
| 1950 | static_cast<s32>(entry_size), this); | 1962 | static_cast<s32>(entry_size), this); |
| 1951 | progress.setWindowModality(Qt::WindowModal); | 1963 | progress.setWindowModality(Qt::WindowModal); |