mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:05:40 +00:00
Support NtGdiGetDhpdev.
svn path=/trunk/; revision=31463
This commit is contained in:
parent
5778b4df0d
commit
88eea4a9ce
2 changed files with 15 additions and 17 deletions
|
@ -49,13 +49,14 @@ typedef struct _GDIPOINTER /* should stay private to ENG */
|
||||||
ULONG Status;
|
ULONG Status;
|
||||||
} GDIPOINTER, *PGDIPOINTER;
|
} GDIPOINTER, *PGDIPOINTER;
|
||||||
|
|
||||||
typedef struct
|
typedef struct _GDIDEVICE
|
||||||
{
|
{
|
||||||
HANDLE Handle; // HSURF
|
HANDLE Handle; // HSURF
|
||||||
PVOID pvEntry;
|
PVOID pvEntry;
|
||||||
ULONG lucExcLock;
|
ULONG lucExcLock;
|
||||||
ULONG Tid;
|
ULONG Tid;
|
||||||
|
|
||||||
|
struct _GDIDEVICE *ppdevNext;
|
||||||
FLONG flFlags;
|
FLONG flFlags;
|
||||||
PERESOURCE hsemDevLock;
|
PERESOURCE hsemDevLock;
|
||||||
|
|
||||||
|
|
|
@ -543,7 +543,7 @@ IntPrepareDriver()
|
||||||
PrimarySurface.DisplayNumber = DisplayNumber;
|
PrimarySurface.DisplayNumber = DisplayNumber;
|
||||||
PrimarySurface.flFlags = PDEV_DISPLAY; // Hard set,, add more flags.
|
PrimarySurface.flFlags = PDEV_DISPLAY; // Hard set,, add more flags.
|
||||||
PrimarySurface.hsemDevLock = (PERESOURCE)EngCreateSemaphore();
|
PrimarySurface.hsemDevLock = (PERESOURCE)EngCreateSemaphore();
|
||||||
|
PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs.
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -3353,22 +3353,19 @@ DHPDEV
|
||||||
NtGdiGetDhpdev(
|
NtGdiGetDhpdev(
|
||||||
IN HDEV hdev)
|
IN HDEV hdev)
|
||||||
{
|
{
|
||||||
PGDIDEVICE pGdiDevice = (PGDIDEVICE) hdev;
|
PGDIDEVICE pPDev, pGdiDevice = (PGDIDEVICE) hdev;
|
||||||
if (!pGdiDevice) return NULL;
|
if (!pGdiDevice) return NULL;
|
||||||
// ATM we have one, so this cheesie test
|
if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL;
|
||||||
if (pGdiDevice != &PrimarySurface) return NULL;
|
pPDev = &PrimarySurface;
|
||||||
//
|
KeEnterCriticalRegion();
|
||||||
// if ( pGdiDevice < MmSystemRangeStart) return NULL;
|
do
|
||||||
// pPDev = &PrimarySurface;
|
{
|
||||||
// KeEnterCriticalRegion();
|
if (pGdiDevice == pPDev) break;
|
||||||
// do
|
else
|
||||||
// {
|
pPDev = pPDev->ppdevNext;
|
||||||
// if (pGdiDevice == pPDev) break;
|
} while (pPDev != NULL);
|
||||||
// else
|
KeLeaveCriticalRegion();
|
||||||
// pPDev = pPDev->ppdevNext;
|
if (!pPDev) return NULL;
|
||||||
// } while (pPDev != NULL);
|
|
||||||
// KeLeaveCriticalRegion();
|
|
||||||
// if (!pPDev) return NULL;
|
|
||||||
return pGdiDevice->PDev;
|
return pGdiDevice->PDev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue