Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

web: Don't force dummy audio driver in Project Manager

Fabio Alessandrellib94dbd0d4b64
diff --git a/main/main.cpp b/main/main.cpp
index 30a4fab7201..86db03e412d 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2799,6 +2799,7 @@ 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.
+#ifndef WEB_ENABLED
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.
@@ -2807,6 +2808,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else {
audio_driver = GLOBAL_GET("audio/driver/driver");
}
+#else
+ audio_driver = GLOBAL_GET("audio/driver/driver");
+#endif
}
// Make sure that dummy is the last one, which it is assumed to be by design.