Permalink
Browse files

Fix a warning in mythmusic's synaesthesia visualiser.

  • Loading branch information...
stuartm committed Apr 12, 2012
1 parent b57fdf8 commit ba0b3dedd4abeafcfa3609b5537bedd82890b022
Showing with 4 additions and 4 deletions.
  1. +4 −4 mythplugins/mythmusic/mythmusic/synaesthesia.cpp
@@ -253,23 +253,23 @@ void Synaesthesia::addPixel(int x, int y, int br1, int br2)
return;
unsigned char *p = output + x * 2 + y * m_outWidth * 2;
if (p[0] < 255 - br1)
if (p[0] + br1 < 255)
p[0] += br1;
else
p[0] = 255;
if (p[1] < 255 - br2)
if (p[1] + br2 < 255)
p[1] += br2;
else
p[1] = 255;
}
void Synaesthesia::addPixelFast(unsigned char *p, int br1, int br2)
{
if (p[0] < 255 - br1)
if (p[0] + br1 < 255)
p[0] += br1;
else
p[0] = 255;
if (p[1] < 255 - br2)
if (p[1] + br2 < 255)
p[1] += br2;
else
p[1] = 255;

0 comments on commit ba0b3de

Please sign in to comment.