diff --git a/command.c b/command.c index 04195bfe5b..144042dcce 100644 --- a/command.c +++ b/command.c @@ -1403,9 +1403,11 @@ static bool command_event_init_core(enum rarch_core_type *data) if (!event_init_content()) return false; - if (!core_load()) + if (!core_load(settings->input.poll_type_behavior)) return false; + runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); + return true; } @@ -1895,6 +1897,9 @@ bool command_event(enum event_command cmd, void *data) cheevos_set_cheats(); #endif core_reset(); +#ifdef HAVE_CHEEVOS + cheevos_reset_game(); +#endif break; case CMD_EVENT_SAVE_STATE: { diff --git a/core.h b/core.h index f044fc7b64..48df7129cb 100644 --- a/core.h +++ b/core.h @@ -158,7 +158,7 @@ typedef struct retro_callbacks retro_input_poll_t poll_cb; } retro_callbacks_t; -bool core_load(void); +bool core_load(unsigned poll_type_behavior); bool core_unload(void); diff --git a/core_impl.c b/core_impl.c index 3dd5148d91..fd0b8d09a0 100644 --- a/core_impl.c +++ b/core_impl.c @@ -34,16 +34,12 @@ #include "network/netplay/netplay.h" #endif -#include "configuration.h" #include "dynamic.h" -#include "core.h" #include "msg_hash.h" #include "managers/state_manager.h" -#include "runloop.h" #include "verbosity.h" #include "gfx/video_driver.h" #include "audio/audio_driver.h" -#include "cheevos.h" static unsigned core_poll_type = POLL_TYPE_EARLY; static bool core_inited = false; @@ -376,9 +372,6 @@ bool core_get_system_av_info(struct retro_system_av_info *av_info) bool core_reset(void) { core.retro_reset(); -#ifdef HAVE_CHEEVOS - cheevos_reset_game(); -#endif return true; } @@ -442,11 +435,9 @@ bool core_run(void) return true; } -bool core_load(void) +bool core_load(unsigned poll_type_behavior) { - settings_t *settings = config_get_ptr(); - - core_poll_type = settings->input.poll_type_behavior; + core_poll_type = poll_type_behavior; if (!core_verify_api_version()) return false; @@ -454,7 +445,6 @@ bool core_load(void) return false; core_get_system_av_info(video_viewport_get_system_av_info()); - runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); return true; }