From e2e8e78cd2c9e58a06542e7717ac795b855c5d8d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 9 Sep 2025 19:35:47 +0200 Subject: [PATCH] xfree86: use screenInfo insead of pointer passed to InitOutput() We only have one global screenInfo struct ever, and many other parts of the Xserver can only operate on global screenInfo, so it's time to phase out this extra pointer. Once the same has done on the other DDXes, it will be dropped from InitOutput()'s parameter list. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/common/xf86Init.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index f9a3d994d8..f7abea45f7 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -284,7 +284,7 @@ xf86EnsureRANDR(ScreenPtr pScreen) * collecting the pixmap formats. */ void -InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +InitOutput(ScreenInfo *unused, int argc, char **argv) { int i, j, k, scr_index; const char **modulelist; @@ -592,16 +592,16 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) AddCallback(&RootWindowFinalizeCallback, AddSeatId, SeatId); /* - * Use the previously collected parts to setup pScreenInfo + * Use the previously collected parts to setup screenInfo */ - pScreenInfo->imageByteOrder = xf86Screens[0]->imageByteOrder; - pScreenInfo->bitmapScanlinePad = xf86Screens[0]->bitmapScanlinePad; - pScreenInfo->bitmapScanlineUnit = xf86Screens[0]->bitmapScanlineUnit; - pScreenInfo->bitmapBitOrder = xf86Screens[0]->bitmapBitOrder; - pScreenInfo->numPixmapFormats = numFormats; + screenInfo.imageByteOrder = xf86Screens[0]->imageByteOrder; + screenInfo.bitmapScanlinePad = xf86Screens[0]->bitmapScanlinePad; + screenInfo.bitmapScanlineUnit = xf86Screens[0]->bitmapScanlineUnit; + screenInfo.bitmapBitOrder = xf86Screens[0]->bitmapBitOrder; + screenInfo.numPixmapFormats = numFormats; for (i = 0; i < numFormats; i++) - pScreenInfo->formats[i] = formats[i]; + screenInfo.formats[i] = formats[i]; /* Make sure the server's VT is active */