From ecbb2163ffaddeeceaf3d8a93387a3991fe5f1d2 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Wed, 30 Jun 2004 22:03:34 +0000 Subject: [PATCH] Better hardware cursor mapping from SDL code. --- SheepShaver/src/Unix/video_x.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SheepShaver/src/Unix/video_x.cpp b/SheepShaver/src/Unix/video_x.cpp index 66f2f946..5deea21c 100644 --- a/SheepShaver/src/Unix/video_x.cpp +++ b/SheepShaver/src/Unix/video_x.cpp @@ -2379,8 +2379,12 @@ static void *redraw_func(void *arg) // Set new cursor image if it was changed if (hw_mac_cursor_accl && cursor_changed) { cursor_changed = false; - memcpy(cursor_image->data, MacCursor + 4, 32); - memcpy(cursor_mask_image->data, MacCursor + 36, 32); + uint8 *x_data = (uint8 *)cursor_image->data; + uint8 *x_mask = (uint8 *)cursor_mask_image->data; + for (int i = 0; i < 32; i++) { + x_mask[i] = MacCursor[4 + i] | MacCursor[36 + i]; + x_data[i] = MacCursor[4 + i]; + } XDisplayLock(); XFreeCursor(x_display, mac_cursor); XPutImage(x_display, cursor_map, cursor_gc, cursor_image, 0, 0, 0, 0, 16, 16);