diff --git a/Makefile b/Makefile index a5feb8c..90e0496 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ MX4SIO ?= 0 SIO2MAN ?= 0 PPC_UART ?= 0 DEBUG ?= 0 -LCDVD ?= LATEST#or LEGACY +LCDVD ?= LEGACY#or LATEST # ----------------------------- # .SILENT: @@ -53,9 +53,9 @@ ifeq ($(LCDVD),LEGACY) $(info -- Building with legacy libcdvd) EE_CFLAGS += -DLIBCDVD_LEGACY CDVD_SOURCE = iop/cdvd.irx -else EE_INCS += -Iiop/oldlibs/libcdvd/ee EE_LIBS += -lcdvdfs +else EE_CFLAGS += -DLIBCDVD_LATEST CDVD_SOURCE = iop/__precompiled/cdfs.irx endif diff --git a/include/cdvd_macro.h b/include/cdvd_macro.h index d9fd0b5..27894a1 100644 --- a/include/cdvd_macro.h +++ b/include/cdvd_macro.h @@ -2,10 +2,12 @@ #define __CDVD_COMPAT_MACRO #ifdef LIBCDVD_LEGACY +#define LCDVD_FLUSHCACHE() CDVD_FlushCache() #define LCDVD_INIT() CDVD_Init() #define LCDVD_STOP() CDVD_Stop() #define LCDVD_DISKREADY(x) CDVD_DiskReady(x) #else +#define LCDVD_FLUSHCACHE() // TO-DO / IMPLEMENT ME #define LCDVD_INIT() // does not exist on sdk libcdvd #define LCDVD_STOP() sceCdStop() #define LCDVD_DISKREADY(x) sceCdDiskReady(x) diff --git a/src/filer.c b/src/filer.c index bde33cf..e08c092 100644 --- a/src/filer.c +++ b/src/filer.c @@ -890,7 +890,7 @@ int genFixPath(const char *inp_path, char *gen_path) pathSep = strchr(uLE_path, '/'); if (!strncmp(uLE_path, "cdfs", 4)) { //if using CD or DVD disc path - // TODO: Flush CDFS cache + LCDVD_FLUSHCACHE(); LCDVD_DISKREADY(0); //end of clause for using a CD or DVD path diff --git a/src/main.c b/src/main.c index 9bd6425..9ecc6bd 100644 --- a/src/main.c +++ b/src/main.c @@ -1285,7 +1285,7 @@ static void getExternalFilePath(const char *argPath, char *filePath) #endif } else if (!strncmp(argPath, "cdfs", 4)) { strcpy(filePath, argPath); - // TODO: Flush CDFS cache + LCDVD_FLUSHCACHE(); LCDVD_DISKREADY(0); } else { genFixPath(argPath, filePath); @@ -2357,7 +2357,7 @@ static void Execute(char *pathin) Show_build_info(); return; } else if (!strncmp(path, "cdfs", 4)) { - // TODO: Flush CDFS cache + LCDVD_FLUSHCACHE(); LCDVD_DISKREADY(0); party[0] = 0; goto CheckELF_path;