Properly change volume

This commit is contained in:
2024-01-29 12:50:36 +01:00
parent 6e848cf239
commit ed1815eddc
6 changed files with 30 additions and 1 deletions

View File

@@ -307,6 +307,8 @@ void drawSettingsUI(Game *game, f32 dt) {
if (uiSettingsButton("Apply")) {
serializeOptions(SETTINGS_PATH, &opts);
game->options = opts;
SoundState *sounds = ecs_singleton_get_mut(ECS, SoundState);
soundsApplyVolume(sounds, opts.master, opts.music, opts.sound);
setScreen(game, SCREEN_MAIN_MENU);
}