Merge pull request #76331 from clayjohn/PM-crash
Validate renderer selection in project manager and change default renderer editor setting to expose an enum to users
This commit is contained in:
commit
24cb43a874
|
@ -756,12 +756,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||||
|
|
||||||
#if defined(WEB_ENABLED)
|
#if defined(WEB_ENABLED)
|
||||||
// Web platform only supports `gl_compatibility`.
|
// Web platform only supports `gl_compatibility`.
|
||||||
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "gl_compatibility", "forward_plus,mobile,gl_compatibility")
|
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "project_manager/default_renderer", "gl_compatibility", "forward_plus,mobile,gl_compatibility")
|
||||||
#elif defined(ANDROID_ENABLED)
|
#elif defined(ANDROID_ENABLED)
|
||||||
// Use more suitable rendering method by default.
|
// Use more suitable rendering method by default.
|
||||||
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "mobile", "forward_plus,mobile,gl_compatibility")
|
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "project_manager/default_renderer", "mobile", "forward_plus,mobile,gl_compatibility")
|
||||||
#else
|
#else
|
||||||
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_NONE, "project_manager/default_renderer", "forward_plus", "forward_plus,mobile,gl_compatibility")
|
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "project_manager/default_renderer", "forward_plus", "forward_plus,mobile,gl_compatibility")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (p_extra_config.is_valid()) {
|
if (p_extra_config.is_valid()) {
|
||||||
|
|
|
@ -387,6 +387,8 @@ void ProjectDialog::_nonempty_confirmation_ok_pressed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectDialog::_renderer_selected() {
|
void ProjectDialog::_renderer_selected() {
|
||||||
|
ERR_FAIL_COND(!renderer_button_group->get_pressed_button());
|
||||||
|
|
||||||
String renderer_type = renderer_button_group->get_pressed_button()->get_meta(SNAME("rendering_method"));
|
String renderer_type = renderer_button_group->get_pressed_button()->get_meta(SNAME("rendering_method"));
|
||||||
|
|
||||||
if (renderer_type == "forward_plus") {
|
if (renderer_type == "forward_plus") {
|
||||||
|
|
Loading…
Reference in New Issue