X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=854bbb8518bb09546dc9151130f21ab1e384dc8a;hb=7df2c03cc775292b1bcc2b2eb6486e2ae83faa87;hp=94fac61e44f964b3a115dbbd3ad1812af51c120d;hpb=aa314e8ebc2281c4b2d3db3378f143de5d68f335;p=pcsx_rearmed.git diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 94fac61e..854bbb85 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -28,6 +28,7 @@ #include "gpu.h" #include "ppf.h" #include "database.h" +#include "lightrec/plugin.h" #include char CdromId[10] = ""; @@ -55,17 +56,11 @@ struct iso_directory_record { char name [1]; }; -void mmssdd( char *b, char *p ) +static void mmssdd( char *b, char *p ) { int m, s, d; -#if defined(__arm__) - unsigned char *u = (void *)b; - int block = (u[3] << 24) | (u[2] << 16) | (u[1] << 8) | u[0]; -#elif defined(__BIGENDIAN__) - int block = (b[0] & 0xff) | ((b[1] & 0xff) << 8) | ((b[2] & 0xff) << 16) | (b[3] << 24); -#else - int block = *((int*)b); -#endif + unsigned char *ub = (void *)b; + int block = (ub[3] << 24) | (ub[2] << 16) | (ub[1] << 8) | ub[0]; block += 150; m = block / 4500; // minutes @@ -603,15 +598,6 @@ static const char PcsxHeader[32] = "STv4 PCSX v" PCSX_VERSION; // If you make changes to the savestate version, please increment the value below. static const u32 SaveVersion = 0x8b410006; -static int drc_is_lightrec(void) -{ -#if defined(LIGHTREC) - return 1; -#else - return 0; -#endif -} - int SaveState(const char *file) { void *f; GPUFreeze_t *gpufP; @@ -724,7 +710,7 @@ int LoadState(const char *file) { GPU_freeze(0, gpufP); free(gpufP); if (HW_GPU_STATUS == 0) - HW_GPU_STATUS = GPU_readStatus(); + HW_GPU_STATUS = SWAP32(GPU_readStatus()); // spu SaveFuncs.read(f, &Size, 4);