From 55aa477232fc7893b50880161b0331d5718d3933 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 3 Sep 2014 06:23:44 +0200 Subject: [PATCH] Move rarch_defer_core to retroarch.c --- frontend/menu/menu_common.c | 21 --------------------- frontend/menu/menu_common.h | 4 ---- general.h | 4 ++++ retroarch.c | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 1831114498..0b5b579ce0 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -55,27 +55,6 @@ void menu_update_system_info(menu_handle_t *menu, bool *load_no_content) #endif } -/* When selection is presented back, returns 0. - * If it can make a decision right now, returns -1. */ -int rarch_defer_core(const core_info_t *info, - core_info_list_t *core_info, const char *dir, - const char *path, char *deferred_path, size_t sizeof_deferred_path) -{ - size_t supported = 0; - - fill_pathname_join(deferred_path, dir, path, sizeof_deferred_path); - - if (core_info) - core_info_list_get_supported_cores(core_info, deferred_path, &info, - &supported); - - /* Can make a decision right now. */ - if (supported == 1) - return -1; - - return 0; -} - void menu_content_history_push_current(void) { char tmp[PATH_MAX]; diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index b465869d94..35a6b60a14 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -184,10 +184,6 @@ bool menu_replace_config(const char *path); bool menu_save_new_config(void); -int rarch_defer_core(const core_info_t *info, core_info_list_t *data, - const char *dir, const char *path, char *deferred_path, - size_t sizeof_deferred_path); - void menu_update_system_info(menu_handle_t *menu, bool *load_no_content); void menu_build_scroll_indices(file_list_t *buf); diff --git a/general.h b/general.h index 09767aa57e..933b244bc7 100644 --- a/general.h +++ b/general.h @@ -795,6 +795,10 @@ bool rarch_set_rumble_state(unsigned port, void rarch_playlist_load_content(content_playlist_t *playlist, unsigned index); +int rarch_defer_core(const core_info_t *info, core_info_list_t *data, + const char *dir, const char *path, char *deferred_path, + size_t sizeof_deferred_path); + ///////// #ifdef __cplusplus diff --git a/retroarch.c b/retroarch.c index f2b243988b..4795b82b4f 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3724,3 +3724,25 @@ void rarch_main_init_wrap(const struct rarch_main_wrap *args, RARCH_LOG("arg #%d: %s\n", i, argv[i]); #endif } + +/* When selection is presented back, returns 0. + * If it can make a decision right now, returns -1. */ + +int rarch_defer_core(const core_info_t *info, + core_info_list_t *core_info, const char *dir, + const char *path, char *deferred_path, size_t sizeof_deferred_path) +{ + size_t supported = 0; + + fill_pathname_join(deferred_path, dir, path, sizeof_deferred_path); + + if (core_info) + core_info_list_get_supported_cores(core_info, deferred_path, &info, + &supported); + + /* Can make a decision right now. */ + if (supported == 1) + return -1; + + return 0; +}