summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/project_manager.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 5057fc7531..1364f7891e 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -711,7 +711,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "network/debug/remote_port", 6007, "1,65535,1")
// SSL
- EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem")
+ EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
// Profiler
_initial_set("debugger/profiler_frame_history_size", 600);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 0879d0dd18..cd95f97286 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -2873,10 +2873,16 @@ ProjectManager::ProjectManager() {
Vector2i window_size = DisplayServer::get_singleton()->window_get_size();
Vector2i screen_size = DisplayServer::get_singleton()->screen_get_size();
Vector2i screen_position = DisplayServer::get_singleton()->screen_get_position();
- window_size *= scale_factor;
+
+ // Consider the editor display scale.
+ window_size.x = round((float)window_size.x * scale_factor);
+ window_size.y = round((float)window_size.y * scale_factor);
+
+ // Make the window centered on the screen.
Vector2i window_position;
window_position.x = screen_position.x + (screen_size.x - window_size.x) / 2;
window_position.y = screen_position.y + (screen_size.y - window_size.y) / 2;
+
DisplayServer::get_singleton()->window_set_size(window_size);
DisplayServer::get_singleton()->window_set_position(window_position);
}