mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
This commit is contained in:
@@ -35,6 +35,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "renderingengine.h"
|
||||
#include "network/networkexceptions.h"
|
||||
|
||||
#if USE_SOUND
|
||||
#include "sound_openal.h"
|
||||
#endif
|
||||
|
||||
/* mainmenumanager.h
|
||||
*/
|
||||
gui::IGUIEnvironment *guienv = nullptr;
|
||||
@@ -71,6 +75,11 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
||||
if (list_video_modes)
|
||||
return RenderingEngine::print_video_modes();
|
||||
|
||||
#if USE_SOUND
|
||||
if (g_settings->getBool("enable_sound"))
|
||||
g_sound_manager_singleton = createSoundManagerSingleton();
|
||||
#endif
|
||||
|
||||
if (!init_engine()) {
|
||||
errorstream << "Could not initialize game engine." << std::endl;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user