mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +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;
|
||||
} GDIPOINTER, *PGDIPOINTER;
|
||||
|
||||
typedef struct
|
||||
typedef struct _GDIDEVICE
|
||||
{
|
||||
HANDLE Handle; // HSURF
|
||||
PVOID pvEntry;
|
||||
ULONG lucExcLock;
|
||||
ULONG Tid;
|
||||
|
||||
struct _GDIDEVICE *ppdevNext;
|
||||
FLONG flFlags;
|
||||
PERESOURCE hsemDevLock;
|
||||
|
||||
|
|
|
@ -543,7 +543,7 @@ IntPrepareDriver()
|
|||
PrimarySurface.DisplayNumber = DisplayNumber;
|
||||
PrimarySurface.flFlags = PDEV_DISPLAY; // Hard set,, add more flags.
|
||||
PrimarySurface.hsemDevLock = (PERESOURCE)EngCreateSemaphore();
|
||||
|
||||
PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs.
|
||||
ret = TRUE;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -3353,22 +3353,19 @@ DHPDEV
|
|||
NtGdiGetDhpdev(
|
||||
IN HDEV hdev)
|
||||
{
|
||||
PGDIDEVICE pGdiDevice = (PGDIDEVICE) hdev;
|
||||
PGDIDEVICE pPDev, pGdiDevice = (PGDIDEVICE) hdev;
|
||||
if (!pGdiDevice) return NULL;
|
||||
// ATM we have one, so this cheesie test
|
||||
if (pGdiDevice != &PrimarySurface) return NULL;
|
||||
//
|
||||
// if ( pGdiDevice < MmSystemRangeStart) return NULL;
|
||||
// pPDev = &PrimarySurface;
|
||||
// KeEnterCriticalRegion();
|
||||
// do
|
||||
// {
|
||||
// if (pGdiDevice == pPDev) break;
|
||||
// else
|
||||
// pPDev = pPDev->ppdevNext;
|
||||
// } while (pPDev != NULL);
|
||||
// KeLeaveCriticalRegion();
|
||||
// if (!pPDev) return NULL;
|
||||
if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL;
|
||||
pPDev = &PrimarySurface;
|
||||
KeEnterCriticalRegion();
|
||||
do
|
||||
{
|
||||
if (pGdiDevice == pPDev) break;
|
||||
else
|
||||
pPDev = pPDev->ppdevNext;
|
||||
} while (pPDev != NULL);
|
||||
KeLeaveCriticalRegion();
|
||||
if (!pPDev) return NULL;
|
||||
return pGdiDevice->PDev;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue