mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(menu_cbs_ok.c) Cut down on code duplication
This commit is contained in:
parent
6ec27a7e5d
commit
2756217d9b
@ -3231,13 +3231,37 @@ end:
|
||||
extern size_t hack_shader_pass;
|
||||
#endif
|
||||
|
||||
static int action_ok_browse_url_start(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_BROWSE_URL_START);
|
||||
#define default_action_ok_func(func_name, lbl) \
|
||||
int (func_name)(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) \
|
||||
{ \
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx, entry_idx, lbl); \
|
||||
}
|
||||
|
||||
default_action_ok_func(action_ok_browse_url_start, ACTION_OK_DL_BROWSE_URL_START)
|
||||
default_action_ok_func(action_ok_shader_parameters, ACTION_OK_DL_SHADER_PARAMETERS)
|
||||
default_action_ok_func(action_ok_parent_directory_push, ACTION_OK_DL_PARENT_DIRECTORY_PUSH)
|
||||
default_action_ok_func(action_ok_directory_push, ACTION_OK_DL_DIRECTORY_PUSH)
|
||||
default_action_ok_func(action_ok_configurations_list, ACTION_OK_DL_CONFIGURATIONS_LIST)
|
||||
default_action_ok_func(action_ok_saving_list, ACTION_OK_DL_SAVING_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_network_list, ACTION_OK_DL_NETWORK_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_database_manager_list, ACTION_OK_DL_DATABASE_MANAGER_LIST)
|
||||
default_action_ok_func(action_ok_wifi_list, ACTION_OK_DL_WIFI_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_cursor_manager_list, ACTION_OK_DL_CURSOR_MANAGER_LIST)
|
||||
default_action_ok_func(action_ok_compressed_archive_push, ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH)
|
||||
default_action_ok_func(action_ok_compressed_archive_push_detect_core, ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE)
|
||||
default_action_ok_func(action_ok_logging_list, ACTION_OK_DL_LOGGING_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_frame_throttle_list, ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_rewind_list, ACTION_OK_DL_REWIND_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_onscreen_display_list, ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_onscreen_notifications_list, ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_onscreen_overlay_list, ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_menu_list, ACTION_OK_DL_MENU_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_menu_views_list, ACTION_OK_DL_MENU_VIEWS_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_user_interface_list, ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_menu_file_browser_list, ACTION_OK_DL_MENU_FILE_BROWSER_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_retro_achievements_list, ACTION_OK_DL_RETRO_ACHIEVEMENTS_SETTINGS_LIST)
|
||||
default_action_ok_func(action_ok_updater_list, ACTION_OK_DL_UPDATER_SETTINGS_LIST)
|
||||
|
||||
static int action_ok_shader_pass(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -3246,172 +3270,6 @@ static int action_ok_shader_pass(const char *path,
|
||||
entry_idx, ACTION_OK_DL_SHADER_PASS);
|
||||
}
|
||||
|
||||
static int action_ok_shader_parameters(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_SHADER_PARAMETERS);
|
||||
}
|
||||
|
||||
int action_ok_parent_directory_push(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_PARENT_DIRECTORY_PUSH);
|
||||
}
|
||||
|
||||
int action_ok_directory_push(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL,
|
||||
label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_DIRECTORY_PUSH);
|
||||
}
|
||||
|
||||
static int action_ok_database_manager_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL,
|
||||
label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_DATABASE_MANAGER_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_cursor_manager_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL,
|
||||
label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_CURSOR_MANAGER_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_compressed_archive_push(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL,
|
||||
label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH);
|
||||
}
|
||||
|
||||
static int action_ok_compressed_archive_push_detect_core(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL,
|
||||
label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE);
|
||||
}
|
||||
|
||||
static int action_ok_configurations_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_CONFIGURATIONS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_saving_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_SAVING_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_logging_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_LOGGING_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_frame_throttle_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_rewind_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_REWIND_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_onscreen_display_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_onscreen_notifications_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_onscreen_overlay_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_menu_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_MENU_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_menu_views_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_MENU_VIEWS_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_user_interface_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_menu_file_browser_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_MENU_FILE_BROWSER_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_retro_achievements_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_RETRO_ACHIEVEMENTS_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_updater_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_UPDATER_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_wifi_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_WIFI_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_network_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_NETWORK_SETTINGS_LIST);
|
||||
}
|
||||
|
||||
static int action_ok_netplay_connect_room(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user