@@ -264,15 +264,18 @@ void Application::initialize() {
264264 const auto start_time = SDL_GetTicks64 ();
265265
266266 const std::future<void > load_everything = std::async (std::launch::async, [this ] {
267+ this ->m_settings_manager = std::make_unique<SettingsManager>();
268+
269+ const auto current_settings = this ->m_settings_manager ->settings ();
270+
267271 this ->m_music_manager = std::make_unique<MusicManager>(this , num_audio_channels);
272+ this ->m_music_manager ->set_volume (current_settings.volume , true , true );
268273
269274 this ->m_input_manager = std::make_shared<input::InputManager>(this ->m_window );
270275
271- this ->m_settings_manager = std::make_unique<SettingsManager>(this );
272-
273276 this ->m_font_manager = std::make_unique<FontManager>();
274277
275- if (auto api_url = this -> m_settings_manager -> settings () .api_url ; api_url.has_value ()) {
278+ if (auto api_url = current_settings .api_url ; api_url.has_value ()) {
276279 auto maybe_api = lobby::API::get_api (api_url.value ());
277280 if (maybe_api.has_value ()) {
278281 m_api = std::make_unique<lobby::API>(std::move (maybe_api.value ()));
@@ -295,7 +298,7 @@ void Application::initialize() {
295298#endif
296299
297300#if defined(_HAVE_DISCORD_SDK)
298- if (m_settings_manager-> settings () .discord ) {
301+ if (current_settings .discord ) {
299302 auto discord_instance = DiscordInstance::initialize ();
300303 if (not discord_instance.has_value ()) {
301304 spdlog::warn (
0 commit comments