Fixed master volume slider

This commit is contained in:
KiritoDev 2022-04-27 22:14:38 -05:00 committed by Kenix3
parent 02930be9ee
commit 60cbfd67be

View File

@ -391,8 +391,8 @@ namespace SohImGui {
if (ImGui::BeginMenu("Audio")) { if (ImGui::BeginMenu("Audio")) {
const float volume = Game::Settings.audio.master; const float volume = Game::Settings.audio.master;
ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume)); ImGui::Text("Master Volume: %d %%", static_cast<int>(100 * volume));
if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "")) { if (ImGui::SliderFloat("##Master_Vol", &Game::Settings.audio.master, 0.0f, 1.0f, "", ImGuiSliderFlags_AlwaysClamp)) {
CVar_SetFloat("gGameMasterVolume", volume); CVar_SetFloat("gGameMasterVolume", Game::Settings.audio.master);
needs_save = true; needs_save = true;
} }