[SDL] SDL 1.2.5 bug on Win32 (blitting from screen surface)
Matthijs Hollemans
matthijs at allyoursoftware.com
Mon Oct 7 01:16:00 PDT 2002
Hi all,
I just downloaded the new SDL 1.2.5 and noticed a problem on
Windows. When I switched back to the 1.2.4 DLL, everything worked
fine again. I can't show you any code, because the program is way
too big, but this is what happens:
My game draws a custom mouse pointer by blitting a surface to the
main screen surface. Before it does that, it copies the part of the
screen that is under the mouse to a "backing store" surface. At the
beginning of every new frame, the backing store is copied back onto
the screen to erase the mouse pointer and restore the background.
This prevents me from having to redraw the entire screen every
frame.
What goes wrong in 1.2.5 is the copy from the screen to the backing
store surface: the source x and y positions of the blit seem to be
ignored. The rectangle that I get always comes from the top of the
screen. This only happens if the screen is a HWSURFACE; software
surfaces work fine, as do any other flags such as DOUBLEBUF and
RLEACCEL. (The backing store is also a HWSURFACE.) Blits the other
way around, i.e. from other surfaces to the screen, work just fine.
I am using WinXP, NVidia GeForce2 Go, 640x480x32 resolution, Visual
C++ 6, and the 1.2.5 DLL (and headers) that I downloaded half an
hour ago. But like I said, it works fine with 1.2.4.
If you need more info, then please let me know... If this isn't
something that is easy to look up in the sources, then I'd be happy
to whip up a small example program that demonstrates the bug.
--
Matthijs Hollemans
All Your Software
www.allyoursoftware.com
More information about the SDL
mailing list