From 3f32a7f1b7582e4062de5032613dac7bee4c9b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 8 Apr 2018 15:37:29 +0700 Subject: [PATCH] [stripes] Remove useless ribbon stuff --- menu/drivers/stripes.c | 45 ------------------------------------------ 1 file changed, 45 deletions(-) diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c index 777b53a476..fe40341016 100755 --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -3332,49 +3332,6 @@ static void stripes_layout(stripes_handle_t *stripes) } } -static void stripes_ribbon_set_vertex(float *ribbon_verts, - unsigned idx, unsigned row, unsigned col) -{ - ribbon_verts[idx++] = ((float)col) / (STRIPES_RIBBON_COLS-1) * 2.0f - 1.0f; - ribbon_verts[idx++] = ((float)row) / (STRIPES_RIBBON_ROWS-1) * 2.0f - 1.0f; -} - -static void stripes_init_ribbon(stripes_handle_t * stripes) -{ - video_coords_t coords; - unsigned r, c, col; - unsigned i = 0; - video_coord_array_t *ca = menu_display_get_coords_array(); - unsigned vertices_total = STRIPES_RIBBON_VERTICES; - float *dummy = (float*)calloc(4 * vertices_total, sizeof(float)); - float *ribbon_verts = (float*)calloc(2 * vertices_total, sizeof(float)); - - /* Set up vertices */ - for (r = 0; r < STRIPES_RIBBON_ROWS - 1; r++) - { - for (c = 0; c < STRIPES_RIBBON_COLS; c++) - { - col = r % 2 ? STRIPES_RIBBON_COLS - c - 1 : c; - stripes_ribbon_set_vertex(ribbon_verts, i, r, col); - stripes_ribbon_set_vertex(ribbon_verts, i + 2, r + 1, col); - i += 4; - } - } - - coords.color = dummy; - coords.vertex = ribbon_verts; - coords.tex_coord = dummy; - coords.lut_tex_coord = dummy; - coords.vertices = vertices_total; - - video_coord_array_append(ca, &coords, coords.vertices); - - free(dummy); - free(ribbon_verts); -} - - - static void *stripes_init(void **userdata, bool video_is_threaded) { unsigned width, height; @@ -3483,8 +3440,6 @@ static void *stripes_init(void **userdata, bool video_is_threaded) if (stripes->horizontal_list) stripes_init_horizontal_list(stripes); - stripes_init_ribbon(stripes); - return menu; error: