X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxcommon.h;h=7e105508da6788d7d4f70194338cc51fdb850395;hb=36f3ea6c0c8619110a3d0a3b30cad66a895b4061;hp=2a3877b94f60dc39040361ffcaa73ff25c939262;hpb=1cb2b455712a0c9ae814b441a5a46e24e32a808c;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 2a3877b9..7e105508 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -40,9 +40,10 @@ extern "C" { #include #include #include +#ifndef __SWITCH__ #include +#endif #include -#include // Define types typedef int8_t s8; @@ -119,14 +120,17 @@ typedef struct { boolean Mdec; boolean PsxAuto; boolean Cdda; + boolean AsyncCD; + boolean CHD_Precache; /* loads disk image into memory, works with CHD only. */ boolean HLE; + boolean SlowBoot; boolean Debug; boolean PsxOut; boolean SpuIrq; 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 +141,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