tmp = HazardY2; HazardY2 = HazardY1; HazardY1 = tmp;
}
- ppdev->SafetyRemoveCount++;
-
- if (ppdev->SafetyRemoveLevel)
+ if (ppdev->SafetyRemoveLevel != 0)
{
- /* already hidden */
+ ppdev->SafetyRemoveCount++;
return FALSE;
}
+ ppdev->SafetyRemoveCount++;
+
if (pgp->Exclude.right >= HazardX1
&& pgp->Exclude.left <= HazardX2
&& pgp->Exclude.bottom >= HazardY1
return;
}
+
+
pgp->Enabled = FALSE;
+
+ /*
+ * The mouse is hide from ShowCours and it is frist ??
+ */
+ if (pgp->ShowPointer < 0)
+ {
+ return ;
+ }
+
+ /*
+ * Hide the cours
+ */
pt.x = pgp->Pos.x - pgp->HotSpot.x;
pt.y = pgp->Pos.y - pgp->HotSpot.y;
+
if (pgp->SaveSurface != NULL)
{
{
return;
}
-
+
pgp->Enabled = TRUE;
-
+
+ /*
+ * Do not blt the mouse if it in hide
+ */
+ if (pgp->ShowPointer < 0)
+ {
+ return ;
+ }
+
pt.x = pgp->Pos.x - pgp->HotSpot.x;
pt.y = pgp->Pos.y - pgp->HotSpot.y;
EngUnlockSurface(SaveSurface);
}
- /*
+
+ /*
* Blit the cursor on the screen.
*/
SrcPoint.x = max(-pt.x, 0);
SrcPoint.y = max(-pt.y, 0);
+
if (pgp->MaskSurface)
MaskSurf = EngLockSurface(pgp->MaskSurface);
{
if((ColorSurf = EngLockSurface(pgp->ColorSurface)))
{
- IntEngBitBltEx(DestSurface, ColorSurf, MaskSurf, NULL,
+ IntEngBitBltEx(DestSurface, ColorSurf, MaskSurf, NULL,
pgp->XlateObject, &DestRect, &SrcPoint, &SrcPoint,
NULL, NULL, R4_MASK, FALSE);
- EngUnlockSurface(ColorSurf);
+ EngUnlockSurface(ColorSurf);
}
}
else
- {
+ {
IntEngBitBltEx(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject,
&DestRect, &SrcPoint, NULL, NULL, NULL,
ROP3_TO_ROP4(SRCAND), FALSE);
SrcPoint.y += pgp->Size.cy;
IntEngBitBltEx(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject,
&DestRect, &SrcPoint, NULL, NULL, NULL,
- ROP3_TO_ROP4(SRCINVERT), FALSE);
+ ROP3_TO_ROP4(SRCINVERT), FALSE);
}
EngUnlockSurface(MaskSurf);
}
PBYTE Bits;
Bits = EngAllocMem(0, psoColor->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoColor->pvBits, psoColor->cjBits);
pgp->ColorSurface = (HSURF)EngCreateBitmap(pgp->Size,
Size.cx = pgp->Size.cx;
Size.cy = pgp->Size.cy << 1;
Bits = EngAllocMem(0, psoMask->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoMask->pvBits, psoMask->cjBits);
pgp->MaskSurface = (HSURF)EngCreateBitmap(Size,