From d5ce941e01e444b45dfaf94cde45ff7e98908371 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sun, 18 Sep 2011 15:43:18 +0000 Subject: [PATCH] mc: rename ADVANsCEne::check() to ::checkDB() to fix compilation on MacOS X Also while at it define it as class instead of struct. Another step to fix #3411141 --- desmume/src/NDSSystem.cpp | 2 +- desmume/src/mc.cpp | 2 +- desmume/src/mc.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 9befe360f..a66f02773 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -578,7 +578,7 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename) buf[2] = gameInfo.header.gameCode[2]; buf[3] = gameInfo.header.gameCode[3]; buf[4] = 0; - if (advsc.check(buf)) + if (advsc.checkDB(buf)) { u8 sv = advsc.getSaveType(); printf("ADVANsCEne database:\n"); diff --git a/desmume/src/mc.cpp b/desmume/src/mc.cpp index f3b71a053..7a1e2a781 100644 --- a/desmume/src/mc.cpp +++ b/desmume/src/mc.cpp @@ -1253,7 +1253,7 @@ void BackupDevice::forceManualBackupType() } // ============================================= ADVANsCEne -u8 ADVANsCEne::check(const char *serial) +u8 ADVANsCEne::checkDB(const char *serial) { FILE *fp = fopen(database_path, "rb"); if (fp) diff --git a/desmume/src/mc.h b/desmume/src/mc.h index 4da87d5c8..5b1aa787a 100644 --- a/desmume/src/mc.h +++ b/desmume/src/mc.h @@ -57,7 +57,7 @@ #define _ADVANsCEne_BASE_VERSION_MAJOR 1 #define _ADVANsCEne_BASE_VERSION_MINOR 0 #define _ADVANsCEne_BASE_NAME "ADVANsCEne Nintendo DS Collection" -struct ADVANsCEne +class ADVANsCEne { private: char database_path[MAX_PATH]; // DeSmuME save types @@ -83,7 +83,7 @@ public: } void setDatabase(const char *path) { strcpy(database_path, path); } u32 convertDB(const char *in_filaname); - u8 check(const char *serial); + u8 checkDB(const char *serial); u32 getSaveType() { return saveType; } u32 getCRC32() { return crc32; } };