diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-10 15:45:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-10 15:45:52 +0100 |
commit | ab56e79a6ac51371fce20f3e24542d7f3990b7a4 (patch) | |
tree | 775c61d97f196623fd9c9c62e6fabaf39067ee45 | |
parent | cac4cda89b34de9730ffde279e98120dfdb18fd0 (diff) |
ProjectManager: Also set `gl_compatibility` for mobile override
It's a bit hacky as the choice mainly impacts the main setting, but there are
pre-existing overrides which supersede it. We should treat this checkbox as
the highest allowed rendering method, and replace the ones which would be
higher end (here replace `mobile` with the chosen `gl_compatibility`).
-rw-r--r-- | editor/project_manager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 6c7ad259ea..5d66be3853 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -510,6 +510,8 @@ private: ProjectSettings::CustomMap initial_settings; // Be sure to change this code if/when renderers are changed. + // Default values are "forward_plus" for the main setting, "mobile" for the mobile override, + // and "gl_compatibility" for the web override. String renderer_type = renderer_button_group->get_pressed_button()->get_meta(SNAME("rendering_method")); initial_settings["rendering/renderer/rendering_method"] = renderer_type; @@ -522,6 +524,8 @@ private: project_features.push_back("Mobile"); } else if (renderer_type == "gl_compatibility") { project_features.push_back("GL Compatibility"); + // Also change the default rendering method for the mobile override. + initial_settings["rendering/renderer/rendering_method.mobile"] = "gl_compatibility"; } else { WARN_PRINT("Unknown renderer type. Please report this as a bug on GitHub."); } |