summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/lcd-sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/lcd-sdl.c')
-rw-r--r--uisimulator/sdl/lcd-sdl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/uisimulator/sdl/lcd-sdl.c b/uisimulator/sdl/lcd-sdl.c
index 373e07ffc0..aa74c14cd9 100644
--- a/uisimulator/sdl/lcd-sdl.c
+++ b/uisimulator/sdl/lcd-sdl.c
@@ -90,6 +90,9 @@ void sdl_gui_update(SDL_Surface *surface, int x_start, int y_start, int width,
SDL_Rect dest= {(ui_x + x_start) * display_zoom, (ui_y + y_start) * display_zoom,
xmax * display_zoom, ymax * display_zoom};
+ if (surface->flags & SDL_SRCALPHA) /* alpha needs a black background */
+ SDL_FillRect(gui_surface, &dest, 0);
+
SDL_BlitSurface(surface, &src, gui_surface, &dest);
SDL_Flip(gui_surface);