mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-20 18:02:12 +00:00
Create separate setting for State Slot in Quick Menu
This commit is contained in:
parent
106cbce6d7
commit
f4f76d9dda
@ -1030,8 +1030,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_SAVE_STATE:
|
||||
case MENU_LABEL_LOAD_STATE:
|
||||
case MENU_LABEL_STATE_SLOT:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_state);
|
||||
break;
|
||||
@ -1107,6 +1106,8 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
case MENU_LABEL_DEBUG_INFORMATION:
|
||||
case MENU_LABEL_SAVE_STATE:
|
||||
case MENU_LABEL_LOAD_STATE:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_menu_more);
|
||||
break;
|
||||
|
@ -85,13 +85,6 @@ static int action_left_input_desc(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_save_state(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
event_command(EVENT_CMD_SAVE_STATE_DECREMENT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_scroll(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -383,10 +376,6 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
BIND_ACTION_LEFT(cbs, action_left_save_state);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_scale_pass);
|
||||
break;
|
||||
|
@ -112,14 +112,6 @@ int action_right_input_desc(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_save_state(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
event_command(EVENT_CMD_SAVE_STATE_INCREMENT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_scroll(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -507,10 +499,6 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
BIND_ACTION_RIGHT(cbs, action_right_save_state);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_scale_pass);
|
||||
break;
|
||||
|
@ -26,6 +26,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_STATE_SLOT:
|
||||
return "state_slot";
|
||||
case MENU_LABEL_CHEEVOS_USERNAME:
|
||||
return "cheevos_username";
|
||||
case MENU_LABEL_CHEEVOS_PASSWORD:
|
||||
@ -684,6 +686,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_VALUE_STATE_SLOT:
|
||||
return "State Slot";
|
||||
case MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS:
|
||||
return "Accounts Cheevos";
|
||||
case MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME:
|
||||
|
@ -1478,6 +1478,9 @@ int menu_displaylist_parse_settings(void *data, menu_displaylist_info_t *info,
|
||||
case PARSE_ACTION:
|
||||
precond = ST_ACTION;
|
||||
break;
|
||||
case PARSE_ONLY_INT:
|
||||
precond = ST_INT;
|
||||
break;
|
||||
case PARSE_ONLY_UINT:
|
||||
precond = ST_UINT;
|
||||
break;
|
||||
@ -1527,6 +1530,10 @@ int menu_displaylist_parse_settings(void *data, menu_displaylist_info_t *info,
|
||||
if (type == ST_ACTION)
|
||||
break;
|
||||
goto loop;
|
||||
case PARSE_ONLY_INT:
|
||||
if (type == ST_INT)
|
||||
break;
|
||||
goto loop;
|
||||
case PARSE_ONLY_UINT:
|
||||
if (type == ST_UINT)
|
||||
break;
|
||||
@ -1567,6 +1574,7 @@ loop:
|
||||
case PARSE_ONLY_BIND:
|
||||
case PARSE_ONLY_FLOAT:
|
||||
case PARSE_ONLY_BOOL:
|
||||
case PARSE_ONLY_INT:
|
||||
case PARSE_ONLY_UINT:
|
||||
case PARSE_ACTION:
|
||||
time_to_exit = true;
|
||||
@ -1668,6 +1676,9 @@ static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t
|
||||
menu_hash_to_str(MENU_LABEL_TAKE_SCREENSHOT),
|
||||
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
|
||||
|
||||
menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_STATE_SLOT), PARSE_ONLY_INT, true);
|
||||
|
||||
menu_entries_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_SAVE_STATE),
|
||||
menu_hash_to_str(MENU_LABEL_SAVE_STATE),
|
||||
|
@ -37,13 +37,14 @@ enum
|
||||
PARSE_NONE = (1 << 0),
|
||||
PARSE_GROUP = (1 << 1),
|
||||
PARSE_ACTION = (1 << 2),
|
||||
PARSE_ONLY_UINT = (1 << 3),
|
||||
PARSE_ONLY_BOOL = (1 << 4),
|
||||
PARSE_ONLY_FLOAT = (1 << 5),
|
||||
PARSE_ONLY_BIND = (1 << 6),
|
||||
PARSE_ONLY_GROUP = (1 << 7),
|
||||
PARSE_ONLY_SUB_GROUP = (1 << 8),
|
||||
PARSE_SUB_GROUP = (1 << 9)
|
||||
PARSE_ONLY_INT = (1 << 3),
|
||||
PARSE_ONLY_UINT = (1 << 4),
|
||||
PARSE_ONLY_BOOL = (1 << 5),
|
||||
PARSE_ONLY_FLOAT = (1 << 6),
|
||||
PARSE_ONLY_BIND = (1 << 7),
|
||||
PARSE_ONLY_GROUP = (1 << 8),
|
||||
PARSE_ONLY_SUB_GROUP = (1 << 9),
|
||||
PARSE_SUB_GROUP = (1 << 10)
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -22,6 +22,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_VALUE_STATE_SLOT 0xa1dec768U
|
||||
|
||||
#define MENU_LABEL_STATE_SLOT 0x27b67f67U
|
||||
|
||||
#define MENU_LABEL_INPUT_HOTKEY_BINDS_BEGIN 0x5a56139bU
|
||||
|
||||
#define MENU_LABEL_INPUT_SETTINGS 0x78b4a7c5U
|
||||
|
@ -3045,6 +3045,18 @@ static bool setting_append_list_main_menu_options(
|
||||
START_GROUP(group_info, menu_hash_to_str(MENU_VALUE_MAIN_MENU), parent_group);
|
||||
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info, parent_group);
|
||||
|
||||
CONFIG_INT(
|
||||
settings->state_slot,
|
||||
menu_hash_to_str(MENU_LABEL_STATE_SLOT),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_STATE_SLOT),
|
||||
0,
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, -1, 0, 1, true, false);
|
||||
|
||||
CONFIG_ACTION(
|
||||
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_CONTENT_SETTINGS),
|
||||
|
Loading…
x
Reference in New Issue
Block a user