Skip to content

Commit

Permalink
Merge pull request #5009 from psyke83/xmbtrans
Browse files Browse the repository at this point in the history
xmb: enable menu transparency support when emulation is paused (v2)
  • Loading branch information
kivutar committed Jun 11, 2017
2 parents a41b8bc + f413b23 commit 3644408
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions gfx/video_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion menu/drivers/xmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion menu/menu_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3644408

Please sign in to comment.