Harteex, i played a bit with the sdl source and got an idea that might help certain apps / games (specifically emulators most of the time), when they are written in a certain way ...
Looking at the sdl source for native, it's basically always using double buffering since you do the following :
this->hidden->buffer = SDL_malloc(width * height * (bpp /
and afterwards with the updaterects, you write the temporary surface to the real dingoo screen using slcd_getframe and setframe...
so thats actually double buffering ... I understand why you did this though, because if you don't and you do 2 blits on the same spot you get flickering, i've come accross that on the gp2x as well..
However some people know about this and can use it to their advantages gaining 7 extra fps according to my tests (when blitting a 320x240 image as fast as the dingoo can to the screen)
so here's an idea :
keep your current setup but only activate it when SDL_DOUBLEBUFF flag is set
when the flag is not set just do this : (it's only a few changes but you have to watch out not to free the hidden buffer then on a few places in the code)
this->hidden->buffer = lcd_get_frame();
and in the update rects do only this :
if (this->hidden->buffer == NULL)
that way you give people the option to either use a double buffer or not and for those who don't need it they can get extra speed given they don't blit a surface "over" each other before flipping the screen plus more free ram because a second buffer is not allocated
it would be even better to make an adopted function from the function on this page : http://wakaba.c3.cx/w/dingoo_coding
because then you can take the rect into account as well, by only updating the places on the screen that need it (when not using double buffer) since the current lcd_set_frame(); always writes back the whole screen i think ..
not sure who's the author of that site though