From b792c5deae32b6d7a263bb68893cf1bc8a73a1e5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 28 Apr 2017 12:26:01 +0200 Subject: [PATCH] move bool setting --- configuration.c | 6 +++++- configuration.h | 2 +- gfx/video_driver.c | 2 +- menu/menu_setting.c | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configuration.c b/configuration.c index 1d5f44bc18..c8a6d20fbf 100644 --- a/configuration.c +++ b/configuration.c @@ -744,7 +744,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("check_firmware_before_loading", &settings->check_firmware_before_loading, true, check_firmware_before_loading, false); SETTING_BOOL("builtin_mediaplayer_enable", &settings->multimedia.builtin_mediaplayer_enable, false, false /* TODO */, false); SETTING_BOOL("builtin_imageviewer_enable", &settings->multimedia.builtin_imageviewer_enable, true, true, false); - SETTING_BOOL("fps_show", &settings->fps_show, true, false, false); + SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, false, false); SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false); SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false); SETTING_BOOL("rewind_enable", &settings->rewind_enable, true, rewind_enable, false); @@ -2142,12 +2142,16 @@ static bool config_load_file(const char *path, bool set_defaults, *settings->directory.system = '\0'; if (settings->slowmotion_ratio < 1.0f) + { configuration_set_float(settings, settings->slowmotion_ratio, 1.0f); + } /* Sanitize fastforward_ratio value - previously range was -1 * and up (with 0 being skipped) */ if (settings->fastforward_ratio < 0.0f) + { configuration_set_float(settings, settings->fastforward_ratio, 0.0f); + } #ifdef HAVE_LAKKA settings->ssh_enable = path_file_exists(LAKKA_SSH_PATH); diff --git a/configuration.h b/configuration.h index 61f3d91261..6f8d6ea5a9 100644 --- a/configuration.h +++ b/configuration.h @@ -70,6 +70,7 @@ typedef struct settings bool video_allow_rotate; bool video_shared_context; bool video_force_srgb_disable; + bool video_fps_show; bool audio_enable; bool audio_mute_enable; @@ -462,7 +463,6 @@ typedef struct settings #if defined(HAVE_MENU) bool menu_show_start_screen; #endif - bool fps_show; bool load_dummy_on_core_shutdown; bool check_firmware_before_loading; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 37304a7e67..f70fa89c4f 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2242,7 +2242,7 @@ void video_driver_build_info(video_frame_info_t *video_info) settings->bools.video_black_frame_insertion; video_info->hard_sync = settings->bools.video_hard_sync; video_info->hard_sync_frames = settings->video.hard_sync_frames; - video_info->fps_show = settings->fps_show; + video_info->fps_show = settings->bools.video_fps_show; video_info->scale_integer = settings->bools.video_scale_integer; video_info->aspect_ratio_idx = settings->video.aspect_ratio_idx; video_info->post_filter_record = settings->bools.video_post_filter_record; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 1915d30c9d..4930398ad6 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3111,7 +3111,7 @@ static bool setting_append_list( CONFIG_BOOL( list, list_info, - &settings->fps_show, + &settings->bools.video_fps_show, MENU_ENUM_LABEL_FPS_SHOW, MENU_ENUM_LABEL_VALUE_FPS_SHOW, fps_show,