mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Cleanups
This commit is contained in:
parent
71d9a89de9
commit
7274e6bc3e
@ -3890,6 +3890,7 @@ static bool setting_append_list_logging_options(
|
||||
rarch_setting_info_t *list_info,
|
||||
const char *parent_group)
|
||||
{
|
||||
bool *tmp_b = NULL;
|
||||
rarch_setting_group_info_t group_info = {0};
|
||||
rarch_setting_group_info_t subgroup_info = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -3953,9 +3954,11 @@ static bool setting_append_list_logging_options(
|
||||
START_SUB_GROUP(list, list_info, "Performance Counters", &group_info, &subgroup_info,
|
||||
parent_group);
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_GET_PERFCNT, &tmp_b);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
runloop_perfcnt_enabled(),
|
||||
tmp_b,
|
||||
menu_hash_to_str(MENU_LABEL_PERFCNT_ENABLE),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_PERFCNT_ENABLE),
|
||||
false,
|
||||
|
29
runloop.c
29
runloop.c
@ -469,12 +469,6 @@ static void runloop_data_clear_state(void)
|
||||
rarch_task_init();
|
||||
}
|
||||
|
||||
bool *runloop_perfcnt_enabled(void)
|
||||
{
|
||||
static bool runloop_perfcnt_enable;
|
||||
return &runloop_perfcnt_enable;
|
||||
}
|
||||
|
||||
bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
{
|
||||
static char runloop_fullpath[PATH_MAX_LENGTH];
|
||||
@ -487,6 +481,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
static bool runloop_slowmotion = false;
|
||||
static bool runloop_shutdown_initiated = false;
|
||||
static bool runloop_core_shutdown_initiated = false;
|
||||
static bool runloop_perfcnt_enable = false;
|
||||
#ifdef HAVE_THREADS
|
||||
static slock_t *runloop_msg_queue_lock = NULL;
|
||||
#endif
|
||||
@ -572,23 +567,22 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
break;
|
||||
case RUNLOOP_CTL_SHOULD_SET_FRAME_LIMIT:
|
||||
return runloop_set_frame_limit;
|
||||
case RUNLOOP_CTL_SET_PERFCNT_ENABLE:
|
||||
case RUNLOOP_CTL_GET_PERFCNT:
|
||||
{
|
||||
bool *perfcnt_enable = runloop_perfcnt_enabled();
|
||||
*perfcnt_enable = true;
|
||||
bool **perfcnt = (bool**)data;
|
||||
if (!perfcnt)
|
||||
return false;
|
||||
*perfcnt = &runloop_perfcnt_enable;
|
||||
}
|
||||
return true;
|
||||
case RUNLOOP_CTL_SET_PERFCNT_ENABLE:
|
||||
runloop_perfcnt_enable = true;
|
||||
break;
|
||||
case RUNLOOP_CTL_UNSET_PERFCNT_ENABLE:
|
||||
{
|
||||
bool *perfcnt_enable = runloop_perfcnt_enabled();
|
||||
*perfcnt_enable = false;
|
||||
}
|
||||
runloop_perfcnt_enable = false;
|
||||
break;
|
||||
case RUNLOOP_CTL_IS_PERFCNT_ENABLE:
|
||||
{
|
||||
bool *perfcnt_enable = runloop_perfcnt_enabled();
|
||||
return *perfcnt_enable;
|
||||
}
|
||||
return runloop_perfcnt_enable;
|
||||
case RUNLOOP_CTL_GET_WINDOWED_SCALE:
|
||||
{
|
||||
unsigned **scale = (unsigned**)data;
|
||||
@ -844,6 +838,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_PLAYBACK, NULL);
|
||||
break;
|
||||
case RUNLOOP_CTL_STATE_FREE:
|
||||
runloop_perfcnt_enable = false;
|
||||
runloop_idle = false;
|
||||
runloop_paused = false;
|
||||
runloop_slowmotion = false;
|
||||
|
@ -63,6 +63,7 @@ enum runloop_ctl_state
|
||||
RUNLOOP_CTL_SET_EXEC,
|
||||
RUNLOOP_CTL_UNSET_EXEC,
|
||||
RUNLOOP_CTL_IS_EXEC,
|
||||
RUNLOOP_CTL_GET_PERFCNT,
|
||||
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
||||
RUNLOOP_CTL_IS_PERFCNT_ENABLE,
|
||||
@ -309,8 +310,6 @@ void runloop_msg_queue_push_new(uint32_t hash, unsigned prio,
|
||||
|
||||
const char *runloop_msg_queue_pull(void);
|
||||
|
||||
bool *runloop_perfcnt_enabled(void);
|
||||
|
||||
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
||||
|
||||
typedef int (*transfer_cb_t)(void *data, size_t len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user