summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'device.c')
-rw-r--r--device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/device.c b/device.c
index 9a0e4f6b..7a8c8c37 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.53 2012/03/02 10:33:35 kls Exp $
+ * $Id: device.c 2.54 2012/03/02 10:46:06 kls Exp $
*/
#include "device.h"
@@ -877,7 +877,7 @@ void cDevice::SetAudioChannel(int AudioChannel)
void cDevice::SetVolume(int Volume, bool Absolute)
{
int OldVolume = volume;
- volume = min(max(Absolute ? Volume : volume + Volume, 0), MAXVOLUME);
+ volume = constrain(Absolute ? Volume : volume + Volume, 0, MAXVOLUME);
SetVolumeDevice(volume);
Absolute |= mute;
cStatus::MsgSetVolume(Absolute ? volume : volume - OldVolume, Absolute);