summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2001-09-24 09:09:43 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2001-09-24 09:09:43 +0000
commitc6edcfed21a2a1a95117f6ab754592a33056ad95 (patch)
treebe1a09a91879c3e952070fb4bb25d2981ed9563c /src
parenta569cc92713b06f6bea1a4748c5c138a5d99fb05 (diff)
downloadxine-lib-c6edcfed21a2a1a95117f6ab754592a33056ad95.tar.gz
xine-lib-c6edcfed21a2a1a95117f6ab754592a33056ad95.tar.bz2
Support GrayScale visuals in XShm (works like PseudoColor for now)
One indirection missing in Imlib colormap use; the 32768 fast_rgb entries must be used as an index in the palette table, from which we can extract the pixel value. CVS patchset: 689 CVS date: 2001/09/24 09:09:43
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_xshm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 447f658be..6291e44f1 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.37 2001/09/23 15:14:01 jkeil Exp $
+ * $Id: video_out_xshm.c,v 1.38 2001/09/24 09:09:43 jkeil Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -1019,7 +1019,8 @@ ImlibPaletteLUTGet(xshm_driver_t *this)
j = 1 + num_colors*4;
this->fast_rgb = malloc(sizeof(uint8_t) * 32 * 32 * 32);
for (i = 0; i < 32 * 32 * 32 && j < num_ret; i++)
- this->fast_rgb[i] = retval[j++];
+ this->fast_rgb[i] = retval[1+4*retval[j++]+3];
+
XFree(retval);
return 1;
} else
@@ -1220,6 +1221,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
break;
case PseudoColor:
+ case GrayScale:
if (this->depth <= 8 && ImlibPaletteLUTGet(this))
mode = MODE_PALETTE;
break;