mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Create 'action_select' binding for core settings
This commit is contained in:
parent
7dac8d1981
commit
b9d7b4e52f
@ -31,6 +31,12 @@ extern size_t hack_shader_pass;
|
||||
extern char core_updater_path[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
|
||||
/* Function callbacks */
|
||||
|
||||
int core_setting_right(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
/* End of function callbacks */
|
||||
|
||||
void menu_entries_common_load_content(bool persist);
|
||||
|
||||
int menu_entries_common_is_settings_entry(const char *label);
|
||||
|
@ -324,7 +324,7 @@ static int action_right_video_resolution(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int core_setting_right(unsigned type, const char *label,
|
||||
int core_setting_right(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
|
@ -57,6 +57,12 @@ static int action_select_directory(const char *path, const char *label, unsigned
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_select_core_setting(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
return core_setting_right(type, label, true);
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1,
|
||||
@ -67,12 +73,17 @@ void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
|
||||
cbs->action_select = action_select_default;
|
||||
|
||||
switch (type)
|
||||
if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
cbs->action_select = action_select_core_setting;
|
||||
else
|
||||
{
|
||||
case MENU_FILE_PATH:
|
||||
case MENU_FILE_DIRECTORY:
|
||||
case MENU_FILE_USE_DIRECTORY:
|
||||
cbs->action_select = action_select_directory;
|
||||
break;
|
||||
switch (type)
|
||||
{
|
||||
case MENU_FILE_PATH:
|
||||
case MENU_FILE_DIRECTORY:
|
||||
case MENU_FILE_USE_DIRECTORY:
|
||||
cbs->action_select = action_select_directory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user