From 274cfe0f9fcf09ce7fa66d4b5110f00746ba4278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 10 Feb 2015 14:52:25 +0100 Subject: [PATCH 1/3] (Menu) input_postprocess was not used anymore by any menu driver --- menu/drivers/glui.c | 1 - menu/drivers/ios.c | 1 - menu/drivers/rgui.c | 1 - menu/drivers/rmenu.c | 1 - menu/drivers/rmenu_xui.cpp | 1 - menu/drivers/xmb.c | 1 - menu/menu.c | 3 --- menu/menu_driver.h | 1 - 8 files changed, 10 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index de0e2b3f7b..47913ab853 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -638,7 +638,6 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, NULL, NULL, - NULL, glui_navigation_clear, NULL, NULL, diff --git a/menu/drivers/ios.c b/menu/drivers/ios.c index bcca2b089e..e240b7fb5c 100644 --- a/menu/drivers/ios.c +++ b/menu/drivers/ios.c @@ -101,7 +101,6 @@ menu_ctx_driver_t menu_ctx_ios = { NULL, // context_destroy NULL, // populate_entries NULL, // iterate - NULL, // input_postprocess NULL, // toggle NULL, // navigation_clear NULL, // navigation_decrement diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 2164513cc5..7c91350bf2 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -667,7 +667,6 @@ menu_ctx_driver_t menu_ctx_rgui = { rgui_populate_entries, NULL, NULL, - NULL, rgui_navigation_clear, NULL, NULL, diff --git a/menu/drivers/rmenu.c b/menu/drivers/rmenu.c index 42d0d976fb..9fd52bdcc8 100644 --- a/menu/drivers/rmenu.c +++ b/menu/drivers/rmenu.c @@ -392,7 +392,6 @@ menu_ctx_driver_t menu_ctx_rmenu = { NULL, NULL, NULL, - NULL, rmenu_entry_iterate, "rmenu", }; diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index ed4acd8e04..d75c03d52c 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -700,7 +700,6 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = { NULL, rmenu_xui_populate_entries, NULL, - NULL, rmenu_xui_navigation_clear, rmenu_xui_navigation_set_visible, rmenu_xui_navigation_set_visible, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index a9175b042b..a24ca6d46a 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1704,7 +1704,6 @@ menu_ctx_driver_t menu_ctx_xmb = { xmb_context_destroy, xmb_populate_entries, NULL, - NULL, xmb_toggle, xmb_navigation_clear, xmb_navigation_decrement, diff --git a/menu/menu.c b/menu/menu.c index ce548adeb5..85c8ee43c1 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -432,9 +432,6 @@ int menu_iterate(retro_input_t input, if (g_settings.menu.throttle && (g_settings.menu.pause_libretro || !g_extern.content_is_init)) draw_frame(); - if (driver.menu_ctx && driver.menu_ctx->input_postprocess) - driver.menu_ctx->input_postprocess(input, old_input); - if (ret) return -1; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index dae4a479fd..9001c2a436 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -187,7 +187,6 @@ typedef struct menu_ctx_driver void (*populate_entries)(void*, const char *, const char *, unsigned); void (*iterate)(void*, unsigned); - int (*input_postprocess)(uint64_t, uint64_t); void (*toggle)(bool); void (*navigation_clear)(void *, bool); void (*navigation_decrement)(void *); From e330f03124d50bfa8e7a7496b2ac86d3348ee871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 10 Feb 2015 15:02:38 +0100 Subject: [PATCH 2/3] (Menu) init_lists was not used either --- menu/drivers/glui.c | 1 - menu/drivers/ios.c | 1 - menu/drivers/rgui.c | 1 - menu/drivers/rmenu.c | 1 - menu/drivers/rmenu_xui.cpp | 1 - menu/drivers/xmb.c | 1 - menu/menu.c | 26 -------------------------- menu/menu.h | 11 ----------- menu/menu_driver.c | 3 ++- menu/menu_driver.h | 1 - 10 files changed, 2 insertions(+), 45 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 47913ab853..20bbc65b1a 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -631,7 +631,6 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, glui_frame, glui_init, - NULL, glui_free, glui_context_reset, NULL, diff --git a/menu/drivers/ios.c b/menu/drivers/ios.c index e240b7fb5c..ca32d04817 100644 --- a/menu/drivers/ios.c +++ b/menu/drivers/ios.c @@ -95,7 +95,6 @@ menu_ctx_driver_t menu_ctx_ios = { NULL, // render NULL, // frame ios_init, // init - NULL, // init_lists ios_free, // free NULL, // context_reset NULL, // context_destroy diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 7c91350bf2..e9ab569f77 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -660,7 +660,6 @@ menu_ctx_driver_t menu_ctx_rgui = { rgui_render, NULL, rgui_init, - NULL, rgui_free, NULL, NULL, diff --git a/menu/drivers/rmenu.c b/menu/drivers/rmenu.c index 9fd52bdcc8..d0b8101577 100644 --- a/menu/drivers/rmenu.c +++ b/menu/drivers/rmenu.c @@ -373,7 +373,6 @@ menu_ctx_driver_t menu_ctx_rmenu = { rmenu_render, NULL, rmenu_init, - NULL, rmenu_free, rmenu_context_reset, rmenu_context_destroy, diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index d75c03d52c..6fc658a1bf 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -694,7 +694,6 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = { rmenu_xui_render, rmenu_xui_frame, rmenu_xui_init, - NULL, rmenu_xui_free, NULL, NULL, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index a24ca6d46a..88b7f1da73 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1698,7 +1698,6 @@ menu_ctx_driver_t menu_ctx_xmb = { NULL, xmb_frame, xmb_init, - NULL, xmb_free, xmb_context_reset, xmb_context_destroy, diff --git a/menu/menu.c b/menu/menu.c index 85c8ee43c1..9c420663aa 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -215,32 +215,6 @@ void menu_free_list(void *data) menu->list_settings = NULL; } -/** - * menu_init_list: - * @data : Menu handle. - * - * Initialize menu lists. - * Will be performed after menu_init(). - * - * Returns: true (1) if successful, otherwise false (0). - **/ -bool menu_init_list(void *data) -{ - menu_handle_t *menu = (menu_handle_t*)data; - - if (!menu) - return false; - - if (!menu_entries_init(menu)) - return false; - - if (driver.menu_ctx && driver.menu_ctx->init_lists) - if (!(driver.menu_ctx->init_lists(menu))) - return false; - - return true; -} - /** * menu_free: * @info : Menu handle. diff --git a/menu/menu.h b/menu/menu.h index 0fe35c86b8..56eaae055b 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -155,17 +155,6 @@ void *menu_init(const void *data); **/ void menu_free_list(void *data); -/** - * menu_init_list: - * @data : Menu handle. - * - * Initialize menu lists. - * Will be performed after menu_init(). - * - * Returns: true (1) if successful, otherwise false (0). - **/ -bool menu_init_list(void *data); - /** * menu_iterate: * @input : input sample for this frame diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 99e6f28cd5..04502c23d5 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -18,6 +18,7 @@ #include #include "menu_driver.h" #include "menu.h" +#include "menu_entries.h" #include "../driver.h" #include "../general.h" @@ -153,7 +154,7 @@ void init_menu(void) rarch_fail(1, "init_menu()"); } - if (!(menu_init_list(driver.menu))) + if (!(menu_entries_init(driver.menu))) { RARCH_ERR("Cannot initialize menu lists.\n"); rarch_fail(1, "init_menu()"); diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 9001c2a436..3e43f3f96e 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -180,7 +180,6 @@ typedef struct menu_ctx_driver void (*render)(void); void (*frame)(void); void* (*init)(void); - bool (*init_lists)(void*); void (*free)(void*); void (*context_reset)(void*); void (*context_destroy)(void*); From f331eba2992cd915af94efb12a406fde099f7ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 10 Feb 2015 15:06:41 +0100 Subject: [PATCH 3/3] (Menu) iterate was not used either --- menu/drivers/glui.c | 1 - menu/drivers/ios.c | 1 - menu/drivers/rgui.c | 1 - menu/drivers/rmenu.c | 1 - menu/drivers/rmenu_xui.cpp | 1 - menu/drivers/xmb.c | 1 - menu/menu_driver.h | 1 - menu/menu_entries_cbs.c | 3 --- 8 files changed, 10 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 20bbc65b1a..52028735d9 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -636,7 +636,6 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, NULL, NULL, - NULL, glui_navigation_clear, NULL, NULL, diff --git a/menu/drivers/ios.c b/menu/drivers/ios.c index ca32d04817..6df78ff90a 100644 --- a/menu/drivers/ios.c +++ b/menu/drivers/ios.c @@ -99,7 +99,6 @@ menu_ctx_driver_t menu_ctx_ios = { NULL, // context_reset NULL, // context_destroy NULL, // populate_entries - NULL, // iterate NULL, // toggle NULL, // navigation_clear NULL, // navigation_decrement diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index e9ab569f77..6412ae8a61 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -665,7 +665,6 @@ menu_ctx_driver_t menu_ctx_rgui = { NULL, rgui_populate_entries, NULL, - NULL, rgui_navigation_clear, NULL, NULL, diff --git a/menu/drivers/rmenu.c b/menu/drivers/rmenu.c index d0b8101577..0f7d84883c 100644 --- a/menu/drivers/rmenu.c +++ b/menu/drivers/rmenu.c @@ -390,7 +390,6 @@ menu_ctx_driver_t menu_ctx_rmenu = { NULL, NULL, NULL, - NULL, rmenu_entry_iterate, "rmenu", }; diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index 6fc658a1bf..562ae0fa72 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -698,7 +698,6 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = { NULL, NULL, rmenu_xui_populate_entries, - NULL, rmenu_xui_navigation_clear, rmenu_xui_navigation_set_visible, rmenu_xui_navigation_set_visible, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 88b7f1da73..e36230fa10 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1702,7 +1702,6 @@ menu_ctx_driver_t menu_ctx_xmb = { xmb_context_reset, xmb_context_destroy, xmb_populate_entries, - NULL, xmb_toggle, xmb_navigation_clear, xmb_navigation_decrement, diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 3e43f3f96e..3c034f858a 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -185,7 +185,6 @@ typedef struct menu_ctx_driver void (*context_destroy)(void*); void (*populate_entries)(void*, const char *, const char *, unsigned); - void (*iterate)(void*, unsigned); void (*toggle)(bool); void (*navigation_clear)(void *, bool); void (*navigation_decrement)(void *); diff --git a/menu/menu_entries_cbs.c b/menu/menu_entries_cbs.c index d3e211d6b4..d326d7cf58 100644 --- a/menu/menu_entries_cbs.c +++ b/menu/menu_entries_cbs.c @@ -4105,9 +4105,6 @@ static int action_iterate_main(const char *label, unsigned action) ret = mouse_post_iterate(cbs, path_offset, label_offset, type_offset, action); - if (driver.menu_ctx && driver.menu_ctx->iterate) - driver.menu_ctx->iterate(driver.menu, action); - if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render) driver.menu_ctx->render();