notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix PCSX on big-endian systems
[pcsx_rearmed.git]
/
plugins
/
dfxvideo
/
gpu.h
diff --git
a/plugins/dfxvideo/gpu.h
b/plugins/dfxvideo/gpu.h
index
1930883
..
25fcc3c
100644
(file)
--- 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)); })
#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)); })
-#if
def _
_BIG_ENDIAN__
+#if
__BYTE_ORDER__ == __ORDER
_BIG_ENDIAN__
// big endian config
#define HOST2LE32(x) SWAP32(x)
// big endian config
#define HOST2LE32(x) SWAP32(x)
@@
-208,7
+208,7
@@
typedef struct PSXDISPLAYTAG
// draw.c
extern int32_t GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP;
// draw.c
extern int32_t GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP;
-extern int32_t GlobalText
REST,GlobalText
ABR,GlobalTextPAGE;
+extern int32_t GlobalTextABR,GlobalTextPAGE;
extern short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3;
extern long lLowerpart;
extern BOOL bCheckMask;
extern short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3;
extern long lLowerpart;
extern BOOL bCheckMask;
@@
-251,18
+251,12
@@
extern int32_t drawH;
#define KEY_BADTEXTURES 128
#define KEY_CHECKTHISOUT 256
#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)
#define RED(x) (x & 0xff)
#define BLUE(x) ((x>>16) & 0xff)
#define GREEN(x) ((x>>8) & 0xff)
#define COLOR(x) (x & 0xffffff)
-#el
if defined __BIG_ENDIAN__
+#el
se
#define RED(x) ((x>>24) & 0xff)
#define BLUE(x) ((x>>8) & 0xff)
#define GREEN(x) ((x>>16) & 0xff)
#define RED(x) ((x>>24) & 0xff)
#define BLUE(x) ((x>>8) & 0xff)
#define GREEN(x) ((x>>16) & 0xff)
@@
-314,4
+308,7
@@
void DoClearFrontBuffer(void);
unsigned long ulInitDisplay(void);
void CloseDisplay(void);
unsigned long ulInitDisplay(void);
void CloseDisplay(void);
+struct rearmed_cbs;
+extern const struct rearmed_cbs *rcbs;
+
#endif
#endif