aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/gbampsave.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/ds/arm9/source/gbampsave.cpp')
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index 7f7bf958df..0131040e1d 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -29,7 +29,7 @@
GBAMPSaveFile::GBAMPSaveFile(char* name, bool saveOrLoad) {
handle = DS::std_fopen(name, saveOrLoad? "w": "r");
-// consolePrintf("%s handle is %d\n", name, handle);
+ consolePrintf("%s handle is %d\n", name, handle);
// consolePrintf("Created %s\n", name);
bufferPos = 0;
saveSize = 0;
@@ -39,6 +39,7 @@ GBAMPSaveFile::GBAMPSaveFile(char* name, bool saveOrLoad) {
GBAMPSaveFile::~GBAMPSaveFile() {
flushSaveBuffer();
if (handle) DS::std_fclose(handle);
+ consolePrintf("Closed file\n");
}
uint32 GBAMPSaveFile::read(void *buf, uint32 size) {
@@ -57,7 +58,7 @@ void GBAMPSaveFile::skip(uint32 bytes) {
void GBAMPSaveFile::flushSaveBuffer() {
if (bufferPos != 0) {
- consolePrintf("Flushing %d bytes from %x\n", bufferPos, buffer);
+// consolePrintf("Flushing %d bytes from %x\n", bufferPos, buffer);
flushed += bufferPos;
DS::std_fwrite(buffer, 1, bufferPos, handle);
bufferPos = 0;
@@ -174,8 +175,10 @@ void GBAMPSaveFileManager::listSavefiles(char const* prefix, bool* marks, int nu
char path[128];
DS::std_cwd((char *) getSavePath());
+
+ consolePrintf("Save path: %s\n", getSavePath());
- int fileType = FAT_FindFirstFile(name);
+ int fileType = FAT_FindFirstFileLFN(name);
for (int r = 0; r < num; r++) {
marks[r] = false;
@@ -192,17 +195,17 @@ void GBAMPSaveFileManager::listSavefiles(char const* prefix, bool* marks, int nu
sprintf(str, "%s%02d", prefix, r);
-// consolePrintf("%s != %s", str, name);
+ consolePrintf("%s != %s", str, name);
if (!stricmp(str, name)) {
marks[r] = true;
-// consolePrintf("Matched %d", r);
+ consolePrintf("Matched %d", r);
}
}
}
- } while ((fileType = FAT_FindNextFile(name)));
+ } while ((fileType = FAT_FindNextFileLFN(name)));
FAT_chdir("/");
}