mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 16:34:28 +01:00
sdmc_factory: Add SD Card size getters
This commit is contained in:
parent
e47b57a90f
commit
721a92775d
@ -6,6 +6,7 @@
|
|||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
#include "core/file_sys/sdmc_factory.h"
|
#include "core/file_sys/sdmc_factory.h"
|
||||||
#include "core/file_sys/xts_archive.h"
|
#include "core/file_sys/xts_archive.h"
|
||||||
|
#include "core/settings.h"
|
||||||
|
|
||||||
namespace FileSys {
|
namespace FileSys {
|
||||||
|
|
||||||
@ -40,4 +41,12 @@ VirtualDir SDMCFactory::GetImageDirectory() const {
|
|||||||
return GetOrCreateDirectoryRelative(dir, "/Nintendo/Album");
|
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
|
} // namespace FileSys
|
||||||
|
@ -28,6 +28,9 @@ public:
|
|||||||
|
|
||||||
VirtualDir GetImageDirectory() const;
|
VirtualDir GetImageDirectory() const;
|
||||||
|
|
||||||
|
u64 GetSDMCFreeSpace() const;
|
||||||
|
u64 GetSDMCTotalSpace() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VirtualDir dir;
|
VirtualDir dir;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user