fix(ags): make volume percent accurate

This commit is contained in:
matt1432 2023-09-09 13:45:14 -04:00
parent a73dd316d1
commit 2d9f758dae

View file

@ -34,7 +34,14 @@ const SpeakerPercentLabel = props => Label({
if (!Audio.speaker)
return;
label.label = `${Math.floor(Audio.speaker.volume * 100)}%`;
let vol = Math.floor(Audio.speaker.volume * 100);
if (vol == 0) {
label.label = vol + '%';
}
else {
label.label = vol + 1 + '%';
}
}, 'speaker-changed']],
});