1st Sort out gdi device mess.

svn path=/trunk/; revision=30370
This commit is contained in:
James Tabor 2007-11-12 01:26:32 +00:00
parent d399d73f7a
commit cd2962c5b8
3 changed files with 25 additions and 20 deletions

View file

@ -495,28 +495,34 @@ typedef struct _DC
ULONG lucExcLock;
ULONG Tid;
DHPDEV PDev;
DHPDEV PDev; // Handle GDIDEVICE?
INT DC_Type;
INT DC_Flags;
PVOID pPDev; // PGDIDEVICE?
FLONG flGraphics;
FLONG flGraphics2;
PDC_ATTR pDc_Attr;
DC_ATTR Dc_Attr;
HDC hSelf; // Used only for MemoryDC & SaveDC.
HDC hNext;
HSURF FillPatternSurfaces[HS_DDI_MAX];
PGDIINFO GDIInfo;
PDEVINFO DevInfo;
HDEV GDIDevice;
HDC hPrev;
// Old tymerz! Cant code? So just Haxzorcise it!
// How many pointers to devices do we need?
HSURF FillPatternSurfaces[HS_DDI_MAX]; // In GDIDEVICE
PGDIINFO GDIInfo; // In GDIDEVICE
PDEVINFO DevInfo; // In GDIDEVICE
HDEV GDIDevice; // Should be PDev or pPDev?
DRIVER_FUNCTIONS DriverFunctions; // In GDIDEVICE
UNICODE_STRING DriverName;
HANDLE DeviceDriver;
HANDLE DeviceDriver; // ?DHPDEV?
CLIPOBJ *CombinedClip;
XLATEOBJ *XlateBrush;
XLATEOBJ *XlatePen;
INT saveLevel;
BOOL IsIC;
INT saveLevel; // DCLEVEL lSaveDepth
HDC hSelf; // DCLEVEL hdcSave Used only for MemoryDC & SaveDC.
BOOL IsIC; // Use DC_Type
HPALETTE PalIndexed;
@ -524,13 +530,6 @@ typedef struct _DC
HANDLE hFile;
LPENHMETAHEADER emh;
// This belongs in DHPDEV not in DC. 8^(
// So I'm putting it down here with the rest of misfits.
// DRIVER_FUNCTIONS does not belong in DC. It should go PVOID in dpdev.
DRIVER_FUNCTIONS DriverFunctions;
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
//
} DC, *PDC;
#endif

View file

@ -56,7 +56,10 @@ typedef struct
UINT SafetyRemoveLevel; /* at what level was the cursor removed?
0 for not removed */
UINT SafetyRemoveCount;
} GDIDEVICE;
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
} GDIDEVICE, *PGDIDEVICE;
/* Internal functions */

View file

@ -388,10 +388,13 @@ DxEngGetDCState(HDC hDC,
UNIMPLEMENTED;
return 0;
case 3:
pEDDgpl = pDC->pEDDgpl;
{
/* PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->PDev; //This one is right,, we have two.*/
PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->GDIDevice; //Until now noone noticed.
pEDDgpl = GDIDevice->pEDDgpl;
DC_UnlockDc(pDC);
return (DWORD)pEDDgpl;
}
default:
UNIMPLEMENTED;
break;