From b1fa971d353a651aa14fb6abe57f6310debde381 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 29 Feb 2020 08:05:49 +0100 Subject: [PATCH] Do check outside of rarch_perf_log --- performance_counters.c | 3 --- retroarch.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/performance_counters.c b/performance_counters.c index d8dd0b7ba1..976691d2a1 100644 --- a/performance_counters.c +++ b/performance_counters.c @@ -108,9 +108,6 @@ static void log_counters(struct retro_perf_counter **counters, unsigned num) void rarch_perf_log(void) { - if (!rarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL)) - return; - RARCH_LOG("[PERF]: Performance counters (RetroArch):\n"); log_counters(perf_counters_rarch, perf_ptr_rarch); } diff --git a/retroarch.c b/retroarch.c index 9d459db8c0..cd5caab58b 100644 --- a/retroarch.c +++ b/retroarch.c @@ -8121,7 +8121,8 @@ void main_exit(void *args) #endif rarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL); - rarch_perf_log(); + if (runloop_perfcnt_enable) + rarch_perf_log(); #if defined(HAVE_LOGGER) && !defined(ANDROID) logger_shutdown();