summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:29:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:29:05 +0100
commit9188bc734155e14c97e24649a22213b625b9b6cf (patch)
tree993d3951ef28137ec0284e703356e090e89b73fd /main
parentcd25e48456e58704f1450954a0c94b1e7fe079f4 (diff)
parent4dd8f68120bc3d3be94e0556ccfef9ee4bf8311a (diff)
Merge pull request #67879 from bruvzg/fix_no_vlk
Fix build with Vulkan disabled and no Vulkan headers installed.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a5196da939..8d5c4af57f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1603,11 +1603,17 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Now validate whether the selected driver matches with the renderer.
bool valid_combination = false;
Vector<String> available_drivers;
+#ifdef VULKAN_ENABLED
if (rendering_method == "forward_plus" || rendering_method == "mobile") {
available_drivers.push_back("vulkan");
- } else if (rendering_method == "gl_compatibility") {
+ }
+#endif
+#ifdef GLES3_ENABLED
+ if (rendering_method == "gl_compatibility") {
available_drivers.push_back("opengl3");
- } else {
+ }
+#endif
+ if (available_drivers.is_empty()) {
OS::get_singleton()->print("Unknown renderer name '%s', aborting.\n", rendering_method.utf8().get_data());
goto error;
}