From fcacc46ef523fcee2d3d50b8df4759708793783e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 1 Sep 2014 02:47:03 +0200 Subject: [PATCH] (Menu) Take out defer_decision function pointers --- driver_menu.h | 2 -- frontend/menu/backend/menu_common_backend.c | 14 ++++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/driver_menu.h b/driver_menu.h index 407bdd1c98..2358ef7c73 100644 --- a/driver_menu.h +++ b/driver_menu.h @@ -140,8 +140,6 @@ typedef struct menu_ctx_driver_backend int (*shader_manager_setting_toggle)(unsigned, unsigned); unsigned (*type_is)(unsigned); void (*setting_set_label)(char *, size_t, unsigned *, unsigned,unsigned); - void (*defer_decision_automatic)(void); - void (*defer_decision_manual)(void); const char *ident; } menu_ctx_driver_backend_t; diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index 8ad5455633..bda0eae874 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -546,7 +546,7 @@ static int menu_common_core_setting_toggle(unsigned setting, unsigned action) return 0; } -static void menu_common_defer_decision_automatic(void) +static void defer_decision_automatic(void) { if (driver.menu) { @@ -555,7 +555,7 @@ static void menu_common_defer_decision_automatic(void) } } -static void menu_common_defer_decision_manual(void) +static void defer_decision_manual(void) { if (driver.menu) menu_common_setting_push_current_menu(driver.menu->menu_stack, @@ -1959,15 +1959,11 @@ static int menu_action_ok(const char *dir, unsigned menu_type) if (ret == -1) { rarch_main_command(RARCH_CMD_LOAD_CORE); - if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->defer_decision_automatic) - driver.menu_ctx->backend->defer_decision_automatic(); + defer_decision_automatic(); return -1; } else if (ret == 0) - { - if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->defer_decision_manual) - driver.menu_ctx->backend->defer_decision_manual(); - } + defer_decision_manual(); } else { @@ -2462,7 +2458,5 @@ const menu_ctx_driver_backend_t menu_ctx_backend_common = { #endif menu_common_type_is, menu_common_setting_set_label, - menu_common_defer_decision_automatic, - menu_common_defer_decision_manual, "menu_common", };