mirror of
https://github.com/holub/mame
synced 2025-06-20 03:06:39 +03:00
fix loading mixer settings when the driver default value is calculated. Cannot use == to compare float with the loaded value in this case.
This commit is contained in:
parent
542b489706
commit
bf88dd74e3
@ -583,7 +583,7 @@ static void sound_load(int config_type, xml_data_node *parentnode)
|
|||||||
{
|
{
|
||||||
float defvol = xml_get_attribute_float(channelnode, "defvol", -1000.0);
|
float defvol = xml_get_attribute_float(channelnode, "defvol", -1000.0);
|
||||||
float newvol = xml_get_attribute_float(channelnode, "newvol", -1000.0);
|
float newvol = xml_get_attribute_float(channelnode, "newvol", -1000.0);
|
||||||
if (defvol == sound_get_default_gain(mixernum) && newvol != -1000.0)
|
if (fabs(defvol - sound_get_default_gain(mixernum)) < 1e-6 && newvol != -1000.0)
|
||||||
sound_set_user_gain(mixernum, newvol);
|
sound_set_user_gain(mixernum, newvol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user