Create RARCH_CTL_INIT_SYSTEM_AV_INFO

This commit is contained in:
twinaphex 2016-01-22 15:43:40 +01:00
parent 87bdb34599
commit 11f7735965
3 changed files with 18 additions and 26 deletions

View File

@ -591,7 +591,7 @@ static bool event_init_core(void)
return false;
retro_init_libretro_cbs(&retro_ctx);
rarch_init_system_av_info();
rarch_ctl(RARCH_CTL_INIT_SYSTEM_AV_INFO, NULL);
return true;
}

View File

@ -1082,18 +1082,6 @@ static bool init_state(void)
return true;
}
/**
* rarch_init_system_av_info:
*
* Initialize system A/V information by calling the libretro core's
* get_system_av_info function.
**/
void rarch_init_system_av_info(void)
{
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
core.retro_get_system_av_info(av_info);
runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL);
}
/**
* rarch_main_init:
@ -1296,6 +1284,13 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
switch(state)
{
case RARCH_CTL_INIT_SYSTEM_AV_INFO:
{
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
core.retro_get_system_av_info(av_info);
runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL);
}
break;
case RARCH_CTL_IS_PLAIN_CORE:
return (current_core_type == CORE_TYPE_PLAIN);
case RARCH_CTL_IS_DUMMY_CORE:

View File

@ -104,13 +104,18 @@ enum rarch_ctl_state
*/
RARCH_CTL_VERIFY_API_VERSION,
/* Validates CPU features for given processor architecture.
*
* Make sure we haven't compiled for something we cannot run.
* Ideally, code would get swapped out depending on CPU support,
* but this will do for now. */
/* Validates CPU features for given processor architecture.
* Make sure we haven't compiled for something we cannot run.
* Ideally, code would get swapped out depending on CPU support,
* but this will do for now. */
RARCH_CTL_VALIDATE_CPU_FEATURES,
/**
* Initialize system A/V information by calling the libretro core's
* get_system_av_info function.
**/
RARCH_CTL_INIT_SYSTEM_AV_INFO,
RARCH_CTL_FILL_PATHNAMES,
RARCH_CTL_SET_PATHS_REDIRECT,
@ -224,14 +229,6 @@ int rarch_defer_core(void *data,
const char *menu_label,
char *s, size_t len);
/**
* rarch_init_system_av_info:
*
* Initialize system A/V information by calling the libretro core's
* get_system_av_info function.
**/
void rarch_init_system_av_info(void);
void rarch_set_paths(const char *path);
int rarch_info_get_capabilities(enum rarch_capabilities type, char *s, size_t len);