Merge pull request #1132 from lakkatv/xmb

(Menu) Fix transparent overlay when displaying messages with pause_libre...
This commit is contained in:
Twinaphex 2014-10-12 18:24:26 +02:00
commit d15d7c9e8f
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); 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; gl_t *gl = NULL;
glui_handle_t *glui = NULL; glui_handle_t *glui = NULL;
@ -132,6 +132,7 @@ static void glui_render_background(void)
if ((g_settings.menu.pause_libretro if ((g_settings.menu.pause_libretro
|| !g_extern.main_is_init || g_extern.libretro_dummy) || !g_extern.main_is_init || g_extern.libretro_dummy)
&& !force_transparency
&& glui->bg) && glui->bg)
{ {
coords.color = color; coords.color = color;
@ -256,7 +257,7 @@ static void glui_frame(void)
if (end - begin > glui->term_height) if (end - begin > glui->term_height)
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); 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') if (glui->box_message[0] != '\0')
{ {
glui_render_background(); glui_render_background(true);
glui_render_messagebox(glui->box_message); glui_render_messagebox(glui->box_message);
glui->box_message[0] = '\0'; glui->box_message[0] = '\0';
} }

View File

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

View File

@ -222,9 +222,9 @@ static void xmb_draw_text(const char *str, float x,
str, &params); 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; gl_t *gl = NULL;
xmb_handle_t *xmb = NULL; xmb_handle_t *xmb = NULL;
@ -282,6 +282,7 @@ static void xmb_render_background(void)
if ((g_settings.menu.pause_libretro if ((g_settings.menu.pause_libretro
|| !g_extern.main_is_init || g_extern.libretro_dummy) || !g_extern.main_is_init || g_extern.libretro_dummy)
&& !force_transparency
&& xmb->textures[XMB_TEXTURE_BG].id) && xmb->textures[XMB_TEXTURE_BG].id)
{ {
coords.color = color; coords.color = color;
@ -425,7 +426,7 @@ static void xmb_frame(void)
glViewport(0, 0, gl->win_width, gl->win_height); 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); 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') if (xmb->box_message[0] != '\0')
{ {
xmb_render_background(); xmb_render_background(true);
xmb_render_messagebox(xmb->box_message); xmb_render_messagebox(xmb->box_message);
xmb->box_message[0] = '\0'; xmb->box_message[0] = '\0';
} }