forked from len0rd/rockbox
SDL: Prevent SDL_FreeSurface from freeing the LCD buffer
In direct mode, the statically allocated Rockbox LCD framebuffer is used and should never be freed. Otherwise, ROCKBOX_VideoQuit takes care of freeing the dynamically allocated hidden buffer, used for scaling. This fixed hanging of Rockbox when quitting an SDL app. Change-Id: Ib9cd8c04cc0d2d6ccedaa582a5a85ef211d0273c
This commit is contained in:
parent
f27de46472
commit
d40be8404b
1 changed files with 1 additions and 0 deletions
|
@ -643,6 +643,7 @@ SDL_Surface *ROCKBOX_SetVideoMode(_THIS, SDL_Surface *current,
|
||||||
this->hidden->h = current->h = height;
|
this->hidden->h = current->h = height;
|
||||||
current->pitch = current->w * (bpp / 8);
|
current->pitch = current->w * (bpp / 8);
|
||||||
current->pixels = this->hidden->direct ? lcd_fb : this->hidden->buffer;
|
current->pixels = this->hidden->direct ? lcd_fb : this->hidden->buffer;
|
||||||
|
current->flags |= SDL_PREALLOC;
|
||||||
|
|
||||||
/* We're done */
|
/* We're done */
|
||||||
return(current);
|
return(current);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue