Merge pull request #5009 from psyke83/xmbtrans

xmb: enable menu transparency support when emulation is paused (v2)
This commit is contained in:
Jean-André Santoni 2017-06-11 21:23:24 +02:00 committed by GitHub
commit 364440813f
3 changed files with 5 additions and 6 deletions

View File

@ -1063,7 +1063,8 @@ static bool video_driver_init_internal(bool *video_is_threaded)
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
command_event(CMD_EVENT_OVERLAY_INIT, NULL);
video_driver_cached_frame_set(&dummy_pixels, 4, 4, 8);
if (!core_is_game_loaded())
video_driver_cached_frame_set(&dummy_pixels, 4, 4, 8);
#if defined(PSP)
video_driver_set_texture_frame(&dummy_pixels, false, 1, 1, 1.0f);
@ -2502,9 +2503,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
video_info->xmb_alpha_factor = settings->uints.menu_xmb_alpha_factor;
video_info->menu_wallpaper_opacity = settings->floats.menu_wallpaper_opacity;
if (!settings->bools.menu_pause_libretro)
video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL)
&& !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL));
video_info->libretro_running = core_is_game_loaded();
#else
video_info->menu_is_alive = false;
video_info->menu_footer_opacity = 0.0f;

View File

@ -2582,7 +2582,7 @@ static void xmb_draw_bg(
if (!running && draw.texture)
draw.color = &coord_white[0];
if (video_info->xmb_color_theme == XMB_THEME_WALLPAPER)
if (running || video_info->xmb_color_theme == XMB_THEME_WALLPAPER)
add_opacity = true;
menu_display_draw_bg(&draw, video_info, add_opacity);

View File

@ -543,7 +543,7 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw,
draw->coords = &coords;
if (!video_info->libretro_running && !draw->pipeline.active)
if (draw->texture)
add_opacity_to_wallpaper = true;
if (add_opacity_to_wallpaper)