aboutsummaryrefslogtreecommitdiff
path: root/src/FATStorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/FATStorage.h')
-rw-r--r--src/FATStorage.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/FATStorage.h b/src/FATStorage.h
index 48a411b..0062846 100644
--- a/src/FATStorage.h
+++ b/src/FATStorage.h
@@ -28,6 +28,7 @@
#include "Platform.h"
#include "types.h"
#include "fatfs/ff.h"
+#include "FATIO.h"
namespace melonDS
{
@@ -39,6 +40,8 @@ namespace melonDS
struct FATStorageArgs
{
std::string Filename;
+
+ /// Size of the desired SD card in bytes, or 0 for auto-detect.
u64 Size;
bool ReadOnly;
std::optional<std::string> SourceDir;
@@ -74,10 +77,8 @@ private:
Platform::FileHandle* File;
u64 FileSize;
- static Platform::FileHandle* FF_File;
- static u64 FF_FileSize;
- static UINT FF_ReadStorage(BYTE* buf, LBA_t sector, UINT num);
- static UINT FF_WriteStorage(const BYTE* buf, LBA_t sector, UINT num);
+ [[nodiscard]] ff_disk_read_cb FF_ReadStorage() const noexcept;
+ [[nodiscard]] ff_disk_write_cb FF_WriteStorage() const noexcept;
static u32 ReadSectorsInternal(Platform::FileHandle* file, u64 filelen, u32 start, u32 num, u8* data);
static u32 WriteSectorsInternal(Platform::FileHandle* file, u64 filelen, u32 start, u32 num, const u8* data);