@@ -151,6 +151,7 @@ Gothic::Gothic() {
151151
152152 defaults->set (" SOUND" , " musicEnabled" , 1 );
153153 defaults->set (" SOUND" , " musicVolume" , 0 .5f );
154+ defaults->set (" SOUND" , " soundEnabled" , 1 );
154155 defaults->set (" SOUND" , " soundVolume" , 0 .5f );
155156
156157 // defaults->set("ENGINE", "zEnvMappingEnabled", 0);
@@ -855,6 +856,13 @@ void Gothic::settingsSetF(std::string_view sec, std::string_view name, float val
855856 instance->onSettingsChanged ();
856857 }
857858
859+ float Gothic::settingsSoundVolume () {
860+ const bool soundEnabled = settingsGetI (" SOUND" ," soundEnabled" )!=0 ;
861+ const float soundVolume = settingsGetF (" SOUND" ," soundVolume" );
862+
863+ return soundEnabled ? 0 .f : soundVolume;
864+ }
865+
858866void Gothic::flushSettings () {
859867 instance->iniFile ->flush ();
860868 }
@@ -902,7 +910,7 @@ void Gothic::setupSettings() {
902910 if (game!=nullptr )
903911 game->setupSettings ();
904912
905- const float soundVolume = settingsGetF ( " SOUND " , " soundVolume " );
913+ const float soundVolume = settingsSoundVolume ( );
906914 sndDev.setGlobalVolume (soundVolume);
907915
908916 auto ord = Gothic::settingsGetS (" GAME" ," invCatOrder" );
0 commit comments