X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3078f075bd2ccaa86a681b2f37314fa1bb1a4c7..2c3ebf8be5f192f23d8266603a72d19a7267c7c5:/src/mac/carbon/cursor.cpp diff --git a/src/mac/carbon/cursor.cpp b/src/mac/carbon/cursor.cpp index eec2374c9a..ef3b9216e3 100644 --- a/src/mac/carbon/cursor.cpp +++ b/src/mac/carbon/cursor.cpp @@ -195,6 +195,13 @@ CursHandle wxGetStockCursor( int number ) CursHandle c = (CursHandle) NewHandle( sizeof(Cursor) ) ; memcpy( *c, &gMacCursors[number], sizeof(Cursor) ) ; +#ifndef WORDS_BIGENDIAN + short *sptr = (short*) *c ; + for ( int i = 0 ; i < 2 * 16 /* image and mask */ ; ++i, ++sptr ) + { + *sptr = CFSwapInt16( *sptr ) ; + } +#endif return c ; } @@ -418,9 +425,13 @@ void wxCursor::CreateFromImage(const wxImage & image) *((*(**ch).crsrData) + y * bytesPerRow + x) = GetCTabIndex( newColors , &col) ; } - +#ifdef WORDS_BIGENDIAN (**ch).crsr1Data[y] = rowbits ; (**ch).crsrMask[y] = maskbits ; +#else + (**ch).crsr1Data[y] = CFSwapInt16(rowbits) ; + (**ch).crsrMask[y] = CFSwapInt16(maskbits) ; +#endif } if ( !bHasMask )