Skip to content

Commit

Permalink
Move file_buffer defs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpl0itU committed Aug 18, 2022
1 parent 3255f9e commit a8a4afd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/savemng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down Expand Up @@ -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<file_buffer> *ready, LockingQueue<file_buffer> *done) {
file_buffer currentBuffer;
ready->waitAndPop(currentBuffer);
Expand Down

0 comments on commit a8a4afd

Please sign in to comment.