Module Name: xsrc
Committed By: macallan
Date: Fri Oct 25 09:02:25 UTC 2024
Modified Files:
xsrc/external/mit/xf86-video-ngle/dist/src: ngle_driver.c
Log Message:
set the right visual type for 8bit colour
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c
diff -u xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.4 xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.5
--- xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c:1.4 Tue Oct 22 08:46:07 2024
+++ xsrc/external/mit/xf86-video-ngle/dist/src/ngle_driver.c Fri Oct 25 09:02:25 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ngle_driver.c,v 1.4 2024/10/22 08:46:07 macallan Exp $ */
+/* $NetBSD: ngle_driver.c,v 1.5 2024/10/25 09:02:25 macallan Exp $ */
/*
* Copyright (c) 2024 Michael Lorenz
* All rights reserved.
@@ -545,9 +545,16 @@ NGLEScreenInit(SCREEN_INIT_ARGS_DECL)
/* mi layer */
miClearVisualTypes();
- if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
- pScrn->rgbBits, TrueColor))
- return FALSE;
+ if (pScrn->bitsPerPixel > 8) {
+ if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
+ pScrn->rgbBits, TrueColor))
+ return FALSE;
+ } else {
+ if (!miSetVisualTypes(pScrn->depth,
+ miGetDefaultVisualMask(pScrn->depth),
+ pScrn->rgbBits, pScrn->defaultVisual))
+ return FALSE;
+ }
if (!miSetPixmapDepths())
return FALSE;