X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=7aa4fef24b91a55b06b2d6f5aa65d9e8c6c0881d;hb=26e3e2aa7525fd4e63e64192dfbb68950e0e4c5a;hp=3a06306733112c82254c0e276e235b2885e77a38;hpb=04bd10b132d06eff2a803125dc8da640be2454db;p=pcsx_rearmed.git diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 3a063067..7aa4fef2 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -58,14 +58,7 @@ struct iso_directory_record { 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 __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - int block = (b[0] & 0xff) | ((b[1] & 0xff) << 8) | ((b[2] & 0xff) << 16) | (b[3] << 24); -#else - int block = *((int*)b); -#endif + int block = SWAP32(*((uint32_t*) b)); block += 150; m = block / 4500; // minutes @@ -680,7 +673,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);