Blitting artifacts

My blitting sequence is as follows:


And in either fullscreen mode or windowed mode with the following flags set:


Strange artifacts are visible, these are usually random parts of the display
appearing at other locations on the screen. I did some fiddling about and came
to the conclusion that it is the mouse cursor that is at fault. When I used
turned the cursor off, this problem stopped occuring. But, strangely returned
again when I started using a custom cursor(ala bitmap blitted at current mouse
coordinates). The strange ‘phantom blits’ occur mostly on the same horizontal
plane as the current position of the mouse cursor. Adding an extra delay of 10ms
using SDL_Delay prevents this phantom blitting from occuring. Also these
artifacts are not persistant, they aren’t copied to the visible surface, but
appear on the Flip.

My hardware config:

CPU:P4 2.4Ghz
RAM:512Mb DDR333
GFX:GeForce 3 Ti200
OS:Win2k Pro

Thanks in advance, Dale.