Skip to content

Commit

Permalink
Always accept title-case driver names to make the OpenGL project sett…
Browse files Browse the repository at this point in the history
…ing work

- Mark the driver name setting as requiring a project restart.
  • Loading branch information
Calinou committed Sep 28, 2021
1 parent 2c8c007 commit 81d4982
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
register_core_extensions(); //before display
// possibly be worth changing the default from vulkan to something lower spec,
// for the project manager, depending on how smooth the fallback is.
GLOBAL_DEF("rendering/driver/driver_name", "Vulkan");
GLOBAL_DEF_RST("rendering/driver/driver_name", "Vulkan");

// this list is hard coded, which makes it more difficult to add new backends.
// can potentially be changed to more of a plugin system at a later date.
Expand All @@ -1280,10 +1280,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// shows the correct driver string.
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver);

// always convert to lower case vulkan for consistency in the code
if (rendering_driver == "Vulkan") {
rendering_driver = "vulkan";
}
// always convert to lower case for consistency in the code
rendering_driver = rendering_driver.to_lower();

GLOBAL_DEF_BASIC("display/window/size/width", 1024);
ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width",
Expand Down

0 comments on commit 81d4982

Please sign in to comment.