diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 9bec6706a6..b4df13aefd 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -373,17 +373,23 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, bool menu_is_alive = video_info->menu_is_alive; #endif - if (!frame) + if (!vid) return true; title[0] = '\0'; video_driver_get_window_title(title, sizeof(title)); - if (SDL_MUSTLOCK(vid->screen)) - SDL_LockSurface(vid->screen); + if (vid->menu.active) { + #ifdef HAVE_MENU + menu_driver_frame(menu_is_alive, video_info); + #endif + SDL_BlitSurface(vid->menu.frame, NULL, vid->screen, NULL); + } else { + if (SDL_MUSTLOCK(vid->screen)) + SDL_LockSurface(vid->screen); - video_frame_scale( + video_frame_scale( &vid->scaler, vid->screen->pixels, frame, @@ -393,23 +399,12 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, vid->screen->pitch, width, height, - pitch); + pitch); -#ifdef HAVE_MENU - menu_driver_frame(menu_is_alive, video_info); - if (vid->menu.active) - SDL_BlitSurface(vid->menu.frame, NULL, vid->screen, NULL); -#endif - - if (msg) - sdl_render_msg(vid, vid->screen, - msg, vid->screen->w, vid->screen->h, vid->screen->format, - video_info->font_msg_pos_x, - video_info->font_msg_pos_y); - - if (SDL_MUSTLOCK(vid->screen)) - SDL_UnlockSurface(vid->screen); + if (SDL_MUSTLOCK(vid->screen)) + SDL_UnlockSurface(vid->screen); + } if (title[0]) SDL_WM_SetCaption(title, NULL);