aboutsummaryrefslogtreecommitdiff
path: root/engines/queen
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-05-03 21:54:58 +0200
committerAdrian Frühwirth2018-05-05 17:57:31 +0200
commit49116b4ae7dd31fd736a33913a2969c0653a06cb (patch)
tree5bce268f0d8227d5a4767da23cb321aedc554063 /engines/queen
parentc4edac23b2bd8c4024785e8701b61fe1fad13724 (diff)
downloadscummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.tar.gz
scummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.tar.bz2
scummvm-rg350-49116b4ae7dd31fd736a33913a2969c0653a06cb.zip
ALL: Use CLIP to clip volumes
Diffstat (limited to 'engines/queen')
-rw-r--r--engines/queen/music.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 9f74aab915..c65f2de5ef 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -102,10 +102,7 @@ MidiMusic::~MidiMusic() {
}
void MidiMusic::setVolume(int volume) {
- if (volume < 0)
- volume = 0;
- else if (volume > 255)
- volume = 255;
+ volume = CLIP(volume, 0, 255);
if (_masterVolume == volume)
return;