1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

fix code quality error #2

This commit is contained in:
Mike Will 2024-02-02 03:46:05 -05:00
parent c60e110976
commit 29a2890582

View File

@ -584,10 +584,10 @@ namespace osu.Game.Screens.Play
// Note that we only restore to -20 dB to ensure the user isn't suddenly overloaded by unexpectedly high volume.
if (Math.Floor(audioManager.Volume.Value * audioManager.VolumeTrack.Value * 100) / 100 <= volume_requirement)
{
const double target = 0.1;
// Prioritize increasing music over master volume as to avoid also increasing effects volume.
const double target = 0.1;
double result = target / Math.Max(0.01, audioManager.Volume.Value);
if (result > 1)
{
audioManager.Volume.Value = target;