normalitzat Audio

This commit is contained in:
2026-04-18 11:43:13 +02:00
parent 561028ff04
commit 3390d01ef6
12 changed files with 441 additions and 207 deletions

View File

@@ -459,7 +459,7 @@ namespace Options {
}
if (aud.contains("volume")) {
try {
audio.volume = std::clamp(aud["volume"].get_value<int>(), 0, 100);
audio.volume = std::clamp(aud["volume"].get_value<float>(), 0.0F, 1.0F);
} catch (...) {}
}
if (aud.contains("music")) {
@@ -471,7 +471,7 @@ namespace Options {
}
if (mus.contains("volume")) {
try {
audio.music.volume = std::clamp(mus["volume"].get_value<int>(), 0, 100);
audio.music.volume = std::clamp(mus["volume"].get_value<float>(), 0.0F, 1.0F);
} catch (...) {}
}
}
@@ -484,7 +484,7 @@ namespace Options {
}
if (snd.contains("volume")) {
try {
audio.sound.volume = std::clamp(snd["volume"].get_value<int>(), 0, 100);
audio.sound.volume = std::clamp(snd["volume"].get_value<float>(), 0.0F, 1.0F);
} catch (...) {}
}
}