(Menu drivers) Start setting up setting pointers

This commit is contained in:
twinaphex 2015-01-31 17:19:12 +01:00
parent 7c6736ae4d
commit 04d54be8df
5 changed files with 40 additions and 19 deletions

View File

@ -385,12 +385,14 @@ static void glui_frame(void)
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
bool selected = false;
rarch_setting_t *setting = NULL;
menu_list_get_at_offset(driver.menu->menu_list->selection_buf, i, &path,
&entry_label, &type);
rarch_setting_t *setting = (rarch_setting_t*)setting_data_find_setting(
setting = (rarch_setting_t*)setting_data_find_setting(
driver.menu->list_settings,
driver.menu->menu_list->selection_buf->list[i].label);
(void)setting;
disp_set_label(driver.menu->menu_list->selection_buf, &w, type, i, label,

View File

@ -439,10 +439,11 @@ static void rgui_render(void)
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
bool selected = false;
rarch_setting_t *setting = NULL;
menu_list_get_at_offset(driver.menu->menu_list->selection_buf, i, &path,
&entry_label, &type);
rarch_setting_t *setting = (rarch_setting_t*)setting_data_find_setting(
setting = (rarch_setting_t*)setting_data_find_setting(
driver.menu->list_settings,
driver.menu->menu_list->selection_buf->list[i].label);
(void)setting;

View File

@ -230,15 +230,21 @@ static void rmenu_render(void)
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
bool selected = false;
rarch_setting_t *setting = NULL;
menu_list_get_at_offset(menu->menu_list->selection_buf, i,
&path, &entry_label, &type);
setting = (rarch_setting_t*)setting_data_find_setting(
driver.menu->list_settings,
driver.menu->menu_list->selection_buf->list[i].label);
(void)setting;
disp_set_label(menu->menu_list->selection_buf, &w, type, i, label,
type_str, sizeof(type_str),
entry_label, path,
path_buf, sizeof(path_buf));
selected = (i == driver.menu->selection_ptr);
menu_ticker_line(entry_title_buf, RMENU_TERM_WIDTH - (w + 1 + 2),

View File

@ -577,25 +577,31 @@ static void rmenu_xui_render(void)
end = menu_list_get_size(driver.menu->menu_list);
for (i = 0; i < end; i++)
{
wchar_t msg_left[PATH_MAX_LENGTH], msg_right[PATH_MAX_LENGTH];
char type_str[PATH_MAX_LENGTH], path_buf[PATH_MAX_LENGTH];
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
{
wchar_t msg_left[PATH_MAX_LENGTH], msg_right[PATH_MAX_LENGTH];
char type_str[PATH_MAX_LENGTH], path_buf[PATH_MAX_LENGTH];
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
rarch_setting_t *setting = NULL;
menu_list_get_at_offset(driver.menu->menu_list->selection_buf, i, &path,
&entry_label, &type);
menu_list_get_at_offset(driver.menu->menu_list->selection_buf, i, &path,
&entry_label, &type);
disp_set_label(driver.menu->menu_list->selection_buf,
&w, type, i, label,
type_str, sizeof(type_str),
entry_label, path,
path_buf, sizeof(path_buf));
setting = (rarch_setting_t*)setting_data_find_setting(
driver.menu->list_settings,
driver.menu->menu_list->selection_buf->list[i].label);
(void)setting;
mbstowcs(msg_left, path_buf, sizeof(msg_left) / sizeof(wchar_t));
mbstowcs(msg_right, type_str, sizeof(msg_right) / sizeof(wchar_t));
rmenu_xui_set_list_text(i, msg_left, msg_right);
}
disp_set_label(driver.menu->menu_list->selection_buf,
&w, type, i, label,
type_str, sizeof(type_str),
entry_label, path,
path_buf, sizeof(path_buf));
mbstowcs(msg_left, path_buf, sizeof(msg_left) / sizeof(wchar_t));
mbstowcs(msg_right, type_str, sizeof(msg_right) / sizeof(wchar_t));
rmenu_xui_set_list_text(i, msg_left, msg_right);
}
XuiListSetCurSelVisible(m_menulist, driver.menu->selection_ptr);
if (driver.menu->keyboard.display)

View File

@ -877,10 +877,16 @@ static void xmb_draw_items(file_list_t *list, file_list_t *stack,
const char *path = NULL, *entry_label = NULL;
unsigned type = 0, w = 0;
xmb_node_t *node = NULL;
rarch_setting_t *setting = NULL;
menu_list_get_at_offset(list, i, &path, &entry_label, &type);
node = (xmb_node_t*)file_list_get_userdata_at_offset(list, i);
setting = (rarch_setting_t*)setting_data_find_setting(
driver.menu->list_settings,
driver.menu->menu_list->selection_buf->list[i].label);
(void)setting;
disp_set_label(list, &w, type, i, label,
val_buf, sizeof(val_buf),
entry_label, path,