[WIN32SS] Enable multidisplay driver when required

For now, it is only a stub which returns an error.
This commit is contained in:
Hervé Poussineau 2022-03-20 18:12:11 +01:00 committed by hpoussin
parent f3f4cc0f25
commit 9400063aae
3 changed files with 44 additions and 5 deletions

View file

@ -77,6 +77,7 @@ list(APPEND SOURCE
gdi/eng/mem.c
gdi/eng/engmisc.c
gdi/eng/mouse.c
gdi/eng/multidisp.c
gdi/eng/paint.c
gdi/eng/pathobj.c
gdi/eng/pdevobj.c

View file

@ -0,0 +1,24 @@
/*
* PROJECT: ReactOS Win32k subsystem
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* FILE: win32ss/gdi/eng/multidisp.c
* PURPOSE: Multi-Display driver
* PROGRAMMERS:
*/
/* INCLUDES *******************************************************************/
#include <win32k.h>
#define NDEBUG
#include <debug.h>
BOOL
APIENTRY
MultiEnableDriver(
_In_ ULONG iEngineVersion,
_In_ ULONG cj,
_Inout_bytecount_(cj) PDRVENABLEDATA pded)
{
UNIMPLEMENTED;
return FALSE;
}

View file

@ -14,6 +14,13 @@ DBG_DEFAULT_CHANNEL(EngPDev);
static PPDEVOBJ gppdevList = NULL;
static HSEMAPHORE ghsemPDEV;
BOOL
APIENTRY
MultiEnableDriver(
_In_ ULONG iEngineVersion,
_In_ ULONG cj,
_Inout_bytecount_(cj) PDRVENABLEDATA pded);
CODE_SEG("INIT")
NTSTATUS
NTAPI
@ -456,7 +463,10 @@ PDEVOBJ_Create(
}
/* Try to get a display driver */
pldev = LDEVOBJ_pLoadDriver(pdm->dmDeviceName, ldevtype);
if (ldevtype == LDEV_DEVICE_META)
pldev = LDEVOBJ_pLoadInternal(MultiEnableDriver, ldevtype);
else
pldev = LDEVOBJ_pLoadDriver(pdm->dmDeviceName, ldevtype);
if (!pldev)
{
ERR("Could not load display driver '%S'\n",
@ -877,10 +887,14 @@ PDEVOBJ_lChangeDisplaySettings(
}
else
{
/* FIXME: currently, only use the first display */
UNIMPLEMENTED;
PDEVOBJ_vReference(pmdev->dev[0].ppdev);
pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
/* Enable MultiDriver */
pmdev->ppdevGlobal = PDEVOBJ_Create(NULL, (PDEVMODEW)pmdev, 0, LDEV_DEVICE_META);
if (!pmdev->ppdevGlobal)
{
WARN("Failed to create meta-device. Using only first display\n");
PDEVOBJ_vReference(pmdev->dev[0].ppdev);
pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
}
}
if (pmdevOld)