mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
Move core info global state to retroarch.c
This commit is contained in:
parent
6e979931a1
commit
34af28461f
20
core_info.c
20
core_info.c
@ -45,26 +45,6 @@ enum compare_op
|
|||||||
COMPARE_OP_GREATER_EQUAL
|
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(
|
static void core_info_list_resolve_all_extensions(
|
||||||
core_info_list_t *core_info_list)
|
core_info_list_t *core_info_list)
|
||||||
{
|
{
|
||||||
|
14
core_info.h
14
core_info.h
@ -128,6 +128,18 @@ enum core_info_list_qsort_type
|
|||||||
CORE_INFO_LIST_SORT_SYSTEM_NAME
|
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);
|
size_t core_info_list_num_info_files(core_info_list_t *list);
|
||||||
|
|
||||||
/* Non-reentrant, does not allocate. Returns pointer to internal state. */
|
/* 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);
|
bool core_info_hw_api_supported(core_info_t *info);
|
||||||
|
|
||||||
|
core_info_state_t *coreinfo_get_ptr(void);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif /* CORE_INFO_H_ */
|
#endif /* CORE_INFO_H_ */
|
||||||
|
@ -2168,6 +2168,8 @@ struct rarch_state
|
|||||||
|
|
||||||
const struct retro_keybind *libretro_input_binds[MAX_USERS];
|
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
|
#ifdef HAVE_GFX_WIDGETS
|
||||||
dispgfx_widget_t dispwidget_st;
|
dispgfx_widget_t dispwidget_st;
|
||||||
#endif
|
#endif
|
||||||
@ -2725,6 +2727,12 @@ char **input_event_get_osk_grid(void)
|
|||||||
return p_rarch->osk_grid;
|
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
|
#ifdef HAVE_MENU
|
||||||
menu_dialog_t *dialog_get_ptr(void)
|
menu_dialog_t *dialog_get_ptr(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user