- Do not create a PDEVOBJ for nothing at startup
- Create the surface for real in IntCreatePrimarySurface
svn path=/branches/reactos-yarotows/; revision=46930
InitMetrics(VOID)
{
INT *piSysMet;
InitMetrics(VOID)
{
INT *piSysMet;
ULONG Width, Height;
/* FIXME: HACK, due to missing PDEV on first init */
ULONG Width, Height;
/* FIXME: HACK, due to missing PDEV on first init */
- ppdev = EngpGetPDEV(NULL);
-
- if (!ppdev)
{
Width = 640;
Height = 480;
}
else
{
{
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;
}
piSysMet = gpsi->aiSysMet;
Dc->rosdc.hGCClipRgn = IntSysCreateRectRgn(0, 0, 0, 0);
if (Dc->rosdc.hClipRgn == NULL)
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);
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);
/* attach monitor */
IntAttachMonitor(gppdevPrimary, 0);
-DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface = %p\n",
+ DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface = %p\n",
pPrimarySurface, pPrimarySurface->pSurface);
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 */
SurfSize = pso->sizlBitmap;
/* Put the pointer in the center of the screen */