From a8a4afda21fd5fa35538de85c011cb1462976461 Mon Sep 17 00:00:00 2001 From: Xpl0itU Date: Thu, 18 Aug 2022 17:36:26 +0200 Subject: [PATCH] Move file_buffer defs --- src/savemng.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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);