From 806fc3e918322960823acb3d699d05a07fb57b70 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 1 May 2021 14:31:27 +1000 Subject: [PATCH] Settings: Fix default value for VSync on Android --- src/core/settings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index ccf8d9c36..f77ce99e5 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -138,9 +138,11 @@ void Settings::Load(SettingsInterface& si) { // Android doesn't create settings until they're first opened, so we have to override the defaults here. #ifndef __ANDROID__ + static constexpr bool DEFAULT_VSYNC_VALUE = false; static constexpr bool DEFAULT_FAST_BOOT_VALUE = false; static constexpr float DEFAULT_DISPLAY_MAX_FPS = 0.0f; #else + static constexpr bool DEFAULT_VSYNC_VALUE = true; static constexpr bool DEFAULT_FAST_BOOT_VALUE = true; static constexpr float DEFAULT_DISPLAY_MAX_FPS = 60.0f; #endif @@ -242,7 +244,7 @@ void Settings::Load(SettingsInterface& si) display_show_speed = si.GetBoolValue("Display", "ShowSpeed", false); display_show_resolution = si.GetBoolValue("Display", "ShowResolution", false); display_all_frames = si.GetBoolValue("Display", "DisplayAllFrames", false); - video_sync_enabled = si.GetBoolValue("Display", "VSync", true); + video_sync_enabled = si.GetBoolValue("Display", "VSync", DEFAULT_VSYNC_VALUE); display_post_process_chain = si.GetStringValue("Display", "PostProcessChain", ""); display_max_fps = si.GetFloatValue("Display", "MaxFPS", DEFAULT_DISPLAY_MAX_FPS);