X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpulib%2Fgpu.h;h=b1f4f1dbce8a81195109528ea26ab3bb584da826;hb=df717ca9bf196fd40134d16f94b7f3c774f2c897;hp=3bab7fff3f4344b78e82504c505a9250112e5452;hpb=f23b103c8248c10855949bfb2185b6b10d4f0457;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index 3bab7fff..b1f4f1db 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -16,6 +16,18 @@ extern "C" { #define CMD_BUFFER_LEN 1024 +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define HTOLE32(x) __builtin_bswap32(x) +#define HTOLE16(x) __builtin_bswap16(x) +#define LE32TOH(x) __builtin_bswap32(x) +#define LE16TOH(x) __builtin_bswap16(x) +#else +#define HTOLE32(x) (x) +#define HTOLE16(x) (x) +#define LE32TOH(x) (x) +#define LE16TOH(x) (x) +#endif + #define BIT(x) (1 << (x)) #define PSX_GPU_STATUS_DHEIGHT BIT(19)