diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-09 18:29:12 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-10 06:37:39 +0200 |
commit | 0373ead96e45a590ded0949a801a2783ef1097bf (patch) | |
tree | afa552c15d285f0911662d657df170c3d5d8ca90 /src/core/file_sys | |
parent | settings: Remove storage size options (diff) | |
download | yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar.gz yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar.bz2 yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar.lz yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar.xz yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.tar.zst yuzu-0373ead96e45a590ded0949a801a2783ef1097bf.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/bis_factory.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core/file_sys/bis_factory.cpp b/src/core/file_sys/bis_factory.cpp index 8935a62c3..a412dbd9c 100644 --- a/src/core/file_sys/bis_factory.cpp +++ b/src/core/file_sys/bis_factory.cpp @@ -12,6 +12,10 @@ namespace FileSys { +constexpr u64 NAND_USER_SIZE = 0x680000000; // 26624 MiB +constexpr u64 NAND_SYSTEM_SIZE = 0xA0000000; // 2560 MiB +constexpr u64 NAND_TOTAL_SIZE = 0x747C00000; // 29820 MiB + BISFactory::BISFactory(VirtualDir nand_root_, VirtualDir load_root_, VirtualDir dump_root_) : nand_root(std::move(nand_root_)), load_root(std::move(load_root_)), dump_root(std::move(dump_root_)), @@ -110,30 +114,27 @@ VirtualDir BISFactory::GetImageDirectory() const { u64 BISFactory::GetSystemNANDFreeSpace() const { const auto sys_dir = GetOrCreateDirectoryRelative(nand_root, "/system"); - if (sys_dir == nullptr) - return 0; + if (sys_dir == nullptr) { + return GetSystemNANDTotalSpace(); + } return GetSystemNANDTotalSpace() - sys_dir->GetSize(); } u64 BISFactory::GetSystemNANDTotalSpace() const { - return static_cast<u64>(Settings::values.nand_system_size); + return NAND_SYSTEM_SIZE; } u64 BISFactory::GetUserNANDFreeSpace() const { - const auto usr_dir = GetOrCreateDirectoryRelative(nand_root, "/user"); - if (usr_dir == nullptr) - return 0; - - return GetUserNANDTotalSpace() - usr_dir->GetSize(); + return GetUserNANDTotalSpace(); } u64 BISFactory::GetUserNANDTotalSpace() const { - return static_cast<u64>(Settings::values.nand_user_size); + return NAND_USER_SIZE; } u64 BISFactory::GetFullNANDTotalSpace() const { - return static_cast<u64>(Settings::values.nand_total_size); + return NAND_TOTAL_SIZE; } VirtualDir BISFactory::GetBCATDirectory(u64 title_id) const { |