mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(Menu) Fix transparent overlay when displaying messages with pause_libretro
This commit is contained in:
parent
cb5cea205a
commit
6ffa9b1f08
@ -75,9 +75,9 @@ static void glui_blit_line(float x, float y, const char *message, bool green)
|
||||
message, ¶ms);
|
||||
}
|
||||
|
||||
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';
|
||||
}
|
||||
|
@ -135,9 +135,9 @@ static void lakka_draw_text(lakka_handle_t *lakka,
|
||||
str, ¶ms);
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -222,9 +222,9 @@ static void xmb_draw_text(const char *str, float x,
|
||||
str, ¶ms);
|
||||
}
|
||||
|
||||
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';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user