summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2012-11-30 07:55:12 +0100
committerhorchi <vdr@jwendel.de>2012-11-30 07:55:12 +0100
commit37d4d62903c56450d2bc5dff729beff72a832f27 (patch)
treea84ba1079ed5a1b56b933f8db6f680da9b61d402
parent58250a33a5f60aa415c3b4548096ab3b37368b0a (diff)
downloadvdr-plugin-seduatmo-37d4d62903c56450d2bc5dff729beff72a832f27.tar.gz
vdr-plugin-seduatmo-37d4d62903c56450d2bc5dff729beff72a832f27.tar.bz2
added wheel effects provides by TheChief
-rw-r--r--common.c4
-rw-r--r--common.h4
-rw-r--r--seduservice.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/common.c b/common.c
index 17b594b..99e8fa1 100644
--- a/common.c
+++ b/common.c
@@ -94,12 +94,12 @@ int minMax(int x, int min, int max)
return x;
}
-double min(double a, double b)
+double _min(double a, double b)
{
return a < b ? a : b;
}
-double max(double a, double b)
+double _max(double a, double b)
{
return a >= b ? a : b;
}
diff --git a/common.h b/common.h
index c035155..b325af9 100644
--- a/common.h
+++ b/common.h
@@ -32,8 +32,8 @@ enum Misc
int minMax(int x, int min, int max);
int getrand(int min, int max);
-float min(float a, float b);
-float max(float a, float b);
+float _min(float a, float b);
+float _max(float a, float b);
//***************************************************************************
// Time
diff --git a/seduservice.c b/seduservice.c
index d55e5ff..74d88f9 100644
--- a/seduservice.c
+++ b/seduservice.c
@@ -7,6 +7,7 @@
*/
#include <math.h>
+
#include "seduservice.h"
#include "common.h"
@@ -31,6 +32,7 @@ const char* cSeduService::toName(ViewMode vm)
{
return viewModes[vm];
}
+
//***************************************************************************
// Color conversion functions
//***************************************************************************
@@ -41,8 +43,8 @@ void cSeduService::rgb2hsv(int r, int g, int b, double* h, double* s, double* v)
rc = (double)r / 255.0;
gc = (double)g / 255.0;
bc = (double)b / 255.0;
- maxC = max(rc, max(gc, bc));
- minC = min(rc, min(gc, bc));
+ maxC = _max(rc, _max(gc, bc));
+ minC = _min(rc, _min(gc, bc));
delta = maxC - minC;
*v = maxC;