mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Surface: Removed fake double buffering.
Use real double buffering instead. I checked the SDL code and if the hardware cannot provide double buffering it will use a shadow surface to ensure that a frame is not displayed until it has been fully painted. Also disable mouse cursor before opening the output surface. The reason it was disabled after the surface was opened is that SDL on GP2X has a bug. However, this means the cursor is visible for a short time during startup which looks ugly.
This commit is contained in:
@@ -277,18 +277,7 @@ GMenu2X::GMenu2X() {
|
||||
quit();
|
||||
}
|
||||
|
||||
s = new Surface();
|
||||
#ifdef TARGET_GP2X
|
||||
{
|
||||
//I use a tmp variable to hide the cursor as soon as possible (and create the double buffer surface only after that)
|
||||
//I'm forced to use SW surfaces since with HW there are issuse with changing the clock frequency
|
||||
SDL_Surface *tmps = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_SWSURFACE);
|
||||
SDL_ShowCursor(0);
|
||||
s->enableVirtualDoubleBuffer(tmps);
|
||||
}
|
||||
#else
|
||||
s->raw = SDL_SetVideoMode(resX, resY, confInt["videoBpp"], SDL_HWSURFACE|SDL_DOUBLEBUF);
|
||||
#endif
|
||||
s = Surface::openOutputSurface(resX, resY, confInt["videoBpp"]);
|
||||
|
||||
bg = NULL;
|
||||
font = NULL;
|
||||
|
||||
Reference in New Issue
Block a user