From 1a9f1f6b33d440634301f16a6634b7e901a5f402 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 22 Feb 2021 06:38:55 +0100 Subject: [PATCH] gfx_display_init_first_driver was called twice, once invoked by drivers_init, after that invoked by each menu driver's init function. Taking the extra function call out of the menu driver's init function --- menu/drivers/materialui.c | 3 --- menu/drivers/ozone/ozone.c | 3 --- menu/drivers/rgui.c | 5 ----- menu/drivers/stripes.c | 3 --- menu/drivers/xmb.c | 6 ------ 5 files changed, 20 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 92890c7820..38a26e7f2d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -7630,9 +7630,6 @@ static void *materialui_init(void **userdata, bool video_is_threaded) return NULL; } - if (!gfx_display_init_first_driver(video_is_threaded)) - goto error; - mui = (materialui_handle_t*) calloc(1, sizeof(materialui_handle_t)); diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index 76e00a7ad9..3041cc13c0 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -691,9 +691,6 @@ static void *ozone_init(void **userdata, bool video_is_threaded) if (!menu) return NULL; - if (!gfx_display_init_first_driver(video_is_threaded)) - goto error; - video_driver_get_size(&width, &height); ozone = (ozone_handle_t*)calloc(1, sizeof(ozone_handle_t)); diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 4e292bc7de..cf38fecc4d 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -5229,12 +5229,7 @@ static void *rgui_init(void **userdata, bool video_is_threaded) rgui->widgets_supported = gfx_widgets_ready(); if (rgui->widgets_supported) - { - if (!gfx_display_init_first_driver(video_is_threaded)) - goto error; - gfx_display_init_white_texture(gfx_display_white_texture); - } #endif rgui->menu_title[0] = '\0'; diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c index 42337833fe..0063b6a559 100644 --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -3318,9 +3318,6 @@ static void *stripes_init(void **userdata, bool video_is_threaded) if (!menu) goto error; - if (!gfx_display_init_first_driver(video_is_threaded)) - goto error; - video_driver_get_size(&width, &height); stripes = (stripes_handle_t*)calloc(1, sizeof(stripes_handle_t)); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 18900a8791..95bef3ec32 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -5583,12 +5583,6 @@ static void *xmb_init(void **userdata, bool video_is_threaded) if (!menu) return NULL; - if (!gfx_display_init_first_driver(video_is_threaded)) - { - free(menu); - return NULL; - } - video_driver_get_size(&width, &height); xmb = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));