diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/main.cpp b/main/main.cpp index 76175780a3..608b4a7c4d 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -780,7 +780,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get().ends_with("project.godot")) { String path; String file = I->get(); - int sep = MAX(file.find_last("/"), file.find_last("\\")); + int sep = MAX(file.rfind("/"), file.rfind("\\")); if (sep == -1) { path = "."; } else { @@ -1895,10 +1895,10 @@ bool Main::start() { Size2i stretch_size = Size2(GLOBAL_DEF("display/window/size/width", 0), GLOBAL_DEF("display/window/size/height", 0)); Window::ContentScaleMode cs_sm = Window::CONTENT_SCALE_MODE_DISABLED; - if (stretch_mode == "objects") { - cs_sm = Window::CONTENT_SCALE_MODE_OBJECTS; - } else if (stretch_mode == "pixels") { - cs_sm = Window::CONTENT_SCALE_MODE_PIXELS; + if (stretch_mode == "canvas_items") { + cs_sm = Window::CONTENT_SCALE_MODE_CANVAS_ITEMS; + } else if (stretch_mode == "viewport") { + cs_sm = Window::CONTENT_SCALE_MODE_VIEWPORT; } Window::ContentScaleAspect cs_aspect = Window::CONTENT_SCALE_ASPECT_IGNORE; @@ -1954,7 +1954,7 @@ bool Main::start() { } 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")); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport")); GLOBAL_DEF("display/window/stretch/aspect", "ignore"); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand")); GLOBAL_DEF("display/window/stretch/shrink", 1.0); @@ -1992,7 +1992,7 @@ bool Main::start() { local_game_path = "res://" + local_game_path; } else { - int sep = local_game_path.find_last("/"); + int sep = local_game_path.rfind("/"); if (sep == -1) { DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); |