Okay, the good:
I fixed some subtle bugs in the RRT2 code. Scott, I think the bugs you
saw Friday are gone.
Now the ugly:
I spent most of the afternoon working on the cursor support in SDL. I
removed color cursor support, since this should really be done in the
application code, and have been working on black-and-white cursors in
full-screen mode.
The code is mostly working.
Here’s the problem:
… if the cursor is erased before screen updates, and drawn afterwards,
you get cursor flicker.
… if the offscreen image has the cursor blitted to it before the screen
update is performed, you get flickerless cursors, but when you try to
move the cursor, the image behind it isn’t updated with the new
offscreen cursor contents.
… if you update the area behind the cursor using the offscreen surface,
when moving the cursor, you can get garbage as the application might be
in the middle of compositing the offscreen surface from different
sources.
… if you save the offscreen image as it is updated, before mixing in
the cursor image, the real screen may be of a different format,
involving costly pixel conversion.
Does anybody have any suggestions?
The fact that the mouse motion update could be happening in a separate
thread just adds more complication to the code.
I’m probably going to implement the last solution, adding pixel
conversion to the mouse image code, but if anybody has any ideas at all,
I’d love to hear them.–
-Sam Lantinga, Lead Programmer, Loki Entertainment Software