X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fdfxvideo%2Fgpu.h;fp=plugins%2Fdfxvideo%2Fgpu.h;h=25fcc3ce8a770083712af06c6a181fb8e62f8283;hp=9ee5f3e6f7a4769e8cbdf70c0f49e9ad2db98dca;hb=04bd10b132d06eff2a803125dc8da640be2454db;hpb=d9e2b173fb11fea4976fb0a6c5feda6b654b4b46 diff --git a/plugins/dfxvideo/gpu.h b/plugins/dfxvideo/gpu.h index 9ee5f3e6..25fcc3ce 100644 --- a/plugins/dfxvideo/gpu.h +++ b/plugins/dfxvideo/gpu.h @@ -72,7 +72,7 @@ #define SWAP16(x) ({ uint16_t y=(x); (((y)>>8 & 0xff) | ((y)<<8 & 0xff00)); }) #define SWAP32(x) ({ uint32_t y=(x); (((y)>>24 & 0xfful) | ((y)>>8 & 0xff00ul) | ((y)<<8 & 0xff0000ul) | ((y)<<24 & 0xff000000ul)); }) -#ifdef __BIG_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ // big endian config #define HOST2LE32(x) SWAP32(x) @@ -251,18 +251,12 @@ extern int32_t drawH; #define KEY_BADTEXTURES 128 #define KEY_CHECKTHISOUT 256 -#if !defined(__BIG_ENDIAN__) || defined(__x86_64__) || defined(__i386__) -#ifndef __LITTLE_ENDIAN__ -#define __LITTLE_ENDIAN__ -#endif -#endif - -#ifdef __LITTLE_ENDIAN__ +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define RED(x) (x & 0xff) #define BLUE(x) ((x>>16) & 0xff) #define GREEN(x) ((x>>8) & 0xff) #define COLOR(x) (x & 0xffffff) -#elif defined __BIG_ENDIAN__ +#else #define RED(x) ((x>>24) & 0xff) #define BLUE(x) ((x>>8) & 0xff) #define GREEN(x) ((x>>16) & 0xff)