Move rarch_defer_core to retroarch.c

This commit is contained in:
twinaphex 2014-09-03 06:23:44 +02:00
parent 8fdf7299f6
commit 55aa477232
4 changed files with 26 additions and 25 deletions

View File

@ -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];

View File

@ -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);

View File

@ -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

View File

@ -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;
}