You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #48364 from Calinou/add-vsync-editor-setting
Add a V-Sync editor setting
This commit is contained in:
@@ -345,6 +345,11 @@ void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::_update_vsync_mode() {
|
||||
const DisplayServer::VSyncMode window_vsync_mode = DisplayServer::VSyncMode(int(EDITOR_GET("interface/editor/vsync_mode")));
|
||||
DisplayServer::get_singleton()->window_set_vsync_mode(window_vsync_mode);
|
||||
}
|
||||
|
||||
void EditorNode::_update_from_settings() {
|
||||
_update_title();
|
||||
|
||||
@@ -758,6 +763,7 @@ void EditorNode::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
_update_vsync_mode();
|
||||
FileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
|
||||
EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
|
||||
EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EDITOR_GET("filesystem/file_dialog/display_mode").operator int());
|
||||
@@ -6271,6 +6277,8 @@ EditorNode::EditorNode() {
|
||||
|
||||
FileAccess::set_backup_save(EDITOR_GET("filesystem/on_save/safe_save_on_backup_then_rename"));
|
||||
|
||||
_update_vsync_mode();
|
||||
|
||||
// Warm up the surface upgrade tool as early as possible.
|
||||
surface_upgrade_tool = memnew(SurfaceUpgradeTool);
|
||||
run_surface_upgrade_tool = EditorSettings::get_singleton()->get_project_metadata("surface_upgrade_tool", "run_on_restart", false);
|
||||
|
||||
Reference in New Issue
Block a user