diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-03-08 22:27:42 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-14 13:59:04 +0100 |
commit | 10424abb29709a9ef6c6761fc3c704ace0f642e8 (patch) | |
tree | 7c3c0ec7af269ad7c3a7bb12497aed5c23203331 /platform/macos/display_server_macos.mm | |
parent | 006410ae46b59bb2699d0885a12d93f53e99a59e (diff) |
Tweak command syntax in Vulkan renderer failure message
This quotes the executable name so that copying it always works
(even if the path contains spaces).
The command is also indented from the rest of the text and is
no longer single-quoted, as that can prevent the command from
running if the line is copied in its entirety (with the quotes).
(cherry picked from commit ddc9cc3e492861dff43617cecb24ae919e122455)
Diffstat (limited to 'platform/macos/display_server_macos.mm')
-rw-r--r-- | platform/macos/display_server_macos.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index e8eb5b419b..af80c1c590 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -3617,15 +3617,15 @@ DisplayServer *DisplayServerMacOS::create_func(const String &p_rendering_driver, if (p_rendering_driver == "vulkan") { String executable_command; if (OS::get_singleton()->get_bundle_resource_dir() == OS::get_singleton()->get_executable_path().get_base_dir()) { - executable_command = vformat("%s --rendering-driver opengl3", OS::get_singleton()->get_executable_path()); + executable_command = vformat("\"%s\" --rendering-driver opengl3", OS::get_singleton()->get_executable_path()); } else { - executable_command = vformat("open %s --args --rendering-driver opengl3", OS::get_singleton()->get_bundle_resource_dir().path_join("../..").simplify_path()); + executable_command = vformat("open \"%s\" --args --rendering-driver opengl3", OS::get_singleton()->get_bundle_resource_dir().path_join("../..").simplify_path()); } OS::get_singleton()->alert( vformat("Your video card drivers seem not to support the required Vulkan version.\n\n" "If possible, consider updating your macOS version or using the OpenGL 3 driver.\n\n" "You can enable the OpenGL 3 driver by starting the engine from the\n" - "command line with the command:\n'%s'", + "command line with the command:\n\n %s", executable_command), "Unable to initialize Vulkan video driver"); } else { |