mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Add 'Cycle Tray Status' option
This commit is contained in:
parent
b490e22080
commit
750ac33b8d
@ -120,6 +120,7 @@ typedef enum
|
||||
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX,
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND,
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS,
|
||||
|
||||
// Match up with libretro order for simplicity.
|
||||
MENU_SETTINGS_BIND_BEGIN,
|
||||
|
@ -507,6 +507,8 @@ static int push_list(menu_handle_t *menu,
|
||||
file_list_clear(list);
|
||||
file_list_push(list, "Disk Index", "disk_index",
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0);
|
||||
file_list_push(list, "Disk Cycle Tray Status", "disk_cycle_tray_status",
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0);
|
||||
file_list_push(list, "Disk Image Append", "disk_image_append",
|
||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0);
|
||||
}
|
||||
|
@ -575,6 +575,16 @@ static int action_ok_push_default(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_disk_cycle_tray_status(const char *path,
|
||||
const char *label, unsigned type, size_t index)
|
||||
{
|
||||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
rarch_main_command(RARCH_CMD_DISK_EJECT_TOGGLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_help(const char *path,
|
||||
const char *label, unsigned type, size_t index)
|
||||
{
|
||||
@ -677,9 +687,7 @@ static int disk_options_disk_index_toggle(unsigned type, const char *label,
|
||||
unsigned current = control->get_image_index();
|
||||
unsigned next_index = (current + num_disks + 1 + step)
|
||||
% (num_disks + 1);
|
||||
rarch_disk_control_set_eject(true, false);
|
||||
rarch_disk_control_set_index(next_index);
|
||||
rarch_disk_control_set_eject(false, false);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -814,6 +822,8 @@ static int menu_entries_cbs_init_bind_ok_first(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CATEGORY:
|
||||
cbs->action_ok = action_ok_push_default;
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS:
|
||||
cbs->action_ok = action_ok_disk_cycle_tray_status;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user