From bbd0af19121ff0c419acb47e86ee78cc375544d2 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 12 Oct 2019 08:06:04 +1100 Subject: [PATCH] Fix launcher background stuffing up when either fully black or white (Thanks DuckTummy) --- src/Drawer2D.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drawer2D.c b/src/Drawer2D.c index da25fe6fa..9af3f6dda 100644 --- a/src/Drawer2D.c +++ b/src/Drawer2D.c @@ -168,7 +168,7 @@ cc_bool Drawer2D_Clamp(Bitmap* bmp, int* x, int* y, int* width, int* height) { *height = min(*y + *height, bmp->Height) - *y; return *width > 0 && *height > 0; } -#define Drawer2D_ClampPixel(p) (p < 0 ? 0 : (p > 255 ? 255 : p)) +#define Drawer2D_ClampPixel(p) p = (p < 0 ? 0 : (p > 255 ? 255 : p)) void Gradient_Noise(Bitmap* bmp, BitmapCol col, int variation, int x, int y, int width, int height) {