yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

sdmc_factory: Add SD Card size getters

This commit is contained in:
Zach Hilman 2019-04-16 14:28:20 -04:00
parent e47b57a90f
commit 721a92775d
2 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "core/file_sys/registered_cache.h"
#include "core/file_sys/sdmc_factory.h"
#include "core/file_sys/xts_archive.h"
#include "core/settings.h"
namespace FileSys {
@ -40,4 +41,12 @@ VirtualDir SDMCFactory::GetImageDirectory() const {
return GetOrCreateDirectoryRelative(dir, "/Nintendo/Album");
}
u64 SDMCFactory::GetSDMCFreeSpace() const {
return GetSDMCTotalSpace() - dir->GetSize();
}
u64 SDMCFactory::GetSDMCTotalSpace() const {
return static_cast<u64>(Settings::values.sdmc_size);
}
} // namespace FileSys

View File

@ -28,6 +28,9 @@ public:
VirtualDir GetImageDirectory() const;
u64 GetSDMCFreeSpace() const;
u64 GetSDMCTotalSpace() const;
private:
VirtualDir dir;