Create 'Rewind Settings'

This commit is contained in:
twinaphex 2015-06-02 14:26:13 +02:00
parent ad57901131
commit 43344a9b7f
2 changed files with 82 additions and 59 deletions

View File

@ -3660,7 +3660,6 @@ static bool setting_append_list_general_options(
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
CONFIG_BOOL(
settings->core_specific_config,
"core_specific_config",
@ -3779,46 +3778,6 @@ static bool setting_append_list_general_options(
END_SUB_GROUP(list, list_info);
START_SUB_GROUP(list, list_info, "Frame rewinding", group_info.name, subgroup_info);
CONFIG_BOOL(
settings->rewind_enable,
"rewind_enable",
"Rewind",
rewind_enable,
"OFF",
"ON",
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REWIND_TOGGLE);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
#if 0
CONFIG_SIZE(
settings->rewind_buffer_size,
"rewind_buffer_size",
"Rewind Buffer Size",
rewind_buffer_size,
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler)
#endif
CONFIG_UINT(
settings->rewind_granularity,
"rewind_granularity",
"Rewind Granularity",
rewind_granularity,
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
settings_list_current_add_range(list, list_info, 1, 32768, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
END_SUB_GROUP(list, list_info);
START_SUB_GROUP(list, list_info, "Saving", group_info.name, subgroup_info);
CONFIG_BOOL(
@ -3935,6 +3894,63 @@ static bool setting_append_list_general_options(
return true;
}
static bool setting_append_list_rewind_options(
rarch_setting_t **list,
rarch_setting_info_t *list_info)
{
rarch_setting_group_info_t group_info;
rarch_setting_group_info_t subgroup_info;
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
START_GROUP(group_info, "Rewind Settings");
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
CONFIG_BOOL(
settings->rewind_enable,
"rewind_enable",
"Rewind",
rewind_enable,
"OFF",
"ON",
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REWIND_TOGGLE);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
#if 0
CONFIG_SIZE(
settings->rewind_buffer_size,
"rewind_buffer_size",
"Rewind Buffer Size",
rewind_buffer_size,
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler)
#endif
CONFIG_UINT(
settings->rewind_granularity,
"rewind_granularity",
"Rewind Granularity",
rewind_granularity,
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
settings_list_current_add_range(list, list_info, 1, 32768, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
END_SUB_GROUP(list, list_info);
END_GROUP(list, list_info);
return true;
}
static bool setting_append_list_recording_options(
rarch_setting_t **list,
rarch_setting_info_t *list_info)
@ -6529,6 +6545,12 @@ rarch_setting_t *setting_new(unsigned mask)
goto error;
}
if (mask & SL_FLAG_REWIND_OPTIONS)
{
if (!setting_append_list_rewind_options(&list, list_info))
goto error;
}
if (mask & SL_FLAG_GENERAL_OPTIONS)
{
if (!setting_append_list_video_options(&list, list_info))

View File

@ -68,24 +68,25 @@ enum setting_list_flags
SL_FLAG_DRIVER_OPTIONS = (1 << 1),
SL_FLAG_CORE_OPTIONS = (1 << 2),
SL_FLAG_GENERAL_OPTIONS = (1 << 3),
SL_FLAG_VIDEO_OPTIONS = (1 << 4),
SL_FLAG_SHADER_OPTIONS = (1 << 5),
SL_FLAG_FONT_OPTIONS = (1 << 6),
SL_FLAG_AUDIO_OPTIONS = (1 << 7),
SL_FLAG_INPUT_OPTIONS = (1 << 8),
SL_FLAG_OVERLAY_OPTIONS = (1 << 9),
SL_FLAG_OSK_OVERLAY_OPTIONS = (1 << 10),
SL_FLAG_MENU_OPTIONS = (1 << 11),
SL_FLAG_UI_OPTIONS = (1 << 12),
SL_FLAG_CORE_UPDATER_OPTIONS = (1 << 13),
SL_FLAG_NETPLAY_OPTIONS = (1 << 14),
SL_FLAG_USER_OPTIONS = (1 << 15),
SL_FLAG_DIRECTORY_OPTIONS = (1 << 16),
SL_FLAG_PRIVACY_OPTIONS = (1 << 17),
SL_FLAG_PLAYLIST_OPTIONS = (1 << 18),
SL_FLAG_ARCHIVE_OPTIONS = (1 << 19),
SL_FLAG_PATCH_OPTIONS = (1 << 20),
SL_FLAG_ALL = (1 << 21),
SL_FLAG_REWIND_OPTIONS = (1 << 4),
SL_FLAG_VIDEO_OPTIONS = (1 << 5),
SL_FLAG_SHADER_OPTIONS = (1 << 6),
SL_FLAG_FONT_OPTIONS = (1 << 7),
SL_FLAG_AUDIO_OPTIONS = (1 << 8),
SL_FLAG_INPUT_OPTIONS = (1 << 9),
SL_FLAG_OVERLAY_OPTIONS = (1 << 10),
SL_FLAG_OSK_OVERLAY_OPTIONS = (1 << 11),
SL_FLAG_MENU_OPTIONS = (1 << 12),
SL_FLAG_UI_OPTIONS = (1 << 13),
SL_FLAG_CORE_UPDATER_OPTIONS = (1 << 14),
SL_FLAG_NETPLAY_OPTIONS = (1 << 15),
SL_FLAG_USER_OPTIONS = (1 << 16),
SL_FLAG_DIRECTORY_OPTIONS = (1 << 17),
SL_FLAG_PRIVACY_OPTIONS = (1 << 18),
SL_FLAG_PLAYLIST_OPTIONS = (1 << 19),
SL_FLAG_ARCHIVE_OPTIONS = (1 << 20),
SL_FLAG_PATCH_OPTIONS = (1 << 21),
SL_FLAG_ALL = (1 << 22),
};
#define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)