Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
86 stars 9 forks source link

Audio volume setting is incorrectly displayed when loading settings #556

Open Calinou opened 7 months ago

Calinou commented 7 months ago

OS: Linux Helion version: https://github.com/Helion-Engine/Helion/commit/45139afec7bd0477fb0922bda8e8cf34c815de14

If you set the audio volume to 0.35, it will initially appear correctly, but once you restart the game, it'll look like this:

Screenshot_20240108_222059

The configuration file written after the game exits appears to be fine:

[engine]
audio.musicvolume = 0.0
audio.soundvolume = 0.035

This is likely a floating-precision error when converting the value for editing (since it appears to be multiplied by 10).