aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-04-08 13:06:46 +0000
committerSimon Tatham <anakin@pobox.com>2012-04-08 13:06:46 +0000
commitb4f3b57aa101d679a07e3c654fd4eded57eb755e (patch)
tree2cbf5435f30eed769bc14653e7c738382156e639
parent48fef05eb6c8a70a9d883efd15308332da96e2ba (diff)
downloadpuzzles-b4f3b57aa101d679a07e3c654fd4eded57eb755e.zip
puzzles-b4f3b57aa101d679a07e3c654fd4eded57eb755e.tar.gz
puzzles-b4f3b57aa101d679a07e3c654fd4eded57eb755e.tar.bz2
puzzles-b4f3b57aa101d679a07e3c654fd4eded57eb755e.tar.xz
Swap a 'max' for a 'min', fixing an out-of-range colour component
being passed to the front end. [originally from svn r9451]
-rw-r--r--galaxies.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/galaxies.c b/galaxies.c
index d8906b6..b9eb603 100644
--- a/galaxies.c
+++ b/galaxies.c
@@ -2977,10 +2977,10 @@ static float *game_colours(frontend *fe, int *ncolours)
/* tinge the edit background to bluey */
ret[COL_BACKGROUND * 3 + 0] = ret[COL_BACKGROUND * 3 + 0] * 0.8F;
ret[COL_BACKGROUND * 3 + 1] = ret[COL_BACKGROUND * 3 + 0] * 0.8F;
- ret[COL_BACKGROUND * 3 + 2] = max(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F);
+ ret[COL_BACKGROUND * 3 + 2] = min(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F);
#endif
- ret[COL_CURSOR * 3 + 0] = max(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F);
+ ret[COL_CURSOR * 3 + 0] = min(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F);
ret[COL_CURSOR * 3 + 1] = ret[COL_BACKGROUND * 3 + 0] * 0.8F;
ret[COL_CURSOR * 3 + 2] = ret[COL_BACKGROUND * 3 + 0] * 0.8F;