summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 7b2a890a8e..1295cd73b5 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1333,6 +1333,9 @@ bool Main::start() {
Viewport::Usage usage = Viewport::Usage(int(GLOBAL_GET("rendering/quality/intended_usage/framebuffer_allocation")));
sml->get_root()->set_usage(usage);
+ bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
+ sml->get_root()->set_snap_controls_to_pixels(snap_controls);
+
} else {
GLOBAL_DEF("display/window/stretch/mode", "disabled");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,2d,viewport"));
@@ -1342,6 +1345,7 @@ bool Main::start() {
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::STRING, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1,8,1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
+ GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
}
String local_game_path;
@@ -1383,6 +1387,8 @@ bool Main::start() {
if (editor) {
Error serr = editor_node->load_scene(local_game_path);
+ if (serr != OK)
+ ERR_PRINT("Failed to load scene");
OS::get_singleton()->set_context(OS::CONTEXT_EDITOR);
}
#endif