Commit 7cb3958f authored by dscho's avatar dscho

fix compilation with Mac OSX: preprocessor can't do recursive macros

parent b7643ac9
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define HandleHextileBPP CONCAT2E(HandleHextile,BPP) #define HandleHextileBPP CONCAT2E(HandleHextile,BPP)
#define CARDBPP CONCAT3E(uint,BPP,_t) #define CARDBPP CONCAT3E(uint,BPP,_t)
#define GET_PIXEL CONCAT2E(GET_PIXEL,BPP)
static rfbBool static rfbBool
HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh) HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh)
...@@ -85,7 +84,15 @@ HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh) ...@@ -85,7 +84,15 @@ HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh)
return FALSE; return FALSE;
for (i = 0; i < nSubrects; i++) { for (i = 0; i < nSubrects; i++) {
GET_PIXEL(fg, ptr); #if BPP==8
GET_PIXEL8(fg, ptr);
#elif BPP==16
GET_PIXEL16(fg, ptr);
#elif BPP==32
GET_PIXEL32(fg, ptr);
#else
#error "Invalid BPP"
#endif
sx = rfbHextileExtractX(*ptr); sx = rfbHextileExtractX(*ptr);
sy = rfbHextileExtractY(*ptr); sy = rfbHextileExtractY(*ptr);
ptr++; ptr++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment