Fix perf counter offset.
This commit is contained in:
parent
cb6db240de
commit
88a0fa81c2
|
@ -4671,9 +4671,10 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
|
||||||
|
|
||||||
if (counters[type])
|
if (counters[type])
|
||||||
{
|
{
|
||||||
|
unsigned offset = type - RGUI_SETTINGS_PERF_COUNTERS_BEGIN;
|
||||||
snprintf(type_str, type_str_size, PERF_LOG_FMT,
|
snprintf(type_str, type_str_size, PERF_LOG_FMT,
|
||||||
((unsigned long long)counters[type]->total / (unsigned long long)counters[type]->call_cnt),
|
((unsigned long long)counters[offset]->total / (unsigned long long)counters[offset]->call_cnt),
|
||||||
(unsigned long long)counters[type]->call_cnt);
|
(unsigned long long)counters[offset]->call_cnt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -448,7 +448,9 @@ static void rgui_render(void)
|
||||||
char type_str[256];
|
char type_str[256];
|
||||||
|
|
||||||
unsigned w = 19;
|
unsigned w = 19;
|
||||||
if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS || menu_type == RGUI_SETTINGS_CUSTOM_BIND || menu_type == RGUI_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS)
|
||||||
|
w = 28;
|
||||||
|
else if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS || menu_type == RGUI_SETTINGS_CUSTOM_BIND || menu_type == RGUI_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
||||||
w = 21;
|
w = 21;
|
||||||
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
|
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
|
||||||
w = 24;
|
w = 24;
|
||||||
|
|
Loading…
Reference in New Issue