diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 743b67f89b..bdadd24d35 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -630,6 +630,7 @@ void Main::print_help(const char *p_binary) { print_help_option("--generate-spirv-debug-info", "Generate SPIR-V debug information. This allows source-level shader debugging with RenderDoc.\n"); #if defined(DEBUG_ENABLED) || defined(DEV_ENABLED) print_help_option("--extra-gpu-memory-tracking", "Enables additional memory tracking (see class reference for `RenderingDevice.get_driver_and_device_memory_report()` and linked methods). Currently only implemented for Vulkan. Enabling this feature may cause crashes on some systems due to buggy drivers or bugs in the Vulkan Loader. See https://github.com/godotengine/godot/issues/95967\n"); + print_help_option("--accurate-breadcrumbs", "Force barriers between breadcrumbs. Useful for narrowing down a command causing GPU resets. Currently only implemented for Vulkan.\n"); #endif print_help_option("--remote-debug <uri>", "Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n"); print_help_option("--single-threaded-scene", "Force scene tree to run in single-threaded mode. Sub-thread groups are disabled and run on the main thread.\n"); @@ -652,7 +653,7 @@ void Main::print_help(const char *p_binary) { print_help_option("--delta-smoothing <enable>", "Enable or disable frame delta smoothing [\"enable\", \"disable\"].\n"); print_help_option("--print-fps", "Print the frames per second to the stdout.\n"); #ifdef TOOLS_ENABLED - print_help_option("--editor-pseudolocalization", "Enable pseudolocalization for the editor and the project manager.\n"); + print_help_option("--editor-pseudolocalization", "Enable pseudolocalization for the editor and the project manager.\n", CLI_OPTION_AVAILABILITY_EDITOR); #endif print_help_title("Standalone tools"); @@ -1236,8 +1237,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph #endif } else if (arg == "--generate-spirv-debug-info") { Engine::singleton->generate_spirv_debug_info = true; +#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED) } else if (arg == "--extra-gpu-memory-tracking") { Engine::singleton->extra_gpu_memory_tracking = true; + } else if (arg == "--accurate-breadcrumbs") { + Engine::singleton->accurate_breadcrumbs = true; +#endif } else if (arg == "--tablet-driver") { if (N) { tablet_driver = N->get(); @@ -1796,6 +1801,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (arg == "--" || arg == "++") { adding_user_args = true; } else { + if (!FileAccess::exists(arg) && !DirAccess::exists(arg)) { + // Warn if the argument isn't recognized by Godot *and* the file/folder + // specified by a positional argument doesn't exist. + // This allows projects to read file or folder paths as a positional argument + // without printing a warning, as this scenario can't make use of user command line arguments. + WARN_PRINT(vformat("Unknown command line argument \"%s\". User arguments should be passed after a -- or ++ separator, e.g. \"-- %s\".", arg, arg)); + } main_args.push_back(arg); } @@ -2499,7 +2511,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name()); if (audio_driver.is_empty()) { // Specified in project.godot. - audio_driver = GLOBAL_GET("audio/driver/driver"); + if (project_manager) { + // The project manager doesn't need to play sound (TTS audio output is not emitted by Godot, but by the system itself). + // Disable audio output so it doesn't appear in the list of applications outputting sound in the OS. + // On macOS, this also prevents the project manager from inhibiting suspend. + audio_driver = "Dummy"; + } else { + audio_driver = GLOBAL_GET("audio/driver/driver"); + } } // Make sure that dummy is the last one, which it is assumed to be by design. |