mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu) Cleanups
This commit is contained in:
parent
2c0c4d629f
commit
9701e28f8c
@ -46,17 +46,10 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static inline struct gfx_shader *shader_manager_get_current_shader(void *data, unsigned type)
|
||||
static inline struct gfx_shader *shader_manager_get_current_shader(menu_handle_t *menu, unsigned type)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
struct gfx_shader *shader = NULL;
|
||||
|
||||
if (!menu)
|
||||
{
|
||||
RARCH_ERR("Cannot get current shader, menu handle is not initialized.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
|
||||
shader = menu->shader;
|
||||
|
||||
@ -87,7 +80,7 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
{
|
||||
file_list_clear(menu->selection_buf);
|
||||
|
||||
struct gfx_shader *shader = shader_manager_get_current_shader(menu, menu_type);
|
||||
struct gfx_shader *shader = (struct gfx_shader*)shader_manager_get_current_shader(menu, menu_type);
|
||||
if (shader)
|
||||
for (i = 0; i < shader->num_parameters; i++)
|
||||
file_list_push(menu->selection_buf, shader->parameters[i].desc, MENU_SETTINGS_SHADER_PARAMETER_0 + i, 0);
|
||||
|
@ -48,15 +48,10 @@ void menu_update_system_info(menu_handle_t *menu, bool *load_no_rom)
|
||||
}
|
||||
|
||||
// When selection is presented back, returns 0. If it can make a decision right now, returns -1.
|
||||
int menu_defer_core(void *info_, const char *dir, const char *path, char *deferred_path, size_t sizeof_deferred_path)
|
||||
int menu_defer_core(core_info_list_t *core_info, const char *dir, const char *path, char *deferred_path, size_t sizeof_deferred_path)
|
||||
{
|
||||
core_info_list_t *core_info;
|
||||
const core_info_t *info;
|
||||
size_t supported;
|
||||
|
||||
core_info = (core_info_list_t*)info_;
|
||||
info = NULL;
|
||||
supported = 0;
|
||||
const core_info_t *info = NULL;
|
||||
size_t supported = 0;
|
||||
|
||||
fill_pathname_join(deferred_path, dir, path, sizeof_deferred_path);
|
||||
|
||||
@ -674,12 +669,11 @@ static inline bool menu_list_elem_is_dir(file_list_t *buf, unsigned offset)
|
||||
return type != MENU_FILE_PLAIN;
|
||||
}
|
||||
|
||||
void menu_build_scroll_indices(void *data)
|
||||
void menu_build_scroll_indices(file_list_t *buf)
|
||||
{
|
||||
size_t i;
|
||||
int current;
|
||||
bool current_is_dir;
|
||||
file_list_t *buf = (file_list_t*)data;
|
||||
|
||||
if (!driver.menu || !buf)
|
||||
return;
|
||||
|
@ -113,13 +113,13 @@ bool menu_replace_config(const char *path);
|
||||
|
||||
bool menu_save_new_config(void);
|
||||
|
||||
int menu_defer_core(void *data, const char *dir, const char *path, char *deferred_path, size_t sizeof_deferred_path);
|
||||
int menu_defer_core(core_info_list_t *data, const char *dir, const char *path, char *deferred_path, size_t sizeof_deferred_path);
|
||||
|
||||
uint64_t menu_input(void);
|
||||
|
||||
void menu_flush_stack_type(unsigned final_type);
|
||||
void menu_update_system_info(menu_handle_t *menu, bool *load_no_rom);
|
||||
void menu_build_scroll_indices(void *data);
|
||||
void menu_build_scroll_indices(file_list_t *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user