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,
|
rarch_setting_info_t *list_info,
|
||||||
const char *parent_group)
|
const char *parent_group)
|
||||||
{
|
{
|
||||||
|
bool *tmp_b = NULL;
|
||||||
rarch_setting_group_info_t group_info = {0};
|
rarch_setting_group_info_t group_info = {0};
|
||||||
rarch_setting_group_info_t subgroup_info = {0};
|
rarch_setting_group_info_t subgroup_info = {0};
|
||||||
settings_t *settings = config_get_ptr();
|
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,
|
START_SUB_GROUP(list, list_info, "Performance Counters", &group_info, &subgroup_info,
|
||||||
parent_group);
|
parent_group);
|
||||||
|
|
||||||
|
runloop_ctl(RUNLOOP_CTL_GET_PERFCNT, &tmp_b);
|
||||||
|
|
||||||
CONFIG_BOOL(
|
CONFIG_BOOL(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
runloop_perfcnt_enabled(),
|
tmp_b,
|
||||||
menu_hash_to_str(MENU_LABEL_PERFCNT_ENABLE),
|
menu_hash_to_str(MENU_LABEL_PERFCNT_ENABLE),
|
||||||
menu_hash_to_str(MENU_LABEL_VALUE_PERFCNT_ENABLE),
|
menu_hash_to_str(MENU_LABEL_VALUE_PERFCNT_ENABLE),
|
||||||
false,
|
false,
|
||||||
|
29
runloop.c
29
runloop.c
@ -469,12 +469,6 @@ static void runloop_data_clear_state(void)
|
|||||||
rarch_task_init();
|
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)
|
bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||||
{
|
{
|
||||||
static char runloop_fullpath[PATH_MAX_LENGTH];
|
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_slowmotion = false;
|
||||||
static bool runloop_shutdown_initiated = false;
|
static bool runloop_shutdown_initiated = false;
|
||||||
static bool runloop_core_shutdown_initiated = false;
|
static bool runloop_core_shutdown_initiated = false;
|
||||||
|
static bool runloop_perfcnt_enable = false;
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
static slock_t *runloop_msg_queue_lock = NULL;
|
static slock_t *runloop_msg_queue_lock = NULL;
|
||||||
#endif
|
#endif
|
||||||
@ -572,23 +567,22 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case RUNLOOP_CTL_SHOULD_SET_FRAME_LIMIT:
|
case RUNLOOP_CTL_SHOULD_SET_FRAME_LIMIT:
|
||||||
return runloop_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();
|
bool **perfcnt = (bool**)data;
|
||||||
*perfcnt_enable = true;
|
if (!perfcnt)
|
||||||
|
return false;
|
||||||
|
*perfcnt = &runloop_perfcnt_enable;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
case RUNLOOP_CTL_SET_PERFCNT_ENABLE:
|
||||||
|
runloop_perfcnt_enable = true;
|
||||||
break;
|
break;
|
||||||
case RUNLOOP_CTL_UNSET_PERFCNT_ENABLE:
|
case RUNLOOP_CTL_UNSET_PERFCNT_ENABLE:
|
||||||
{
|
runloop_perfcnt_enable = false;
|
||||||
bool *perfcnt_enable = runloop_perfcnt_enabled();
|
|
||||||
*perfcnt_enable = false;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case RUNLOOP_CTL_IS_PERFCNT_ENABLE:
|
case RUNLOOP_CTL_IS_PERFCNT_ENABLE:
|
||||||
{
|
return runloop_perfcnt_enable;
|
||||||
bool *perfcnt_enable = runloop_perfcnt_enabled();
|
|
||||||
return *perfcnt_enable;
|
|
||||||
}
|
|
||||||
case RUNLOOP_CTL_GET_WINDOWED_SCALE:
|
case RUNLOOP_CTL_GET_WINDOWED_SCALE:
|
||||||
{
|
{
|
||||||
unsigned **scale = (unsigned**)data;
|
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);
|
bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_PLAYBACK, NULL);
|
||||||
break;
|
break;
|
||||||
case RUNLOOP_CTL_STATE_FREE:
|
case RUNLOOP_CTL_STATE_FREE:
|
||||||
|
runloop_perfcnt_enable = false;
|
||||||
runloop_idle = false;
|
runloop_idle = false;
|
||||||
runloop_paused = false;
|
runloop_paused = false;
|
||||||
runloop_slowmotion = false;
|
runloop_slowmotion = false;
|
||||||
|
@ -63,6 +63,7 @@ enum runloop_ctl_state
|
|||||||
RUNLOOP_CTL_SET_EXEC,
|
RUNLOOP_CTL_SET_EXEC,
|
||||||
RUNLOOP_CTL_UNSET_EXEC,
|
RUNLOOP_CTL_UNSET_EXEC,
|
||||||
RUNLOOP_CTL_IS_EXEC,
|
RUNLOOP_CTL_IS_EXEC,
|
||||||
|
RUNLOOP_CTL_GET_PERFCNT,
|
||||||
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
RUNLOOP_CTL_SET_PERFCNT_ENABLE,
|
||||||
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
RUNLOOP_CTL_UNSET_PERFCNT_ENABLE,
|
||||||
RUNLOOP_CTL_IS_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);
|
const char *runloop_msg_queue_pull(void);
|
||||||
|
|
||||||
bool *runloop_perfcnt_enabled(void);
|
|
||||||
|
|
||||||
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
||||||
|
|
||||||
typedef int (*transfer_cb_t)(void *data, size_t len);
|
typedef int (*transfer_cb_t)(void *data, size_t len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user