Move audio settings to init and set rather than update, improving performance

This commit is contained in:
MelonSpeedruns
2026-04-07 18:49:24 -04:00
parent 3cc3f09319
commit 4e052d0aca
3 changed files with 26 additions and 8 deletions
+7 -2
View File
@@ -71,8 +71,13 @@ namespace dusk {
if (ImGui::BeginMenu("Audio")) {
ImGui::Text("Master Volume");
config::ImGuiSliderInt("##masterVolume", getSettings().audio.masterVolume, 0, 100);
config::ImGuiCheckbox("Enable Reverb", getSettings().audio.enableReverb);
if (config::ImGuiSliderInt("##masterVolume", getSettings().audio.masterVolume, 0, 100)) {
dusk::audio::SetMasterVolume(dusk::getSettings().audio.masterVolume / 100.0f);
}
if (config::ImGuiCheckbox("Enable Reverb", getSettings().audio.enableReverb)) {
dusk::audio::SetEnableReverb(dusk::getSettings().audio.enableReverb);
}
/*
// TODO: Implement additional settings
ImGui::Text("Main Music Volume");