Don't pass gl_t pointer to menu_display functions

This commit is contained in:
twinaphex 2015-11-02 19:11:09 +01:00
parent 7c69249e63
commit 5b15ed2b60
5 changed files with 12 additions and 15 deletions

View File

@ -727,7 +727,7 @@ static void glui_frame(void)
if (libretro_running)
{
menu_display_frame_background(menu, settings,
gl, width, height,
width, height,
glui->textures.white, 0.75f, false,
&white_transp_bg[0], &white_bg[0],
&glui_vertexes[0], &glui_tex_coords[0], 4,
@ -749,7 +749,7 @@ static void glui_frame(void)
white_transp_bg[15] = 0.30;
menu_display_frame_background(menu, settings,
gl, width, height,
width, height,
glui->textures.bg.id, 0.75f, true,
&white_transp_bg[0], &white_bg[0],
&glui_vertexes[0], &glui_tex_coords[0], 4,

View File

@ -1596,7 +1596,7 @@ static void xmb_frame(void)
coord_color2[3] = coord_color2[7] = coord_color2[11] = coord_color2[15] = xmb->alpha;
menu_display_frame_background(menu, settings,
gl, width, height, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0],
width, height, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0],
&coord_color2[0], &rmb_vertex[0], &rmb_tex_coord[0], 4,
MENU_DISPLAY_PRIM_TRIANGLESTRIP);
@ -1703,7 +1703,7 @@ static void xmb_frame(void)
if (render_background)
{
menu_display_frame_background(menu, settings, gl,
menu_display_frame_background(menu, settings,
width, height,
xmb->textures.bg.id, xmb->alpha, true,
&coord_color[0], &coord_color2[0],

View File

@ -887,7 +887,7 @@ static int zarch_zui_load_content(zui_t *zui, unsigned i)
return ret;
}
static void zarch_zui_draw_cursor(gl_t *gl, float x, float y)
static void zarch_zui_draw_cursor(float x, float y)
{
}
@ -979,9 +979,8 @@ static void zarch_frame(void)
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
if (!menu || !gl)
if (!menu)
return;
(void)driver;
@ -1044,11 +1043,8 @@ static void zarch_frame(void)
break;
}
/* fetch it again in case the pointer was invalidated by a core load */
gl = (gl_t*)video_driver_get_ptr(NULL);
if (settings->menu.mouse.enable)
zarch_zui_draw_cursor(gl, zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_X), zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_Y));
zarch_zui_draw_cursor(zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_X), zarch_zui_input_state(zui, MENU_ZARCH_MOUSE_Y));
if (!zarch_zui_input_state(zui, MENU_ZARCH_PRESSED))
@ -1070,7 +1066,7 @@ static void zarch_frame(void)
menu_display_blend_end();
menu_display_frame_background(menu, settings,
gl, zui->width, zui->height,
zui->width, zui->height,
zui->textures.bg.id, 0.75f, false,
&coord_color[0], &coord_color2[0],
&zarch_vertexes[0], &zarch_tex_coords[0], 4,

View File

@ -553,7 +553,6 @@ void menu_display_draw_frame(
void menu_display_frame_background(
menu_handle_t *menu,
settings_t *settings,
gl_t *gl,
unsigned width,
unsigned height,
GLuint texture,
@ -567,8 +566,11 @@ void menu_display_frame_background(
enum menu_display_prim_type prim_type)
{
struct gfx_coords coords;
global_t *global = global_get_ptr();
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
if (!gl)
return;
coords.vertices = vertex_count;
coords.vertex = vertex;

View File

@ -109,7 +109,6 @@ void menu_display_blend_end(void);
void menu_display_frame_background(
menu_handle_t *menu,
settings_t *settings,
gl_t *gl,
unsigned width, unsigned height,
GLuint texture,
float handle_alpha,