Move code to libretro_version_1.c

This commit is contained in:
twinaphex 2016-01-27 08:40:18 +01:00
parent 1e044f38ad
commit 2c3cb61ca8
2 changed files with 11 additions and 9 deletions

View File

@ -601,8 +601,6 @@ static bool event_init_core(void)
if (!event_init_content()) if (!event_init_content())
return false; return false;
core.poll_type = settings->input.poll_type_behavior;
if (!core_ctl(CORE_CTL_INIT, NULL)) if (!core_ctl(CORE_CTL_INIT, NULL))
return false; return false;

View File

@ -260,6 +260,9 @@ bool core_ctl(enum core_ctl_state state, void *data)
retro_set_rewind_callbacks(); retro_set_rewind_callbacks();
break; break;
case CORE_CTL_INIT: case CORE_CTL_INIT:
{
settings_t *settings = config_get_ptr();
core.poll_type = settings->input.poll_type_behavior;
if (!core_ctl(CORE_CTL_VERIFY_API_VERSION, NULL)) if (!core_ctl(CORE_CTL_VERIFY_API_VERSION, NULL))
return false; return false;
if (!retro_init_libretro_cbs(&retro_ctx)) if (!retro_init_libretro_cbs(&retro_ctx))
@ -267,6 +270,7 @@ bool core_ctl(enum core_ctl_state state, void *data)
core_ctl(CORE_CTL_RETRO_GET_SYSTEM_AV_INFO, core_ctl(CORE_CTL_RETRO_GET_SYSTEM_AV_INFO,
video_viewport_get_system_av_info()); video_viewport_get_system_av_info());
runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL);
}
break; break;
case CORE_CTL_DEINIT: case CORE_CTL_DEINIT:
return retro_uninit_libretro_cbs(&retro_ctx); return retro_uninit_libretro_cbs(&retro_ctx);