mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Runtime logging fixes: ensure log is generated when runahead is enabled, and when closing cores 'internally' (RETRO_ENVIRONMENT_SHUTDOWN)
This commit is contained in:
parent
84d6f6231d
commit
8e74ff6122
@ -1279,6 +1279,14 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
case RETRO_ENVIRONMENT_SHUTDOWN:
|
||||
RARCH_LOG("Environ SHUTDOWN.\n");
|
||||
|
||||
/* This case occurs when a core (internally) requests
|
||||
* a shutdown event. Must save runtime log file here,
|
||||
* since normal command.c CMD_EVENT_CORE_DEINIT event
|
||||
* will not occur until after the current content has
|
||||
* been cleared (causing log to be skipped) */
|
||||
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL);
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
rarch_ctl(RARCH_CTL_SET_CORE_SHUTDOWN, NULL);
|
||||
break;
|
||||
|
11
retroarch.c
11
retroarch.c
@ -2426,6 +2426,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset runtime
|
||||
* (Not required, but ensures that time can never
|
||||
* be logged more than once...) */
|
||||
libretro_core_runtime_usec = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
case RARCH_CTL_GET_PERFCNT:
|
||||
@ -4326,16 +4331,18 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
else
|
||||
{
|
||||
core_run();
|
||||
rarch_core_runtime_tick();
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
core_run();
|
||||
rarch_core_runtime_tick();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Increment runtime tick counter after each call to
|
||||
* core_run() or run_ahead() */
|
||||
rarch_core_runtime_tick();
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (runloop_check_cheevos())
|
||||
cheevos_test();
|
||||
|
Loading…
x
Reference in New Issue
Block a user