mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
X11: Fix 30 bit depth showing corrupted launcher colors (Thanks colbydray), fixes #642
This commit is contained in:
parent
7ec5c09696
commit
c83f53ae93
@ -1009,9 +1009,10 @@ static void BlitFramebuffer(int x1, int y1, int width, int height) {
|
|||||||
|
|
||||||
switch (win_visual.depth)
|
switch (win_visual.depth)
|
||||||
{
|
{
|
||||||
case 30: /* B10 G10 R10 A2 */
|
case 30: /* R10 G10 B10 A2 */
|
||||||
pixel = B | (G << 10) | (B << 20) | ((A >> 6) << 30);
|
pixel = (R << 2) | ((G << 2) << 10) | ((B << 2) << 20) | ((A >> 6) << 30);
|
||||||
((cc_uint32*)dst)[x] = pixel;
|
((cc_uint32*)dst)[x] = pixel;
|
||||||
|
break;
|
||||||
case 16: /* B5 G6 R5 */
|
case 16: /* B5 G6 R5 */
|
||||||
pixel = (B >> 3) | ((G >> 2) << 5) | ((R >> 3) << 11);
|
pixel = (B >> 3) | ((G >> 2) << 5) | ((R >> 3) << 11);
|
||||||
((cc_uint16*)dst)[x] = pixel;
|
((cc_uint16*)dst)[x] = pixel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user