I notice in your SDL_SetVideoMode() call, you are using the SDL_HWSURFACE flag which forces the video rendering in the video hardware memory. Have you tried SDL_SWSURFACE, using system memory instead? It may be that your video hardware doesn't deal with this well.