forked from len0rd/rockbox
Vastly increase speed of SDL screen updates for RGB565.
Flyspray: FS#11834 (with minor changes by me). Author: Thomas Jarosch git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28914 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0bf1bd1d51
commit
3c43503283
3 changed files with 41 additions and 9 deletions
|
|
@ -84,6 +84,7 @@ static int sdl_event_thread(void * param)
|
|||
|
||||
SDL_Surface *picture_surface = NULL;
|
||||
int width, height;
|
||||
int depth;
|
||||
|
||||
/* Try and load the background image. If it fails go without */
|
||||
if (background) {
|
||||
|
|
@ -115,9 +116,12 @@ static int sdl_event_thread(void * param)
|
|||
height = SIM_LCD_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((gui_surface = SDL_SetVideoMode(width * display_zoom, height * display_zoom, 24, SDL_HWSURFACE|SDL_DOUBLEBUF)) == NULL) {
|
||||
|
||||
depth = LCD_DEPTH;
|
||||
if (depth < 8)
|
||||
depth = 16;
|
||||
|
||||
if ((gui_surface = SDL_SetVideoMode(width * display_zoom, height * display_zoom, depth, SDL_HWSURFACE|SDL_DOUBLEBUF)) == NULL) {
|
||||
panicf("%s", SDL_GetError());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue