Let logout screen correctly darken background

This commit is contained in:
Sanel Zukan 2008-01-17 16:44:20 +00:00
parent a9f449b64b
commit 6b5cd7bf4c

View File

@ -134,11 +134,25 @@ unsigned char* make_darker(unsigned char *p, int X, int Y, int w, int h) {
for(int j = 0; j < h; j++) {
for(int i = 0; i < w; i++) {
// red
if(*pdata > step) *pdata -= step; pdata++;
if(*pdata > step)
*pdata -= step;
else
*pdata = 0;
pdata++;
// green
if(*pdata > step) *pdata -= step; pdata++;
if(*pdata > step)
*pdata -= step;
else
*pdata = 0;
pdata++;
// blue
if(*pdata > step) *pdata -= step; pdata++;
if(*pdata > step)
*pdata -= step;
else
*pdata = 0;
pdata++;
}
}