(Menu) Fix transparent overlay when displaying messages with pause_libretro

This commit is contained in:
Jean-André Santoni 2014-10-12 18:22:51 +02:00
parent cb5cea205a
commit 6ffa9b1f08
3 changed files with 15 additions and 12 deletions

View File

@ -75,9 +75,9 @@ static void glui_blit_line(float x, float y, const char *message, bool green)
message, &params);
}
static void glui_render_background(void)
static void glui_render_background(bool force_transparency)
{
float alpha = 0.9f;
float alpha = 0.75f;
gl_t *gl = NULL;
glui_handle_t *glui = NULL;
@ -132,6 +132,7 @@ static void glui_render_background(void)
if ((g_settings.menu.pause_libretro
|| !g_extern.main_is_init || g_extern.libretro_dummy)
&& !force_transparency
&& glui->bg)
{
coords.color = color;
@ -256,7 +257,7 @@ static void glui_frame(void)
if (end - begin > glui->term_height)
end = begin + glui->term_height;
glui_render_background();
glui_render_background(false);
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
@ -352,7 +353,7 @@ static void glui_frame(void)
if (glui->box_message[0] != '\0')
{
glui_render_background();
glui_render_background(true);
glui_render_messagebox(glui->box_message);
glui->box_message[0] = '\0';
}

View File

@ -135,9 +135,9 @@ static void lakka_draw_text(lakka_handle_t *lakka,
str, &params);
}
void lakka_draw_background(void)
void lakka_draw_background(bool force_transparency)
{
float alpha = 0.9f;
float alpha = 0.75f;
gl_t *gl = NULL;
lakka_handle_t *lakka = NULL;
@ -181,6 +181,7 @@ void lakka_draw_background(void)
if ((g_settings.menu.pause_libretro
|| !g_extern.main_is_init || g_extern.libretro_dummy)
&& !force_transparency
&& lakka->textures[TEXTURE_BG].id)
{
coords.color = color;
@ -567,11 +568,11 @@ static void lakka_frame(void)
lakka_draw_arrow(lakka);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, gl->win_width, gl->win_height);
lakka_draw_background();
lakka_draw_background(false);
lakka_draw_fbo();
#else
glViewport(0, 0, gl->win_width, gl->win_height);
lakka_draw_background();
lakka_draw_background(false);
lakka_draw_categories(lakka);
lakka_draw_arrow(lakka);
#endif

View File

@ -222,9 +222,9 @@ static void xmb_draw_text(const char *str, float x,
str, &params);
}
static void xmb_render_background(void)
static void xmb_render_background(bool force_transparency)
{
float alpha = 0.9f;
float alpha = 0.75f;
gl_t *gl = NULL;
xmb_handle_t *xmb = NULL;
@ -282,6 +282,7 @@ static void xmb_render_background(void)
if ((g_settings.menu.pause_libretro
|| !g_extern.main_is_init || g_extern.libretro_dummy)
&& !force_transparency
&& xmb->textures[XMB_TEXTURE_BG].id)
{
coords.color = color;
@ -425,7 +426,7 @@ static void xmb_frame(void)
glViewport(0, 0, gl->win_width, gl->win_height);
xmb_render_background();
xmb_render_background(false);
file_list_get_last(driver.menu->menu_stack, &dir, &label, &menu_type);
@ -525,7 +526,7 @@ static void xmb_frame(void)
if (xmb->box_message[0] != '\0')
{
xmb_render_background();
xmb_render_background(true);
xmb_render_messagebox(xmb->box_message);
xmb->box_message[0] = '\0';
}