Add extra param to runloop_get_status

This commit is contained in:
twinaphex 2017-01-25 16:57:22 +01:00
parent 6661c0fb94
commit 41349621cf
7 changed files with 23 additions and 13 deletions

View file

@ -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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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;

View file

@ -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)

View file

@ -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);

View file

@ -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);