mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
(Lakka) Background and labels display fixes
This commit is contained in:
parent
6f563b817c
commit
92ceaf98e5
@ -57,6 +57,13 @@ void *font;
|
|||||||
const gl_font_renderer_t *font_driver;
|
const gl_font_renderer_t *font_driver;
|
||||||
char font_path[PATH_MAX];
|
char font_path[PATH_MAX];
|
||||||
|
|
||||||
|
static const GLfloat vtest[] = {
|
||||||
|
0, 0,
|
||||||
|
1, 0,
|
||||||
|
0, 1,
|
||||||
|
1, 1
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
TEXTURE_MAIN = 0,
|
TEXTURE_MAIN = 0,
|
||||||
@ -234,9 +241,13 @@ void lakka_draw_background(void)
|
|||||||
if (!gl)
|
if (!gl)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//glViewport(gl->win_width-1920, 0, 1920, 1080);
|
||||||
|
glViewport(0, 0, gl->win_width, gl->win_height);
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
gl->coords.tex_coord = gl->tex_coords;
|
gl->coords.vertex = vtest;
|
||||||
|
gl->coords.tex_coord = vtest;
|
||||||
gl->coords.color = color;
|
gl->coords.color = color;
|
||||||
glBindTexture(GL_TEXTURE_2D, textures[TEXTURE_BG].id);
|
glBindTexture(GL_TEXTURE_2D, textures[TEXTURE_BG].id);
|
||||||
|
|
||||||
@ -260,13 +271,6 @@ void lakka_draw_icon(GLuint texture, float x, float y, float alpha, float rotati
|
|||||||
1.0f, 1.0f, 1.0f, alpha,
|
1.0f, 1.0f, 1.0f, alpha,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const GLfloat vtest[] = {
|
|
||||||
0, 0,
|
|
||||||
1, 0,
|
|
||||||
0, 1,
|
|
||||||
1, 1
|
|
||||||
};
|
|
||||||
|
|
||||||
gl_t *gl = (gl_t*)driver.video_data;
|
gl_t *gl = (gl_t*)driver.video_data;
|
||||||
|
|
||||||
if (!gl)
|
if (!gl)
|
||||||
@ -335,7 +339,7 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
subitem->zoom);
|
subitem->zoom);
|
||||||
lakka_draw_text("Resume",
|
lakka_draw_text("Resume",
|
||||||
156 + HSPACING*(i+2) + all_categories_x + dim/2.0,
|
156 + HSPACING*(i+2) + all_categories_x + dim/2.0,
|
||||||
300 + subitem->y + 15,
|
300 + subitem->y + 11,
|
||||||
1,
|
1,
|
||||||
subitem->alpha);
|
subitem->alpha);
|
||||||
}
|
}
|
||||||
@ -353,7 +357,7 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
subitem->zoom);
|
subitem->zoom);
|
||||||
lakka_draw_text(subitem->name,
|
lakka_draw_text(subitem->name,
|
||||||
156 + HSPACING * (i+2) + all_categories_x + dim/2.0,
|
156 + HSPACING * (i+2) + all_categories_x + dim/2.0,
|
||||||
300 + subitem->y + 15,
|
300 + subitem->y + 11,
|
||||||
1,
|
1,
|
||||||
subitem->alpha);
|
subitem->alpha);
|
||||||
}
|
}
|
||||||
@ -376,7 +380,7 @@ static void lakka_draw_items(int i)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (i == menu_active_category &&
|
if (i == menu_active_category &&
|
||||||
j > active_category->active_item - 4 &&
|
j > active_category->active_item - 5 &&
|
||||||
j < active_category->active_item + 10) // performance improvement
|
j < active_category->active_item + 10) // performance improvement
|
||||||
{
|
{
|
||||||
lakka_draw_icon(category->item_icon,
|
lakka_draw_icon(category->item_icon,
|
||||||
@ -389,7 +393,7 @@ static void lakka_draw_items(int i)
|
|||||||
if (depth == 0)
|
if (depth == 0)
|
||||||
lakka_draw_text(item->name,
|
lakka_draw_text(item->name,
|
||||||
156 + HSPACING * (i+1) + all_categories_x + dim/2.0,
|
156 + HSPACING * (i+1) + all_categories_x + dim/2.0,
|
||||||
300 + item->y + 15,
|
300 + item->y + 11,
|
||||||
1,
|
1,
|
||||||
item->alpha);
|
item->alpha);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user