summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-25 13:04:02 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-25 13:04:02 -0500
commit9554e3c35bcabfecf07740501ff34ea421cf1012 (patch)
treebeb7fa3b793b591de3a5f04e94287772ea045d01 /main
parentcd3c86d60450e6ddab3b0df05c3f978da9154927 (diff)
parentda4683c71e94bf7182c2c43254a02379f81db4ad (diff)
downloadredot-engine-9554e3c35bcabfecf07740501ff34ea421cf1012.tar.gz
Merge pull request #38208 from Calinou/project-manager-use-dummy-audio-driver
Use the Dummy audio driver in the project manager
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 743b67f89b..2651646b04 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2499,7 +2499,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.