From b5aa3049c68c2f0ecb0457c50e5598f95a178839 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 18 Oct 2015 07:43:27 +0200 Subject: [PATCH] Refactor menu_video_ functions to menu_display_ --- menu/drivers/glui.c | 5 +++-- menu/drivers/xmb.c | 12 ++++++------ menu/drivers/zarch.c | 2 +- menu/menu_display.c | 6 +++--- menu/menu_display.h | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 900b53a0c7..cd89d53e41 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -114,7 +114,7 @@ static void glui_render_quad(gl_t *gl, int x, int y, int w, int h, coords.lut_tex_coord = glui_tex_coords; coords.color = coord_color; - menu_video_draw_frame( + menu_display_draw_frame( x, height - y - h, w, @@ -445,7 +445,8 @@ static void glui_frame(void) highlight_bg[i] = 0.1f; } } - menu_video_frame_background(menu, settings, + + menu_display_frame_background(menu, settings, gl, width, height, glui->textures.bg.id, 0.75f, false, &coord_color[0], &coord_color2[0], diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 99eec45d48..b565979833 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -365,7 +365,7 @@ static void xmb_draw_icon(gl_t *gl, xmb_handle_t *xmb, coords.lut_tex_coord = rmb_tex_coord; coords.color = (const float*)color; - menu_video_draw_frame( + menu_display_draw_frame( x, height - y, xmb->icon.size, @@ -399,7 +399,7 @@ static void xmb_draw_icon_predone(gl_t *gl, xmb_handle_t *xmb, coords.lut_tex_coord = rmb_tex_coord; coords.color = color; - menu_video_draw_frame( + menu_display_draw_frame( x, height - y, xmb->icon.size, @@ -430,7 +430,7 @@ static void xmb_draw_boxart(gl_t *gl, xmb_handle_t *xmb, GRfloat *color, unsigne coords.lut_tex_coord = rmb_tex_coord; coords.color = (const float*)color; - menu_video_draw_frame( + menu_display_draw_frame( x, height - y, xmb->boxart_size, @@ -1387,7 +1387,7 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb, xmb_draw_icon_begin(gl); - menu_video_draw_frame( + menu_display_draw_frame( x, height - y, xmb->cursor.size, @@ -1546,7 +1546,7 @@ static void xmb_frame(void) coord_color[3] = coord_color[7] = coord_color[11] = coord_color[15] = (0.75f > xmb->alpha) ? xmb->alpha : 0.75f; coord_color2[3] = coord_color2[7] = coord_color2[11] = coord_color2[15] = xmb->alpha; - menu_video_frame_background(menu, settings, + menu_display_frame_background(menu, settings, gl, width, height, xmb->textures.bg.id, xmb->alpha, false, &coord_color[0], &coord_color2[0], &rmb_vertex[0], &rmb_tex_coord[0]); @@ -1653,7 +1653,7 @@ static void xmb_frame(void) if (render_background) { - menu_video_frame_background(menu, settings, gl, + menu_display_frame_background(menu, settings, gl, width, height, xmb->textures.bg.id, xmb->alpha, true, &coord_color[0], &coord_color2[0], diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index fc91e73d47..59c4f52a5c 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -996,7 +996,7 @@ static void zarch_frame(void) if (zui->set->menu.mouse.enable) zarch_draw_cursor(gl, zui->mouse.x, zui->mouse.y); - menu_video_frame_background(menu, settings, + menu_display_frame_background(menu, settings, gl, zui->width, zui->height, zui->textures.bg.id, 0.75f, false, &coord_color[0], &coord_color2[0], diff --git a/menu/menu_display.c b/menu/menu_display.c index 0ca4e1ccdd..fce124b03c 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -483,7 +483,7 @@ void menu_display_msg_queue_push(const char *msg, unsigned prio, unsigned durati } #ifdef HAVE_OPENGL -void menu_video_draw_frame( +void menu_display_draw_frame( unsigned x, unsigned y, unsigned width, unsigned height, const void *shader_data, @@ -511,7 +511,7 @@ void menu_video_draw_frame( glDisable(GL_BLEND); } -void menu_video_frame_background( +void menu_display_frame_background( menu_handle_t *menu, settings_t *settings, gl_t *gl, @@ -546,7 +546,7 @@ void menu_video_frame_background( && texture) coords.color = (const float*)coord_color2; - menu_video_draw_frame(0, 0, width, height, + menu_display_draw_frame(0, 0, width, height, gl->shader, &coords, &gl->mvp_no_rot, true, texture); diff --git a/menu/menu_display.h b/menu/menu_display.h index c72b2463a7..57e53f8312 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -83,7 +83,7 @@ void menu_display_msg_queue_push(const char *msg, unsigned prio, unsigned durati #ifdef HAVE_OPENGL #include "../gfx/drivers/gl_common.h" -void menu_video_draw_frame( +void menu_display_draw_frame( unsigned x, unsigned y, unsigned width, unsigned height, const void *shader, @@ -93,7 +93,7 @@ void menu_video_draw_frame( GLuint texture ); -void menu_video_frame_background( +void menu_display_frame_background( menu_handle_t *menu, settings_t *settings, gl_t *gl,