From 98fbe77bec8aeac976fe6c29487ebd4d27cbde38 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 2 Jun 2015 14:39:19 +0200 Subject: [PATCH] Add 'Frame Throttle Settings' --- settings.c | 24 +++++++++++++++++++++++- settings_list.h | 3 ++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/settings.c b/settings.c index 9fff7601f0..db0febc31d 100644 --- a/settings.c +++ b/settings.c @@ -3849,7 +3849,23 @@ static bool setting_append_list_general_options( END_SUB_GROUP(list, list_info); - START_SUB_GROUP(list, list_info, "Frame throttling", group_info.name, subgroup_info); + END_GROUP(list, list_info); + + return true; +} + +static bool setting_append_list_frame_throttling_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, "Frame Throttle Settings"); + + START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info); CONFIG_BOOL( settings->fastforward_ratio_throttle_enable, @@ -6563,6 +6579,12 @@ rarch_setting_t *setting_new(unsigned mask) goto error; } + if (mask & SL_FLAG_FRAME_THROTTLE_OPTIONS) + { + if (!setting_append_list_frame_throttling_options(&list, list_info)) + goto error; + } + if (mask & SL_FLAG_FONT_OPTIONS) { if (!setting_append_list_font_options(&list, list_info)) diff --git a/settings_list.h b/settings_list.h index d242b27cf6..8b5eb36747 100644 --- a/settings_list.h +++ b/settings_list.h @@ -87,7 +87,8 @@ enum setting_list_flags SL_FLAG_ARCHIVE_OPTIONS = (1 << 20), SL_FLAG_PATCH_OPTIONS = (1 << 21), SL_FLAG_RECORDING_OPTIONS = (1 << 21), - SL_FLAG_ALL = (1 << 22), + SL_FLAG_FRAME_THROTTLE_OPTIONS= (1 << 22), + SL_FLAG_ALL = (1 << 23), }; #define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)