mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 19:39:24 +01:00
Convert images to the display format
This commit is contained in:
parent
d9a1ce3de9
commit
db72041d91
@ -346,7 +346,15 @@ void Gui::activate()
|
||||
|
||||
SDL_Surface *Gui::loadThemeImage(const char *dir, const char *what)
|
||||
{
|
||||
return IMG_Load(get_theme_path(dir, what));
|
||||
SDL_Surface *img = IMG_Load(get_theme_path(dir, what));
|
||||
SDL_Surface *out;
|
||||
|
||||
if (!img)
|
||||
return NULL;
|
||||
out = SDL_DisplayFormatAlpha(img);
|
||||
SDL_FreeSurface(img);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
Font *Gui::loadThemeFont(const char *dir, const char *what, int size)
|
||||
|
Loading…
Reference in New Issue
Block a user