diff options
| author | 2021-06-11 13:23:23 -0700 | |
|---|---|---|
| committer | 2021-06-11 13:23:23 -0700 | |
| commit | 58180f9fa89822cc30e201d3ab71dc4055593918 (patch) | |
| tree | bdfaa7297a91a1107e90e72bba0843a91efdf37e /src | |
| parent | Merge pull request #6422 from FernandoS27/i-am-the-senate (diff) | |
| parent | yuzu: main: Ensure enough space is available for RomFS dumping (diff) | |
| download | yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.gz yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.tar.xz yuzu-58180f9fa89822cc30e201d3ab71dc4055593918.zip | |
Merge pull request #6451 from Morph1984/check-disk-space-dump
yuzu: main: Ensure enough space is available for RomFS dumping
Diffstat (limited to '')
| -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); |