Cleanups
This commit is contained in:
parent
1e94070dca
commit
dd7fe2e7e0
42
retroarch.c
42
retroarch.c
|
@ -11909,7 +11909,7 @@ static bool command_event_disk_control_append_image(
|
||||||
retroarch_autosave_deinit(p_rarch);
|
retroarch_autosave_deinit(p_rarch);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* TODO: Need to figure out what to do with subsystems case. */
|
/* TODO/FIXME: Need to figure out what to do with subsystems case. */
|
||||||
if (path_is_empty(RARCH_PATH_SUBSYSTEM))
|
if (path_is_empty(RARCH_PATH_SUBSYSTEM))
|
||||||
{
|
{
|
||||||
/* Update paths for our new image.
|
/* Update paths for our new image.
|
||||||
|
@ -12085,15 +12085,15 @@ static void command_event_deinit_core(
|
||||||
|
|
||||||
#ifdef HAVE_CHEATS
|
#ifdef HAVE_CHEATS
|
||||||
static void command_event_init_cheats(
|
static void command_event_init_cheats(
|
||||||
settings_t *settings,
|
bool apply_cheats_after_load,
|
||||||
|
const char *path_cheat_db,
|
||||||
struct rarch_state *p_rarch)
|
struct rarch_state *p_rarch)
|
||||||
{
|
{
|
||||||
bool allow_cheats = true;
|
|
||||||
bool apply_cheats_after_load = settings->bools.apply_cheats_after_load;
|
|
||||||
const char *path_cheat_db = settings->paths.path_cheat_database;
|
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
allow_cheats &= !netplay_driver_ctl(
|
bool allow_cheats = !netplay_driver_ctl(
|
||||||
RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL);
|
RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL);
|
||||||
|
#else
|
||||||
|
bool allow_cheats = true;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_BSV_MOVIE
|
#ifdef HAVE_BSV_MOVIE
|
||||||
allow_cheats &= !(p_rarch->bsv_movie_state_handle != NULL);
|
allow_cheats &= !(p_rarch->bsv_movie_state_handle != NULL);
|
||||||
|
@ -12111,16 +12111,11 @@ static void command_event_init_cheats(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void command_event_load_auto_state(
|
static void command_event_load_auto_state(
|
||||||
settings_t *settings,
|
|
||||||
global_t *global,
|
global_t *global,
|
||||||
struct rarch_state *p_rarch)
|
struct rarch_state *p_rarch)
|
||||||
{
|
{
|
||||||
char savestate_name_auto[PATH_MAX_LENGTH];
|
char savestate_name_auto[PATH_MAX_LENGTH];
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool savestate_auto_load = settings->bools.savestate_auto_load;
|
|
||||||
|
|
||||||
if (!global || !savestate_auto_load)
|
|
||||||
return;
|
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
if (rcheevos_hardcore_active())
|
if (rcheevos_hardcore_active())
|
||||||
return;
|
return;
|
||||||
|
@ -12358,8 +12353,8 @@ static bool event_init_content(
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
if (!cheevos_enable || !cheevos_hardcore_mode_enable)
|
if (!cheevos_enable || !cheevos_hardcore_mode_enable)
|
||||||
#endif
|
#endif
|
||||||
command_event_load_auto_state(settings,
|
if (global && settings->bools.savestate_auto_load)
|
||||||
global, p_rarch);
|
command_event_load_auto_state(global, p_rarch);
|
||||||
|
|
||||||
#ifdef HAVE_BSV_MOVIE
|
#ifdef HAVE_BSV_MOVIE
|
||||||
bsv_movie_deinit(p_rarch);
|
bsv_movie_deinit(p_rarch);
|
||||||
|
@ -33682,7 +33677,9 @@ static bool runahead_core_run_use_last_input(struct rarch_state *p_rarch)
|
||||||
|
|
||||||
static void do_runahead(
|
static void do_runahead(
|
||||||
struct rarch_state *p_rarch,
|
struct rarch_state *p_rarch,
|
||||||
int runahead_count, bool use_secondary)
|
int runahead_count,
|
||||||
|
bool runahead_hide_warnings,
|
||||||
|
bool use_secondary)
|
||||||
{
|
{
|
||||||
int frame_number = 0;
|
int frame_number = 0;
|
||||||
bool last_frame = false;
|
bool last_frame = false;
|
||||||
|
@ -33701,9 +33698,6 @@ static void do_runahead(
|
||||||
{
|
{
|
||||||
if (!runahead_create(p_rarch))
|
if (!runahead_create(p_rarch))
|
||||||
{
|
{
|
||||||
settings_t *settings = p_rarch->configuration_settings;
|
|
||||||
bool runahead_hide_warnings = settings->bools.run_ahead_hide_warnings;
|
|
||||||
|
|
||||||
if (!runahead_hide_warnings)
|
if (!runahead_hide_warnings)
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES), 0, 2 * 60, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push(msg_hash_to_str(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES), 0, 2 * 60, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
goto force_input_dirty;
|
goto force_input_dirty;
|
||||||
|
@ -35194,7 +35188,9 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef HAVE_CHEATS
|
#ifdef HAVE_CHEATS
|
||||||
cheat_manager_state_free();
|
cheat_manager_state_free();
|
||||||
command_event_init_cheats(settings, p_rarch);
|
command_event_init_cheats(settings->bools.apply_cheats_after_load,
|
||||||
|
settings->paths.path_cheat_database,
|
||||||
|
p_rarch);
|
||||||
#endif
|
#endif
|
||||||
drivers_init(p_rarch, settings, DRIVERS_CMD_ALL, verbosity_enabled);
|
drivers_init(p_rarch, settings, DRIVERS_CMD_ALL, verbosity_enabled);
|
||||||
#ifdef HAVE_COMMAND
|
#ifdef HAVE_COMMAND
|
||||||
|
@ -36777,7 +36773,7 @@ static bool input_driver_toggle_button_combo(
|
||||||
/* Display the libretro core's framebuffer onscreen. */
|
/* Display the libretro core's framebuffer onscreen. */
|
||||||
static bool menu_display_libretro(
|
static bool menu_display_libretro(
|
||||||
struct rarch_state *p_rarch,
|
struct rarch_state *p_rarch,
|
||||||
settings_t *settings,
|
float slowmotion_ratio,
|
||||||
bool libretro_running,
|
bool libretro_running,
|
||||||
retro_time_t current_time)
|
retro_time_t current_time)
|
||||||
{
|
{
|
||||||
|
@ -36796,9 +36792,7 @@ static bool menu_display_libretro(
|
||||||
|
|
||||||
core_run();
|
core_run();
|
||||||
p_rarch->libretro_core_runtime_usec +=
|
p_rarch->libretro_core_runtime_usec +=
|
||||||
rarch_core_runtime_tick(p_rarch,
|
rarch_core_runtime_tick(p_rarch, slowmotion_ratio, current_time);
|
||||||
settings->floats.slowmotion_ratio,
|
|
||||||
current_time);
|
|
||||||
p_rarch->input_driver_block_libretro_input = false;
|
p_rarch->input_driver_block_libretro_input = false;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -37456,7 +37450,8 @@ static enum runloop_state runloop_check_state(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_rarch->menu_driver_alive && !p_rarch->runloop_idle)
|
if (p_rarch->menu_driver_alive && !p_rarch->runloop_idle)
|
||||||
if (menu_display_libretro(p_rarch, settings,
|
if (menu_display_libretro(p_rarch,
|
||||||
|
settings->floats.slowmotion_ratio,
|
||||||
libretro_running, current_time))
|
libretro_running, current_time))
|
||||||
video_driver_cached_frame();
|
video_driver_cached_frame();
|
||||||
|
|
||||||
|
@ -38198,6 +38193,7 @@ int runloop_iterate(void)
|
||||||
do_runahead(
|
do_runahead(
|
||||||
p_rarch,
|
p_rarch,
|
||||||
run_ahead_num_frames,
|
run_ahead_num_frames,
|
||||||
|
settings->bools.run_ahead_hide_warnings,
|
||||||
settings->bools.run_ahead_secondary_instance);
|
settings->bools.run_ahead_secondary_instance);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue