Fix perf counter offset.

This commit is contained in:
Themaister 2014-06-01 20:08:10 +02:00
parent cb6db240de
commit 88a0fa81c2
2 changed files with 6 additions and 3 deletions

View File

@ -4671,9 +4671,10 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
if (counters[type])
{
unsigned offset = type - RGUI_SETTINGS_PERF_COUNTERS_BEGIN;
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[type]->call_cnt);
((unsigned long long)counters[offset]->total / (unsigned long long)counters[offset]->call_cnt),
(unsigned long long)counters[offset]->call_cnt);
}
else
#endif

View File

@ -448,7 +448,9 @@ static void rgui_render(void)
char type_str[256];
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;
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
w = 24;