Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76946 - direct-color 8 bit on x11 broken in libsdl
Summary: direct-color 8 bit on x11 broken in libsdl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 79025
  Show dependency tree
 
Reported: 2005-01-06 14:32 UTC by Tupone Alfredo
Modified: 2005-08-28 14:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tupone Alfredo gentoo-dev 2005-01-06 14:32:00 UTC
SDL_pixel.c on src/video/x11 seems to force an 8 bit framebuffer to be pseudocolor. There are system where you can set it as a direct or true color .
I attach inline a patch to that file.

--- SDL_pixels.c.orig   2005-01-03 21:42:33.000000000 +0100
+++ SDL_pixels.c        2005-01-04 22:33:44.698156027 +0100
@@ -135,7 +135,8 @@
                        format->Amask = 0;
                        break;

-               case 8:
+               default:
+                 if ((bpp == 8) && !Rmask && !Gmask && !Bmask) {
                        /* Create an empty 256 color palette */
                        format->palette = (SDL_Palette *)malloc(
                                                        sizeof(SDL_Palette));
@@ -168,9 +169,7 @@
                        format->Gmask = 0;
                        format->Bmask = 0;
                        format->Amask = 0;
-                       break;
-
-               default:
+                 } else {
                        /* No palette, just packed pixel info */
                        format->palette = NULL;
                        format->Rshift = 0;
@@ -209,6 +208,7 @@
                        format->Gmask = Gmask;
                        format->Bmask = Bmask;
                        format->Amask = Amask;
+                 }
                        break;
        }
        /* Calculate some standard bitmasks, if necessary


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Tom Martin (RETIRED) gentoo-dev 2005-01-06 14:37:55 UTC
Please please please don't inline patches, but now that you have, don't worry about it.
Comment 2 SpanKY gentoo-dev 2005-01-06 18:16:25 UTC
e-mailed patch upstream, i'll see what they say about it
Comment 3 SpanKY gentoo-dev 2005-01-13 16:59:42 UTC
upstream got their stuff in gear and created a much more extensive patch

ive added that to cvs for 1.2.8-r1, thanks :)
Comment 4 Ernst Sjöstrand 2005-01-21 08:12:36 UTC
This patch breaks Aleph One!

Guess we'll have to investigate who's done wrong.