-
Sam Lantinga authored
From: "Mattias Engdeg?rd" Subject: bug in SDL_GetRGB/GetRGBA There's an embarrassing bug in GetRGB/GetRGBA which apparently has been there for years. It incorrectly converts colours with < 8 bits/channel. It came to my attention today in #sdl. What it does now is (for each channel): rv = (pixel & fmt->Rmask) >> fmt->Rshift; *r = (rv << fmt->Rloss) + (rv >> (8 - fmt->Rloss)); which is wrong; the last line should be *r = (rv << fmt->Rloss) + (rv >> (8 - (fmt->Rloss << 1))); --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40689
d8ae01f1
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
audio | ||
cdrom | ||
endian | ||
events | ||
file | ||
hermes | ||
joystick | ||
main | ||
thread | ||
timer | ||
video | ||
.cvsignore | ||
Makefile.am | ||
SDL.c | ||
SDL_error.c | ||
SDL_error_c.h | ||
SDL_fatal.c | ||
SDL_fatal.h | ||
SDL_getenv.c | ||
SDL_loadso.c |