Skip to content

Commit

Permalink
Improve blacker than black function to reduce overexposure
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 30, 2021
1 parent ab301b7 commit 87939a6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/gfxutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,9 @@ void alloc_colors64k(int monid, int rw, int gw, int bw, int rs, int gs, int bs,
int b = ((i & 0xf) << 4) | (i & 0x0f);

if (currprefs.gfx_blackerthanblack) {
r += 10;
g += 10;
b += 10;
if (r > 255)
r = 255;
if (g > 255)
g = 255;
if (b > 255)
b = 255;
r = (r * (255 - 10) / 255) + 10;
g = (g * (255 - 10) / 255) + 10;
b = (g * (255 - 10) / 255) + 10;
}

r = uae_gamma[r + j][0];
Expand Down

0 comments on commit 87939a6

Please # to comment.