mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-19 03:29:26 +01:00
Fix: correct checking of fluid_settings_setnum return code
This commit is contained in:
parent
a411ce18c9
commit
823333c4b0
@ -153,7 +153,7 @@ void MusicDriver_FluidSynth::SetVolume(byte vol)
|
|||||||
* volume". Set gain using OpenTTD's volume, as a number between 0
|
* volume". Set gain using OpenTTD's volume, as a number between 0
|
||||||
* and 0.2. */
|
* and 0.2. */
|
||||||
double gain = (1.0 * vol) / (128.0 * 5.0);
|
double gain = (1.0 * vol) / (128.0 * 5.0);
|
||||||
if (fluid_settings_setnum(_midi.settings, "synth.gain", gain) != 1) {
|
if (fluid_settings_setnum(_midi.settings, "synth.gain", gain) != FLUID_OK) {
|
||||||
DEBUG(driver, 0, "Could not set volume");
|
DEBUG(driver, 0, "Could not set volume");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user