mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
command_event_runtime_log_deinit - put verbosity_is_enabled check around
this
This commit is contained in:
parent
b91a1f4788
commit
67c06d17bb
37
retroarch.c
37
retroarch.c
@ -12495,23 +12495,28 @@ static void command_event_runtime_log_deinit(
|
||||
const char *dir_runtime_log,
|
||||
const char *dir_playlist)
|
||||
{
|
||||
char log[PATH_MAX_LENGTH] = {0};
|
||||
unsigned hours = 0;
|
||||
unsigned minutes = 0;
|
||||
unsigned seconds = 0;
|
||||
int n = 0;
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
int n;
|
||||
char log[PATH_MAX_LENGTH] = {0};
|
||||
unsigned hours = 0;
|
||||
unsigned minutes = 0;
|
||||
unsigned seconds = 0;
|
||||
|
||||
/* TODO/FIXME - should we hide this logging behind verbosity being enabled? */
|
||||
runtime_log_convert_usec2hms(
|
||||
p_rarch->libretro_core_runtime_usec,
|
||||
&hours, &minutes, &seconds);
|
||||
n = snprintf(log, sizeof(log),
|
||||
"[Core]: Content ran for a total of: %02u hours, %02u minutes, %02u seconds.",
|
||||
hours, minutes, seconds);
|
||||
if ((n < 0) || (n >= PATH_MAX_LENGTH))
|
||||
n = 0; /* Just silence any potential gcc warnings... */
|
||||
(void)n;
|
||||
RARCH_LOG("%s\n",log);
|
||||
runtime_log_convert_usec2hms(
|
||||
p_rarch->libretro_core_runtime_usec,
|
||||
&hours, &minutes, &seconds);
|
||||
|
||||
n =
|
||||
snprintf(log, sizeof(log),
|
||||
"[Core]: Content ran for a total of:"
|
||||
" %02u hours, %02u minutes, %02u seconds.",
|
||||
hours, minutes, seconds);
|
||||
if ((n < 0) || (n >= PATH_MAX_LENGTH))
|
||||
n = 0; /* Just silence any potential gcc warnings... */
|
||||
(void)n;
|
||||
RARCH_LOG("%s\n",log);
|
||||
}
|
||||
|
||||
/* Only write to file if content has run for a non-zero length of time */
|
||||
if (p_rarch->libretro_core_runtime_usec > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user