From 6f31441acb0e069e586fd1e16f764462ba6bc521 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 17 Aug 2006 04:54:47 +0000 Subject: [PATCH] fix cusor creation from bitmap on x86 svn: r4076 --- src/wxmac/src/mac/wx_gdi.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wxmac/src/mac/wx_gdi.cc b/src/wxmac/src/mac/wx_gdi.cc index 6cf06abd8f..1217cc0d74 100644 --- a/src/wxmac/src/mac/wx_gdi.cc +++ b/src/wxmac/src/mac/wx_gdi.cc @@ -27,6 +27,12 @@ # include "wx_image.h" #endif #include "../../../wxcommon/wxGLConfig.h" +#ifdef __i386__ +# include +# define wxBIGEND_SHORT(x) EndianS16_NtoB(x) +#else +# define wxBIGEND_SHORT(x) x +#endif extern int write_JPEG_file(char * filename, wxBitmap *bm, int quality_val); @@ -621,14 +627,14 @@ wxCursor::wxCursor(wxBitmap *mask, wxBitmap *bm, int hotSpotX, int hotSpotY) c->Get(&r, &g, &b); if (!r && !g && !b) { - cMacCustomCursor->data[j] += bit; + cMacCustomCursor->data[j] += wxBIGEND_SHORT(bit); } mask_dc->GetPixel(i, j, c); c->Get(&r, &g, &b); if (!r && !g && !b) { - cMacCustomCursor->mask[j] += bit; + cMacCustomCursor->mask[j] += wxBIGEND_SHORT(bit); } } bit = bit >> 1;