fix cusor creation from bitmap on x86

svn: r4076
This commit is contained in:
Matthew Flatt 2006-08-17 04:54:47 +00:00
parent 8d77972334
commit 6f31441acb

View File

@ -27,6 +27,12 @@
# include "wx_image.h" # include "wx_image.h"
#endif #endif
#include "../../../wxcommon/wxGLConfig.h" #include "../../../wxcommon/wxGLConfig.h"
#ifdef __i386__
# include <CoreServices/CoreServices.h>
# 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); 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); c->Get(&r, &g, &b);
if (!r && !g && !b) { if (!r && !g && !b) {
cMacCustomCursor->data[j] += bit; cMacCustomCursor->data[j] += wxBIGEND_SHORT(bit);
} }
mask_dc->GetPixel(i, j, c); mask_dc->GetPixel(i, j, c);
c->Get(&r, &g, &b); c->Get(&r, &g, &b);
if (!r && !g && !b) { if (!r && !g && !b) {
cMacCustomCursor->mask[j] += bit; cMacCustomCursor->mask[j] += wxBIGEND_SHORT(bit);
} }
} }
bit = bit >> 1; bit = bit >> 1;