diff --git a/audio/audio_driver.c b/audio/audio_driver.c index af6c6d1f81..1a8df5979d 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -511,6 +511,7 @@ void audio_driver_set_nonblocking_state(bool enable) static bool audio_driver_flush(const int16_t *data, size_t samples) { struct resampler_data src_data; + bool is_perfcnt_enable = false; bool is_paused = false; bool is_idle = false; bool is_slowmotion = false; @@ -530,7 +531,8 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) if (recording_data) recording_push_audio(data, samples); - runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + runloop_get_status(&is_paused, &is_idle, &is_slowmotion, + &is_perfcnt_enable); if (is_paused || settings->audio.mute_enable) return true; diff --git a/command.c b/command.c index 7517eb71ee..51c1b8d32e 100644 --- a/command.c +++ b/command.c @@ -2378,8 +2378,10 @@ bool command_event(enum event_command cmd, void *data) bool is_paused = false; bool is_idle = false; bool is_slowmotion = false; + bool is_perfcnt_enable = false; - runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + runloop_get_status(&is_paused, &is_idle, &is_slowmotion, + &is_perfcnt_enable); if (is_paused) { diff --git a/gfx/video_driver.c b/gfx/video_driver.c index fc31f69022..dfd13f914a 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2250,6 +2250,7 @@ bool video_driver_texture_unload(uintptr_t *id) void video_driver_build_info(video_frame_info_t *video_info) { + bool is_perfcnt_enable = false; bool is_paused = false; bool is_idle = false; bool is_slowmotion = false; @@ -2318,8 +2319,9 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->menu_wallpaper_opacity = 0.0f; #endif - runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + runloop_get_status(&is_paused, &is_idle, &is_slowmotion, &is_perfcnt_enable); + video_info->is_perfcnt_enable = is_perfcnt_enable; video_info->runloop_is_paused = is_paused; video_info->runloop_is_idle = is_idle; video_info->runloop_is_slowmotion = is_slowmotion; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 8976558040..7c68056506 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -131,6 +131,7 @@ typedef struct video_frame_info bool runloop_is_slowmotion; bool runloop_is_idle; bool runloop_is_paused; + bool is_perfcnt_enable; bool menu_is_alive; } video_frame_info_t; diff --git a/runloop.c b/runloop.c index b05c863c81..cfa6ba3283 100644 --- a/runloop.c +++ b/runloop.c @@ -205,11 +205,12 @@ static bool rarch_game_specific_options(char **output) } void runloop_get_status(bool *is_paused, bool *is_idle, - bool *is_slowmotion) + bool *is_slowmotion, bool *is_perfcnt_enable) { - *is_paused = runloop_paused; - *is_idle = runloop_idle; - *is_slowmotion = runloop_slowmotion; + *is_paused = runloop_paused; + *is_idle = runloop_idle; + *is_slowmotion = runloop_slowmotion; + *is_perfcnt_enable = runloop_perfcnt_enable; } bool runloop_msg_queue_pull(const char **ret) diff --git a/runloop.h b/runloop.h index 107ad14a1c..a81ac54ecf 100644 --- a/runloop.h +++ b/runloop.h @@ -204,7 +204,8 @@ void runloop_msg_queue_push(const char *msg, unsigned prio, bool runloop_msg_queue_pull(const char **ret); -void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion); +void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion, + bool *is_perfcnt_enable); bool runloop_ctl(enum runloop_ctl_state state, void *data); diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index 571215dcf5..6a3e465933 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -389,12 +389,13 @@ static bool take_screenshot_choice(const char *name_base, bool savestate, bool take_screenshot(const char *name_base, bool silence) { - bool is_paused = false; - bool is_idle = false; - bool is_slowmotion = false; - bool ret = false; + bool is_paused = false; + bool is_idle = false; + bool is_slowmotion = false; + bool is_perfcnt_enable = false; + bool ret = false; - runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + runloop_get_status(&is_paused, &is_idle, &is_slowmotion, &is_perfcnt_enable); ret = take_screenshot_choice(name_base, silence, is_paused, is_idle);