diff --git a/core_info.c b/core_info.c index 01a160460a..b965759164 100644 --- a/core_info.c +++ b/core_info.c @@ -45,26 +45,6 @@ enum compare_op COMPARE_OP_GREATER_EQUAL }; -struct core_info_state -{ -#ifdef HAVE_COMPRESSION - const struct string_list *tmp_list; -#endif - const char *tmp_path; - core_info_t *current; - core_info_list_t *curr_list; -}; - -typedef struct core_info_state core_info_state_t; - -/* TODO/FIXME - global state - perhaps move outside this file */ -static core_info_state_t core_info_st; - -static core_info_state_t *coreinfo_get_ptr(void) -{ - return &core_info_st; -} - static void core_info_list_resolve_all_extensions( core_info_list_t *core_info_list) { diff --git a/core_info.h b/core_info.h index cb352483a4..757912d0a8 100644 --- a/core_info.h +++ b/core_info.h @@ -128,6 +128,18 @@ enum core_info_list_qsort_type CORE_INFO_LIST_SORT_SYSTEM_NAME }; +struct core_info_state +{ +#ifdef HAVE_COMPRESSION + const struct string_list *tmp_list; +#endif + const char *tmp_path; + core_info_t *current; + core_info_list_t *curr_list; +}; + +typedef struct core_info_state core_info_state_t; + size_t core_info_list_num_info_files(core_info_list_t *list); /* Non-reentrant, does not allocate. Returns pointer to internal state. */ @@ -187,6 +199,8 @@ bool core_info_list_get_info(core_info_list_t *core_info_list, bool core_info_hw_api_supported(core_info_t *info); +core_info_state_t *coreinfo_get_ptr(void); + RETRO_END_DECLS #endif /* CORE_INFO_H_ */ diff --git a/retroarch.c b/retroarch.c index 39844de0e2..9a7a6e11b6 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2168,6 +2168,8 @@ struct rarch_state const struct retro_keybind *libretro_input_binds[MAX_USERS]; + /* TODO/FIXME - global state - perhaps move outside this file */ + core_info_state_t core_info_st; #ifdef HAVE_GFX_WIDGETS dispgfx_widget_t dispwidget_st; #endif @@ -2725,6 +2727,12 @@ char **input_event_get_osk_grid(void) return p_rarch->osk_grid; } +core_info_state_t *coreinfo_get_ptr(void) +{ + struct rarch_state *p_rarch = &rarch_st; + return &p_rarch->core_info_st; +} + #ifdef HAVE_MENU menu_dialog_t *dialog_get_ptr(void) {