From 2c8e36ecd16bd7fea83f3adbd5bef9fef8587f44 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 29 Oct 2007 16:18:48 -0700 Subject: [PATCH] Added patch fix yellow-cursor problem which appears on some Intel Macs --- hw/darwin/quartz/xpr/xprCursor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index 570ef0bb2..02260bd43 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -83,8 +83,17 @@ load_cursor(CursorPtr src, int screen) #ifdef ARGB_CURSOR if (src->bits->argb != NULL) { - rowbytes = src->bits->width * sizeof(CARD32); +#if BITMAP_BIT_ORDER == MSBFirst + rowbytes = src->bits->width * sizeof (CARD32); data = (uint32_t *) src->bits->argb; +#else + const uint32_t *be_data=(uint32_t *) src->bits->argb; + unsigned i; + rowbytes = src->bits->width * sizeof (CARD32); + data=alloca (rowbytes * src->bits->height); + for(i=0;i<(src->bits->width*src->bits->height);i++) + data[i]=ntohl(be_data[i]); +#endif } else #endif