mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +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_INDEX,
|
||||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND,
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND,
|
||||||
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS,
|
||||||
|
|
||||||
// Match up with libretro order for simplicity.
|
// Match up with libretro order for simplicity.
|
||||||
MENU_SETTINGS_BIND_BEGIN,
|
MENU_SETTINGS_BIND_BEGIN,
|
||||||
|
@ -507,6 +507,8 @@ static int push_list(menu_handle_t *menu,
|
|||||||
file_list_clear(list);
|
file_list_clear(list);
|
||||||
file_list_push(list, "Disk Index", "disk_index",
|
file_list_push(list, "Disk Index", "disk_index",
|
||||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0);
|
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",
|
file_list_push(list, "Disk Image Append", "disk_image_append",
|
||||||
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0);
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0);
|
||||||
}
|
}
|
||||||
|
@ -575,6 +575,16 @@ static int action_ok_push_default(const char *path,
|
|||||||
return 0;
|
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,
|
static int action_ok_help(const char *path,
|
||||||
const char *label, unsigned type, size_t index)
|
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 current = control->get_image_index();
|
||||||
unsigned next_index = (current + num_disks + 1 + step)
|
unsigned next_index = (current + num_disks + 1 + step)
|
||||||
% (num_disks + 1);
|
% (num_disks + 1);
|
||||||
rarch_disk_control_set_eject(true, false);
|
|
||||||
rarch_disk_control_set_index(next_index);
|
rarch_disk_control_set_index(next_index);
|
||||||
rarch_disk_control_set_eject(false, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
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:
|
case MENU_FILE_CATEGORY:
|
||||||
cbs->action_ok = action_ok_push_default;
|
cbs->action_ok = action_ok_push_default;
|
||||||
break;
|
break;
|
||||||
|
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS:
|
||||||
|
cbs->action_ok = action_ok_disk_cycle_tray_status;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user