[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/phonon/xine
From: Matthias Kretz <kretz () kde ! org>
Date: 2008-07-31 6:22:12
Message-ID: 1217485332.552566.3476.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 839926 by mkretz:
use qreal constant instead of double constant, to fix compilation on \
systems with qreal == float
M +9 -8 videowidget.cpp
--- trunk/KDE/kdebase/runtime/phonon/xine/videowidget.cpp #839925:839926
@@ -287,12 +287,13 @@
return m_brightness;
}
+static const qreal ONE = 1.0;
void VideoWidget::setBrightness(qreal newBrightness)
{
- newBrightness = qBound(-1.0, newBrightness, 1.0);
+ newBrightness = qBound(-ONE, newBrightness, ONE);
if (m_brightness != newBrightness) {
m_brightness = newBrightness;
- upstreamEvent(new SetParamEvent(XINE_PARAM_VO_BRIGHTNESS, \
static_cast<int>(0x7fff * (m_brightness + 1.0)))); + \
upstreamEvent(new SetParamEvent(XINE_PARAM_VO_BRIGHTNESS, \
static_cast<int>(0x7fff * (m_brightness + ONE)))); }
}
@@ -303,10 +304,10 @@
void VideoWidget::setContrast(qreal newContrast)
{
- newContrast = qBound(-1.0, newContrast, 1.0);
+ newContrast = qBound(-ONE, newContrast, ONE);
if (m_contrast != newContrast) {
m_contrast = newContrast;
- upstreamEvent(new SetParamEvent(XINE_PARAM_VO_CONTRAST, \
static_cast<int>(0x7fff * (m_contrast + 1.0)))); + upstreamEvent(new \
SetParamEvent(XINE_PARAM_VO_CONTRAST, static_cast<int>(0x7fff * (m_contrast \
+ ONE)))); }
}
@@ -317,10 +318,10 @@
void VideoWidget::setHue(qreal newHue)
{
- newHue = qBound(-1.0, newHue, 1.0);
+ newHue = qBound(-ONE, newHue, ONE);
if (m_hue != newHue) {
m_hue = newHue;
- upstreamEvent(new SetParamEvent(XINE_PARAM_VO_HUE, \
static_cast<int>(0x7fff * (m_hue + 1.0)))); + upstreamEvent(new \
SetParamEvent(XINE_PARAM_VO_HUE, static_cast<int>(0x7fff * (m_hue + \
ONE)))); }
}
@@ -331,10 +332,10 @@
void VideoWidget::setSaturation(qreal newSaturation)
{
- newSaturation = qBound(-1.0, newSaturation, 1.0);
+ newSaturation = qBound(-ONE, newSaturation, ONE);
if (m_saturation != newSaturation) {
m_saturation = newSaturation;
- upstreamEvent(new SetParamEvent(XINE_PARAM_VO_SATURATION, \
static_cast<int>(0x7fff * (m_saturation + 1.0)))); + \
upstreamEvent(new SetParamEvent(XINE_PARAM_VO_SATURATION, \
static_cast<int>(0x7fff * (m_saturation + ONE)))); }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic