summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Martin <antoine@nagafix.co.uk>2017-08-14 12:10:32 -0400
committerAdam Jackson <ajax@redhat.com>2017-08-14 12:10:32 -0400
commitbc8546e2bd5ed147ed5ef18ac086a1c50caff446 (patch)
treec7dee9d60886dee7f836d74176cb32d823cf4b44
parent5e90221dc68ae0893acd5c9b12d702269202558d (diff)
Support for 30 bit depth in dummy driver
This patch makes it possible to start the server using the dummy driver with a 30 bit depth. The colormap size is changed from 256 to 1024 to prevent crashes. Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--src/dummy.h2
-rw-r--r--src/dummy_driver.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dummy.h b/src/dummy.h
index 82fbdea..8e7c43b 100644
--- a/src/dummy.h
+++ b/src/dummy.h
@@ -49,7 +49,7 @@ typedef struct dummyRec
int cursorX, cursorY;
int cursorFG, cursorBG;
- dummy_colors colors[256];
+ dummy_colors colors[1024];
Bool (*CreateWindow)() ; /* wrapped CreateWindow */
Bool prop;
} DUMMYRec, *DUMMYPtr;
diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index d4ac869..b4b42f7 100644
--- a/src/dummy_driver.c
+++ b/src/dummy_driver.c
@@ -301,6 +301,7 @@ DUMMYPreInit(ScrnInfoPtr pScrn, int flags)
case 15:
case 16:
case 24:
+ case 30:
break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -603,7 +604,7 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
if(!miCreateDefColormap(pScreen))
return FALSE;
- if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits,
+ if (!xf86HandleColormaps(pScreen, 1024, pScrn->rgbBits,
DUMMYLoadPalette, NULL,
CMAP_PALETTED_TRUECOLOR
| CMAP_RELOAD_ON_MODE_SWITCH))