From 6e62983cd5d2d6356baf5ab59de4a87dc7761ede Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 9 Mar 2015 14:39:39 +0100 Subject: [PATCH] (Menu) Implement 'null' menu driver --- Makefile.common | 3 ++- griffin/griffin.c | 3 +++ menu/drivers/null.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ menu/menu_driver.c | 1 + menu/menu_driver.h | 1 + 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 menu/drivers/null.c diff --git a/Makefile.common b/Makefile.common index dbe2281a44..6502224bff 100644 --- a/Makefile.common +++ b/Makefile.common @@ -325,7 +325,8 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/menu_entries_cbs_contentlist_switch.o \ menu/menu_entries_cbs.o \ menu/menu_list.o \ - menu/menu_animation.o + menu/menu_animation.o \ + menu/drivers/null.o endif ifeq ($(HAVE_FREETYPE), 1) diff --git a/griffin/griffin.c b/griffin/griffin.c index a4e576064e..6f48307f26 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -696,8 +696,11 @@ MENU #include "../menu/menu_navigation.c" #include "../menu/menu_animation.c" #include "../menu/menu_database.c" + +#include "../menu/drivers/null.c" #endif + #ifdef HAVE_RMENU #include "../menu/drivers/rmenu.c" #endif diff --git a/menu/drivers/null.c b/menu/drivers/null.c new file mode 100644 index 0000000000..bc12d2f494 --- /dev/null +++ b/menu/drivers/null.c @@ -0,0 +1,52 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2014-2015 - Jay McCarthy + * + * 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 +#include +#include +#include "../menu_driver.h" +#include "../menu.h" +#include "../../general.h" + +menu_ctx_driver_t menu_ctx_null = { + NULL, // set_texture + NULL, // render_messagebox + NULL, // render + NULL, // frame + NULL, // init + NULL, // free + NULL, // context_reset + NULL, // context_destroy + NULL, // populate_entries + NULL, // toggle + NULL, // navigation_clear + NULL, // navigation_decrement + NULL, // navigation_increment + NULL, // navigation_set + NULL, // navigation_set_last + NULL, // navigation_descend_alphabet + NULL, // navigation_ascend_alphabet + NULL, // list_insert + NULL, // list_delete + NULL, // list_clear + NULL, // list_cache + NULL, // list_set_selection + NULL, + NULL, + "null", +}; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 46ee40bc7d..ec8920d219 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -41,6 +41,7 @@ static const menu_ctx_driver_t *menu_ctx_drivers[] = { #if defined(HAVE_RGUI) &menu_ctx_rgui, #endif + &menu_ctx_null, NULL }; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 807e71d38e..51ad0270fc 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -248,6 +248,7 @@ extern menu_ctx_driver_t menu_ctx_rgui; extern menu_ctx_driver_t menu_ctx_glui; extern menu_ctx_driver_t menu_ctx_xmb; extern menu_ctx_driver_t menu_ctx_ios; +extern menu_ctx_driver_t menu_ctx_null; /** * menu_driver_find_handle: