mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +00:00
[WIN32K]
Partially revert 46733 Silence some debug output svn path=/branches/reactos-yarotows/; revision=46734
This commit is contained in:
parent
243eeb574a
commit
47cbf8f46d
1 changed files with 24 additions and 12 deletions
|
@ -60,7 +60,8 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev)
|
|||
/* Do we have a surface? */
|
||||
if(ppdev->pSurface)
|
||||
{
|
||||
/* No one should hold a lock on this surface */
|
||||
/* Release the surface and let the driver free it */
|
||||
SURFACE_ShareUnlockSurface(ppdev->pSurface);
|
||||
ppdev->pfn.DisableSurface(ppdev->dhpdev);
|
||||
}
|
||||
|
||||
|
@ -146,8 +147,6 @@ PDEVOBJ_pSurface(
|
|||
{
|
||||
HSURF hsurf;
|
||||
|
||||
DPRINT("PDEVOBJ_pSurface()\n");
|
||||
|
||||
/* Check if we already have a surface */
|
||||
if (ppdev->pSurface)
|
||||
{
|
||||
|
@ -291,6 +290,7 @@ PDEVOBJ_vSwitchPdev(
|
|||
PPDEVOBJ ppdev2)
|
||||
{
|
||||
PDEVOBJ pdevTmp;
|
||||
HDEV hdev;
|
||||
|
||||
/* Exchange data */
|
||||
pdevTmp = *ppdev;
|
||||
|
@ -310,10 +310,9 @@ PDEVOBJ_vSwitchPdev(
|
|||
/* Exchange surface */
|
||||
ppdev->pSurface = ppdev2->pSurface;
|
||||
ppdev2->pSurface = pdevTmp.pSurface;
|
||||
if(ppdev->pSurface)
|
||||
ppdev->pSurface->SurfObj.hdev = (HDEV)ppdev;
|
||||
if(ppdev2->pSurface)
|
||||
ppdev2->pSurface->SurfObj.hdev = (HDEV)ppdev2;
|
||||
hdev = ppdev->pSurface->SurfObj.hdev;
|
||||
ppdev->pSurface->SurfObj.hdev = ppdev2->pSurface->SurfObj.hdev;
|
||||
ppdev2->pSurface->SurfObj.hdev = hdev;
|
||||
|
||||
/* Exchange devinfo */
|
||||
ppdev->devinfo = ppdev2->devinfo;
|
||||
|
@ -337,6 +336,7 @@ PDEVOBJ_bSwitchMode(
|
|||
{
|
||||
UNICODE_STRING ustrDevice;
|
||||
PPDEVOBJ ppdevTmp;
|
||||
PSURFACE pSurface;
|
||||
BOOL retval = FALSE;
|
||||
|
||||
/* Lock the PDEV */
|
||||
|
@ -365,14 +365,25 @@ PDEVOBJ_bSwitchMode(
|
|||
goto leave;
|
||||
}
|
||||
|
||||
/* 3. Get DirectDraw information */
|
||||
/* 4. Enable DirectDraw Not traced */
|
||||
/* 5. Copy old PDEV state to new PDEV instance */
|
||||
/* 3. Create a new surface */
|
||||
pSurface = PDEVOBJ_pSurface(ppdevTmp);
|
||||
if (!pSurface)
|
||||
{
|
||||
DPRINT1("DrvEnableSurface failed\n");
|
||||
goto leave;
|
||||
}
|
||||
|
||||
/* 6. Switch the PDEVs */
|
||||
ASSERT(pSurface->BitsLock);
|
||||
|
||||
/* 4. Get DirectDraw information */
|
||||
/* 5. Enable DirectDraw Not traced */
|
||||
/* 6. Copy old PDEV state to new PDEV instance */
|
||||
|
||||
/* 7. Switch the PDEVs */
|
||||
PDEVOBJ_vSwitchPdev(ppdev, ppdevTmp);
|
||||
ASSERT(ppdev->pSurface->BitsLock);
|
||||
|
||||
/* 7. Disable DirectDraw */
|
||||
/* 8. Disable DirectDraw */
|
||||
|
||||
PDEVOBJ_vRelease(ppdevTmp);
|
||||
|
||||
|
@ -384,6 +395,7 @@ leave:
|
|||
EngReleaseSemaphore(ghsemPDEV);
|
||||
|
||||
DPRINT1("leave, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface);
|
||||
ASSERT(ppdev->pSurface->BitsLock);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue