diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-05-02 01:18:56 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2024-02-05 22:14:20 +0100 |
commit | 6f9586443afb73d2601269dfa8ea7f69d6d721d7 (patch) | |
tree | 263956a9e28151750e2d2e4e96c790c8342b9a94 /editor/editor_settings.cpp | |
parent | d3352813ea44447bfbf135efdec23acc4d1d3f89 (diff) | |
download | redot-engine-6f9586443afb73d2601269dfa8ea7f69d6d721d7.tar.gz |
Add a V-Sync editor setting
The editor setting makes it possible to tweak V-Sync status
independently of the project setting.
Use cases:
- Decrease input lag and increase editor responsiveness when editing
a project that has V-Sync enabled.
- Avoid tearing when editing a project that has V-Sync disabled.
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r-- | editor/editor_settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 060f205416..9ba3eec817 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -439,6 +439,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // low FPS limits, the editor can take a small while to become usable after // being focused again, so this should be used at the user's discretion. EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/unfocused_low_processor_mode_sleep_usec", 100000, "1,1000000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/vsync_mode", 1, "Disabled,Enabled,Adaptive,Mailbox") + _initial_set("interface/editor/separate_distraction_mode", false); _initial_set("interface/editor/automatically_open_screenshots", true); EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) |