Right, in order they were posted:
M-.-n,
Edit: From what I can gather, SDL_VIDEOEXPOSE is supposed to be posted by the video driver when an underlying window manager (or such) notifies SDL that the on-screen display has been altered outside of the application (like when a window is raised or lowered or you have a GL window.) None of these cases happen on the GP2X, and the only drivers that post such events are Quartz (which only uses it for coming out of sleep mode) and x11 (which posts when using GL based windows).
So basically you should never be posting it yourself, it's there for SDL to notify you that the screen needs re-drawing. As to why you're not seeing it in your event loop after you've posted it I don't know because there's absolutely no code outside those mentioned above that post expose events, and no code at all that acts on them.
Heump,
The current implementation of double buffering relies on having a surface that is twice as high as requested and flipping the start address of the bitmap between the top and halfway down. Also the screen bitmap is special in that it always resides at the start of the gfx memory and cannot be freed.
{sings="Smooth Criminal"} ...Annie, are you OK
You OK
Are you OK, Annie
Annie, are you OK
You OK
Are you OK, Annie...{/sings}
It would be quite easy to allow you to use two arbitary surfaces, but there's no support for having the stride of a surface be anything other than what SDL decides is optimal for itself.
I've started on modifications to allow you to specify custom parameters for just this reason (I've got some ideas that require non-standard surfaces too
) but it may be a while before it's ready - as if all the other things going on around me aren't enough of a distraction I've just taken in a new kitten ^_^
Epicenter,
Why do you want such a high fps? I don't know about the new screen, but the original is only spec'ed up to 90Hz. LCD's don't work very well if you run them too fast and nor do TV's. Also the faster you run the screen the higher it's memory bandwidth usage which means the blitter gets less.
The only times the blitter doesn't work fast is if you try feeding it blits faster than it can process them, or there's not enough DMA bandwidth to satisfy it. The method you're using to get HW surfaces is the correct way, you're not SDL_Lock()ing either the screen or the blitted surfaces are you? Attempting to use the blitter with either surface Locked incurs a huge penalty.
Colour keying should, if anything, make the blit faster as it has one less memory write for each transparent pixel. As far as I'm aware there's no penalty for enabling it even if none of the pixels are masked out.
If you can send me your blitting code I'll see if I can spot what's causing SDL to go slow.
Oh, just in-case, when you refer to software surfaces are you just switching the screen to software because the screen is
always created as a hardware surface.