Merge pull request #44302 from akien-mga/🤦

Don't force GLES2 in Project Manager, causes issues on macOS.
This commit is contained in:
Rémi Verschelde 2020-12-14 15:12:15 +01:00 committed by GitHub
commit ee903becc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 11 deletions

View file

@ -898,13 +898,16 @@ public:
rs_button->set_button_group(rasterizer_button_group);
rs_button->set_text(TTR("OpenGL ES 3.0"));
rs_button->set_meta("driver_name", "GLES3");
rs_button->set_pressed(gles3_viable);
// If GLES3 can't be used, don't let users shoot themselves in the foot.
rs_button->set_disabled(!gles3_viable);
rvb->add_child(rs_button);
l = memnew(Label);
l->set_text(TTR("Not supported by your GPU drivers."));
rvb->add_child(l);
if (gles3_viable) {
rs_button->set_pressed(true);
} else {
// If GLES3 can't be used, don't let users shoot themselves in the foot.
rs_button->set_disabled(true);
l = memnew(Label);
l->set_text(TTR("Not supported by your GPU drivers."));
rvb->add_child(l);
}
l = memnew(Label);
l->set_text(TTR("Higher visual quality\nAll features available\nIncompatible with older hardware\nNot recommended for web games"));
rvb->add_child(l);

View file

@ -1030,11 +1030,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3");
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES2,GLES3"));
if (video_driver == "") {
if (project_manager) {
video_driver = "GLES2"; // Force GLES2 for maximum compatibility, unless specified from command line.
} else {
video_driver = GLOBAL_GET("rendering/quality/driver/driver_name");
}
video_driver = GLOBAL_GET("rendering/quality/driver/driver_name");
}
GLOBAL_DEF("rendering/quality/driver/fallback_to_gles2", false);