diff --git a/src/savemng.cpp b/src/savemng.cpp index d977929..65cbe4b 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -19,6 +19,16 @@ VPADReadError vpad_error; KPADStatus kpad[4], kpad_status; +typedef struct { + void *buf; + size_t len; + size_t buf_size; +} file_buffer; + +static file_buffer buffers[16]; +static char *fileBuf[2]; +static bool buffersInitialized = false; + static std::string newlibToFSA(std::string path) { if (path[3] == ':') { switch (path[0]) { @@ -403,15 +413,6 @@ void getAccountsSD(Title *title, uint8_t slot) { } } -typedef struct { - void *buf; - size_t len; - size_t buf_size; -} file_buffer; -static file_buffer buffers[16]; -static char *fileBuf[2]; -static bool buffersInitialized = false; - static bool readThread(FILE *srcFile, LockingQueue *ready, LockingQueue *done) { file_buffer currentBuffer; ready->waitAndPop(currentBuffer);