InitMetrics(VOID)
{
INT *piSysMet;
- PPDEVOBJ ppdev;
ULONG Width, Height;
/* FIXME: HACK, due to missing PDEV on first init */
- ppdev = EngpGetPDEV(NULL);
-
- if (!ppdev)
+ if (!pPrimarySurface)
{
Width = 640;
Height = 480;
}
else
{
- Width = ppdev->gdiinfo.ulHorzRes;
- Height = ppdev->gdiinfo.ulVertRes;
- PDEVOBJ_vRelease(ppdev);
+ Width = pPrimarySurface->gdiinfo.ulHorzRes;
+ Height = pPrimarySurface->gdiinfo.ulVertRes;
}
piSysMet = gpsi->aiSysMet;
Dc->rosdc.hGCClipRgn = IntSysCreateRectRgn(0, 0, 0, 0);
if (Dc->rosdc.hClipRgn == NULL)
- NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, ((PROSRGNDATA)Dc->prgnVis)->BaseObject.hHmgr, 0, RGN_COPY);
+ NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, hRgnVis, 0, RGN_COPY);
else // FYI: Vis == NULL! source of "IntGdiCombineRgn requires hSrc2 != NULL for combine mode 1!"
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, hRgnVis, RGN_AND);
NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
/* attach monitor */
IntAttachMonitor(gppdevPrimary, 0);
-DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface = %p\n",
+ DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface = %p\n",
pPrimarySurface, pPrimarySurface->pSurface);
- pso = &pPrimarySurface->pSurface->SurfObj;
+ /* Create surface */
+ pso = &PDEVOBJ_pSurface(pPrimarySurface)->SurfObj;
SurfSize = pso->sizlBitmap;
/* Put the pointer in the center of the screen */