mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
core_impl.c - some cleanups
This commit is contained in:
parent
ab8680c339
commit
8e53dffdef
@ -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:
|
||||
{
|
||||
|
2
core.h
2
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);
|
||||
|
||||
|
14
core_impl.c
14
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user