From 67cfff252007c085441ffee0e9a7b3c2198f7b17 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 3 Feb 2020 07:04:06 +0100 Subject: [PATCH] Remove the menu display null drivers --- Makefile.common | 7 +- menu/drivers_display/menu_display_fpga.c | 106 -------------------- menu/drivers_display/menu_display_sixel.c | 114 ---------------------- menu/menu_defines.h | 4 +- menu/menu_driver.c | 17 ---- menu/menu_driver.h | 2 - 6 files changed, 2 insertions(+), 248 deletions(-) delete mode 100644 menu/drivers_display/menu_display_fpga.c delete mode 100644 menu/drivers_display/menu_display_sixel.c diff --git a/Makefile.common b/Makefile.common index 581fb69962..1222bef126 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1136,10 +1136,6 @@ ifeq ($(HAVE_SIXEL), 1) gfx/drivers_context/sixel_ctx.o LIBS += $(SIXEL_LIBS) DEF_FLAGS += $(SIXEL_CFLAGS) - - ifeq ($(HAVE_MENU_COMMON), 1) - OBJ += menu/drivers_display/menu_display_sixel.o - endif endif ifeq ($(HAVE_NETWORK_VIDEO), 1) @@ -1970,8 +1966,7 @@ endif ifneq ($(findstring FPGA,$(OS)),) OBJ += gfx/drivers/fpga_gfx.o \ gfx/drivers_context/fpga_ctx.o \ - gfx/drivers_font/fpga_font.o \ - menu/drivers_display/menu_display_fpga.o + gfx/drivers_font/fpga_font.o endif ifneq ($(findstring Win32,$(OS)),) diff --git a/menu/drivers_display/menu_display_fpga.c b/menu/drivers_display/menu_display_fpga.c deleted file mode 100644 index 2249e4c9f3..0000000000 --- a/menu/drivers_display/menu_display_fpga.c +++ /dev/null @@ -1,106 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2017 - Brad Parker - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#include - -#include -#include - -#include "../../config.def.h" -#include "../../gfx/font_driver.h" -#include "../../gfx/video_driver.h" - -#include "../menu_driver.h" - -static void *menu_display_fpga_get_default_mvp(void) -{ - return NULL; -} - -static void menu_display_fpga_blend_begin(void) -{ -} - -static void menu_display_fpga_blend_end(void) -{ -} - -static void menu_display_fpga_draw(void *data) -{ - (void)data; -} - -static void menu_display_fpga_draw_pipeline(void *data) -{ - (void)data; -} - -static void menu_display_fpga_viewport(void *data) -{ - (void)data; -} - -static void menu_display_fpga_restore_clear_color(void) -{ -} - -static void menu_display_fpga_clear_color(menu_display_ctx_clearcolor_t *clearcolor) -{ - (void)clearcolor; - - menu_display_fpga_restore_clear_color(); -} - -static bool menu_display_fpga_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_FPGA); - return *handle; -} - -static const float *menu_display_fpga_get_default_vertices(void) -{ - static float dummy[16] = {0.0f}; - return &dummy[0]; -} - -static const float *menu_display_fpga_get_default_tex_coords(void) -{ - static float dummy[16] = {0.0f}; - return &dummy[0]; -} - -menu_display_ctx_driver_t menu_display_ctx_fpga = { - menu_display_fpga_draw, - menu_display_fpga_draw_pipeline, - menu_display_fpga_viewport, - menu_display_fpga_blend_begin, - menu_display_fpga_blend_end, - menu_display_fpga_restore_clear_color, - menu_display_fpga_clear_color, - menu_display_fpga_get_default_mvp, - menu_display_fpga_get_default_vertices, - menu_display_fpga_get_default_tex_coords, - menu_display_fpga_font_init_first, - MENU_VIDEO_DRIVER_FPGA, - "menu_display_fpga", -}; diff --git a/menu/drivers_display/menu_display_sixel.c b/menu/drivers_display/menu_display_sixel.c deleted file mode 100644 index 24f60f86f8..0000000000 --- a/menu/drivers_display/menu_display_sixel.c +++ /dev/null @@ -1,114 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2019 - Brad Parker - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#include - -#include -#include - -#include "../../config.def.h" -#include "../../gfx/font_driver.h" -#include "../../retroarch.h" - -#include "../menu_driver.h" - -static void *menu_display_sixel_get_default_mvp(video_frame_info_t *video_info) -{ - return NULL; -} - -static void menu_display_sixel_blend_begin(video_frame_info_t *video_info) -{ -} - -static void menu_display_sixel_blend_end(video_frame_info_t *video_info) -{ -} - -static void menu_display_sixel_draw(menu_display_ctx_draw_t *data, - video_frame_info_t *video_info) -{ - (void)data; -} - -static void menu_display_sixel_draw_pipeline(menu_display_ctx_draw_t *data, - video_frame_info_t *video_info) -{ - (void)data; -} - -static void menu_display_sixel_viewport(menu_display_ctx_draw_t *data, - video_frame_info_t *video_info) -{ - (void)data; -} - -static void menu_display_sixel_restore_clear_color(void) -{ -} - -static void menu_display_sixel_clear_color( - menu_display_ctx_clearcolor_t *clearcolor, - video_frame_info_t *video_info) -{ - (void)clearcolor; - - menu_display_sixel_restore_clear_color(); -} - -static bool menu_display_sixel_font_init_first( - void **font_handle, void *video_data, - const char *font_path, float font_size, - bool is_threaded) -{ - font_data_t **handle = (font_data_t**)font_handle; - *handle = font_driver_init_first(video_data, - font_path, font_size, true, - is_threaded, - FONT_DRIVER_RENDER_SIXEL); - return *handle; -} - -static const float *menu_display_sixel_get_default_vertices(void) -{ - static float dummy[16] = {0.0f}; - return &dummy[0]; -} - -static const float *menu_display_sixel_get_default_tex_coords(void) -{ - static float dummy[16] = {0.0f}; - return &dummy[0]; -} - -menu_display_ctx_driver_t menu_display_ctx_sixel = { - menu_display_sixel_draw, - menu_display_sixel_draw_pipeline, - menu_display_sixel_viewport, - menu_display_sixel_blend_begin, - menu_display_sixel_blend_end, - menu_display_sixel_restore_clear_color, - menu_display_sixel_clear_color, - menu_display_sixel_get_default_mvp, - menu_display_sixel_get_default_vertices, - menu_display_sixel_get_default_tex_coords, - menu_display_sixel_font_init_first, - MENU_VIDEO_DRIVER_SIXEL, - "sixel", - false, - NULL, - NULL -}; diff --git a/menu/menu_defines.h b/menu/menu_defines.h index 0e07354425..ebfff4270e 100644 --- a/menu/menu_defines.h +++ b/menu/menu_defines.h @@ -274,10 +274,8 @@ enum menu_display_driver_type MENU_VIDEO_DRIVER_VITA2D, MENU_VIDEO_DRIVER_CTR, MENU_VIDEO_DRIVER_WIIU, - MENU_VIDEO_DRIVER_SIXEL, MENU_VIDEO_DRIVER_GDI, - MENU_VIDEO_DRIVER_SWITCH, - MENU_VIDEO_DRIVER_FPGA + MENU_VIDEO_DRIVER_SWITCH }; enum rgui_thumbnail_scaler diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 79d8fc6398..86b7930786 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -287,15 +287,6 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = { #ifdef HAVE_GDI &menu_display_ctx_gdi, #endif -#endif -#ifdef DJGPP - &menu_display_ctx_vga, -#endif -#ifdef HAVE_SIXEL - &menu_display_ctx_sixel, -#endif -#ifdef HAVE_FPGA - &menu_display_ctx_fpga, #endif &menu_display_ctx_null, NULL, @@ -1677,18 +1668,10 @@ static bool menu_display_check_compatibility( if (string_is_equal(video_driver, "gx2")) return true; break; - case MENU_VIDEO_DRIVER_SIXEL: - if (string_is_equal(video_driver, "sixel")) - return true; - break; case MENU_VIDEO_DRIVER_GDI: if (string_is_equal(video_driver, "gdi")) return true; break; - case MENU_VIDEO_DRIVER_FPGA: - if (string_is_equal(video_driver, "fpga")) - return true; - break; case MENU_VIDEO_DRIVER_SWITCH: if (string_is_equal(video_driver, "switch")) return true; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 9ec899175d..1537ecf636 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -734,9 +734,7 @@ extern menu_display_ctx_driver_t menu_display_ctx_vita2d; extern menu_display_ctx_driver_t menu_display_ctx_ctr; extern menu_display_ctx_driver_t menu_display_ctx_wiiu; extern menu_display_ctx_driver_t menu_display_ctx_gdi; -extern menu_display_ctx_driver_t menu_display_ctx_fpga; extern menu_display_ctx_driver_t menu_display_ctx_switch; -extern menu_display_ctx_driver_t menu_display_ctx_sixel; extern menu_ctx_driver_t menu_ctx_ozone; extern menu_ctx_driver_t menu_ctx_xui;