mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
Add 'core_is_inited' and 'core_is_symbols_inited'
This commit is contained in:
parent
3e9df72123
commit
6ccf67057b
4
core.h
4
core.h
@ -191,6 +191,10 @@ void core_uninit_symbols(void);
|
||||
|
||||
void core_set_input_state(retro_ctx_input_state_info_t *info);
|
||||
|
||||
bool core_is_symbols_inited(void);
|
||||
|
||||
bool core_is_inited(void);
|
||||
|
||||
bool core_is_game_loaded(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
17
core_impl.c
17
core_impl.c
@ -42,6 +42,8 @@
|
||||
#endif
|
||||
|
||||
static struct retro_core_t core;
|
||||
static bool core_inited;
|
||||
static bool core_symbols_inited;
|
||||
static bool core_game_loaded;
|
||||
static unsigned core_poll_type;
|
||||
static bool core_input_polled;
|
||||
@ -159,6 +161,8 @@ bool core_deinit(void *data)
|
||||
cbs->state_cb = NULL;
|
||||
cbs->poll_cb = NULL;
|
||||
|
||||
core_inited = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -217,6 +221,7 @@ bool core_set_poll_type(unsigned *type)
|
||||
void core_uninit_symbols(void)
|
||||
{
|
||||
uninit_libretro_sym(&core);
|
||||
core_symbols_inited = false;
|
||||
}
|
||||
|
||||
bool core_init_symbols(enum rarch_core_type *type)
|
||||
@ -224,6 +229,7 @@ bool core_init_symbols(enum rarch_core_type *type)
|
||||
if (!type)
|
||||
return false;
|
||||
init_libretro_sym(*type, &core);
|
||||
core_symbols_inited = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -334,6 +340,7 @@ bool core_reset(void)
|
||||
bool core_init(void)
|
||||
{
|
||||
core.retro_init();
|
||||
core_inited = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -428,6 +435,16 @@ void core_unset_input_descriptors(void)
|
||||
core_has_set_input_descriptors = false;
|
||||
}
|
||||
|
||||
bool core_is_inited(void)
|
||||
{
|
||||
return core_inited;
|
||||
}
|
||||
|
||||
bool core_is_symbols_inited(void)
|
||||
{
|
||||
return core_symbols_inited;
|
||||
}
|
||||
|
||||
bool core_is_game_loaded(void)
|
||||
{
|
||||
return core_game_loaded;
|
||||
|
Loading…
Reference in New Issue
Block a user