mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu) Don't pass rgui pointer to menu_build_scroll_indices
This commit is contained in:
parent
f49ea47040
commit
d7aa48aa33
@ -1176,7 +1176,7 @@ static void menu_parse_and_resolve(unsigned menu_type)
|
||||
|
||||
rgui->scroll_indices_size = 0;
|
||||
if (menu_type != RGUI_SETTINGS_OPEN_HISTORY)
|
||||
menu_build_scroll_indices(rgui, rgui->selection_buf);
|
||||
menu_build_scroll_indices(rgui->selection_buf);
|
||||
|
||||
// Before a refresh, we could have deleted a file on disk, causing
|
||||
// selection_ptr to suddendly be out of range. Ensure it doesn't overflow.
|
||||
|
@ -918,12 +918,15 @@ static inline bool menu_list_elem_is_dir(file_list_t *buf, unsigned offset)
|
||||
return type != RGUI_FILE_PLAIN;
|
||||
}
|
||||
|
||||
void menu_build_scroll_indices(void *data, file_list_t *buf)
|
||||
void menu_build_scroll_indices(file_list_t *buf)
|
||||
{
|
||||
size_t i;
|
||||
int current;
|
||||
bool current_is_dir;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)driver.menu;
|
||||
|
||||
if (!rgui)
|
||||
return;
|
||||
|
||||
rgui->scroll_indices_size = 0;
|
||||
if (!buf->size)
|
||||
|
@ -211,7 +211,7 @@ uint64_t menu_input(void);
|
||||
|
||||
void menu_flush_stack_type(unsigned final_type);
|
||||
void menu_update_system_info(void *data, bool *load_no_rom);
|
||||
void menu_build_scroll_indices(void *data, file_list_t *buf);
|
||||
void menu_build_scroll_indices(file_list_t *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user