mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 17:45:38 +00:00
Fixed rounding.
This commit is contained in:
parent
8878cb0b4c
commit
c1a27d8a8a
|
@ -273,7 +273,7 @@ int VolumeControl::getVolume() const
|
||||||
rawVolume -= minVolume;
|
rawVolume -= minVolume;
|
||||||
if (rawVolume > 0)
|
if (rawVolume > 0)
|
||||||
{
|
{
|
||||||
volume = (rawVolume * 100) / (maxVolume - minVolume);
|
volume = (rawVolume * 100.0) / (maxVolume - minVolume) + 0.5;
|
||||||
}
|
}
|
||||||
//else volume = 0;
|
//else volume = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue