summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilek7 <Milek7@users.noreply.github.com>2020-01-12 15:18:10 +0100
committerCharles Pigott <charlespigott@googlemail.com>2020-01-12 14:55:20 +0000
commit823333c4b05874f69add75a2373bf79aa791138d (patch)
treecc0b6a8bc1da8193ef0875419db7d4c95172473b
parenta411ce18c9f2583a12a005205acd1eeb212413d6 (diff)
downloadopenttd-823333c4b05874f69add75a2373bf79aa791138d.tar.xz
Fix: correct checking of fluid_settings_setnum return code
-rw-r--r--src/music/fluidsynth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp
index aa7076771..3b4789c66 100644
--- a/src/music/fluidsynth.cpp
+++ b/src/music/fluidsynth.cpp
@@ -153,7 +153,7 @@ void MusicDriver_FluidSynth::SetVolume(byte vol)
* volume". Set gain using OpenTTD's volume, as a number between 0
* and 0.2. */
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");
}
}