X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fpsxcommon.h;h=c9d300aaa29b5399f11aceb1dd8c92ce44659ac4;hp=2a3877b94f60dc39040361ffcaa73ff25c939262;hb=be516ebe45e48044b599e9d9f9f2d296c3f3ee62;hpb=89f33b734d7d540c7fa26f6556ef9ec49eb3008a diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 2a3877b9..c9d300aa 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -31,6 +31,13 @@ extern "C" { #include "config.h" +// XXX: don't care but maybe fix it someday +#if defined(__GNUC__) && __GNUC__ >= 8 +#pragma GCC diagnostic ignored "-Wformat-truncation" +#pragma GCC diagnostic ignored "-Wformat-overflow" +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif + // System includes #include #include @@ -42,7 +49,6 @@ extern "C" { #include #include #include -#include // Define types typedef int8_t s8; @@ -126,7 +132,7 @@ typedef struct { boolean RCntFix; boolean UseNet; boolean VSyncWA; - boolean CdrReschedule; + boolean icache_emulation; u8 Cpu; // CPU_DYNAREC or CPU_INTERPRETER u8 PsxType; // PSX_TYPE_NTSC or PSX_TYPE_PAL #ifdef _WIN32 @@ -137,9 +143,18 @@ typedef struct { extern PcsxConfig Config; extern boolean NetOpened; +struct PcsxSaveFuncs { + void *(*open)(const char *name, const char *mode); + int (*read)(void *file, void *buf, u32 len); + int (*write)(void *file, const void *buf, u32 len); + long (*seek)(void *file, long offs, int whence); + void (*close)(void *file); +}; +extern struct PcsxSaveFuncs SaveFuncs; + #define gzfreeze(ptr, size) { \ - if (Mode == 1) gzwrite(f, ptr, size); \ - if (Mode == 0) gzread(f, ptr, size); \ + if (Mode == 1) SaveFuncs.write(f, ptr, size); \ + if (Mode == 0) SaveFuncs.read(f, ptr, size); \ } // Make the timing events trigger faster as we are currently assuming everything