mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
This commit is contained in:
parent
9fcc0c1217
commit
9293d8e271
5 changed files with 116 additions and 84 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue