- Fix problems with non-zero cursor hotspots

- Add auto dependency tracking to vga ddi driver
- Changes for w32api

svn path=/trunk/; revision=6658
This commit is contained in:
Gé van Geldorp
2003-11-16 12:36:24 +00:00
parent bf942e1744
commit a9f23d0bca
16 changed files with 140 additions and 112 deletions
@@ -4,3 +4,4 @@ vgaddi.coff
*.dll
*.map
*.tmp
.*.d
@@ -1,2 +1,3 @@
*.o
*.map
.*.d
+9 -9
View File
@@ -1,9 +1,9 @@
/*
* entry.c
*
* $Revision: 1.29 $
* $Author: weiden $
* $Date: 2003/11/14 17:13:25 $
* $Revision: 1.30 $
* $Author: gvg $
* $Date: 2003/11/16 12:36:24 $
*
*/
@@ -196,7 +196,7 @@ DrvEnableDriver(IN ULONG EngineVersion,
DriveEnableData->pdrvfn = FuncList;
DriveEnableData->c = sizeof(FuncList) / sizeof(DRVFN);
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION;
DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION_NT4;
return TRUE;
}
@@ -229,9 +229,9 @@ DrvDisableDriver(VOID)
// IN ULONG PatternCount number of patterns expected
// OUT HSURF * SurfPatterns array to contain pattern handles
// IN ULONG GDIInfoSize the size of the GDIInfo object passed in
// OUT GDIINFO * GDIInfo GDI Info object
// OUT ULONG * GDIInfo GDI Info object
// IN ULONG DevInfoSize the size of the DevInfo object passed in
// OUT DEVINFO * DevInfo Device Info object
// OUT ULONG * DevInfo Device Info object
// IN LPWSTR DevDataFile ignore
// IN LPWSTR DeviceName Device name
// IN HANDLE Driver handle to KM driver
@@ -244,10 +244,10 @@ DrvEnablePDEV(IN DEVMODEW *DM,
IN ULONG PatternCount,
OUT HSURF *SurfPatterns,
IN ULONG GDIInfoSize,
OUT GDIINFO *GDIInfo,
OUT ULONG *GDIInfo,
IN ULONG DevInfoSize,
OUT DEVINFO *DevInfo,
IN LPWSTR DevDataFile,
IN HDEV Dev,
IN LPWSTR DeviceName,
IN HANDLE Driver)
{
@@ -283,7 +283,7 @@ DrvEnablePDEV(IN DEVMODEW *DM,
}
memcpy(DevInfo, &devinfoVGA, DevInfoSize);
return(PDev);
return (DHPDEV) PDev;
}
+5 -1
View File
@@ -1,4 +1,4 @@
# $Id: makefile,v 1.21 2003/11/14 17:13:25 weiden Exp $
# $Id: makefile,v 1.22 2003/11/16 12:36:23 gvg Exp $
PATH_TO_TOP = ../../../..
@@ -40,4 +40,8 @@ include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# Automatic dependency tracking
DEP_OBJECTS := $(TARGET_OBJECTS)
include $(PATH_TO_TOP)/tools/depend.mk
# EOF
@@ -1,2 +1,3 @@
*.o
*.map
.*.d
+21 -21
View File
@@ -7,18 +7,18 @@
#include "bitblt.h"
typedef BOOL (*PFN_VGABlt)(SURFOBJ*, SURFOBJ*, XLATEOBJ*, RECTL*, POINTL*);
typedef BOOL STDCALL (*PBLTRECTFUNC)(PSURFOBJ OutputObj,
PSURFOBJ InputObj,
PSURFOBJ Mask,
PXLATEOBJ ColorTranslation,
PRECTL OutputRect,
PPOINTL InputPoint,
PPOINTL MaskOrigin,
PBRUSHOBJ Brush,
PPOINTL BrushOrigin,
typedef BOOL STDCALL (*PBLTRECTFUNC)(SURFOBJ* OutputObj,
SURFOBJ* InputObj,
SURFOBJ* Mask,
XLATEOBJ* ColorTranslation,
RECTL* OutputRect,
POINTL* InputPoint,
POINTL* MaskOrigin,
BRUSHOBJ* Brush,
POINTL* BrushOrigin,
ROP4 Rop4);
static BOOL FASTCALL VGADDI_IntersectRect(PRECTL prcDst, PRECTL prcSrc1, PRECTL prcSrc2)
static BOOL FASTCALL VGADDI_IntersectRect(RECTL* prcDst, RECTL* prcSrc1, RECTL* prcSrc2)
{
static const RECTL rclEmpty = { 0, 0, 0, 0 };
@@ -168,10 +168,10 @@ VGAtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
}
BOOL STDCALL
VGADDI_BltBrush(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ MaskSurf,
PXLATEOBJ ColorTranslation, PRECT DestRect,
PPOINTL SourcePoint, PPOINTL MaskPoint,
PBRUSHOBJ Brush, PPOINTL BrushPoint, ROP4 Rop4)
VGADDI_BltBrush(SURFOBJ* Dest, SURFOBJ* Source, SURFOBJ* MaskSurf,
XLATEOBJ* ColorTranslation, RECTL* DestRect,
POINTL* SourcePoint, POINTL* MaskPoint,
BRUSHOBJ* Brush, POINTL* BrushPoint, ROP4 Rop4)
{
UCHAR SolidColor = 0;
ULONG Left;
@@ -292,9 +292,9 @@ VGADDI_BltBrush(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ MaskSurf,
}
BOOL STDCALL
VGADDI_BltSrc(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
PXLATEOBJ ColorTranslation, PRECTL DestRect, PPOINTL SourcePoint,
PPOINTL MaskOrigin, PBRUSHOBJ Brush, PPOINTL BrushOrigin, ROP4 Rop4)
VGADDI_BltSrc(SURFOBJ* Dest, SURFOBJ* Source, SURFOBJ* Mask,
XLATEOBJ* ColorTranslation, RECTL* DestRect, POINTL* SourcePoint,
POINTL* MaskOrigin, BRUSHOBJ* Brush, POINTL* BrushOrigin, ROP4 Rop4)
{
PFN_VGABlt BltOperation;
ULONG SourceType;
@@ -332,10 +332,10 @@ VGADDI_BltSrc(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
}
BOOL STDCALL
VGADDI_BltMask(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
PXLATEOBJ ColorTranslation, PRECTL DestRect,
PPOINTL SourcePoint, PPOINTL MaskPoint, BRUSHOBJ* Brush,
PPOINTL BrushPoint, ROP4 Rop4)
VGADDI_BltMask(SURFOBJ* Dest, SURFOBJ* Source, SURFOBJ* Mask,
XLATEOBJ* ColorTranslation, RECTL* DestRect,
POINTL* SourcePoint, POINTL* MaskPoint, BRUSHOBJ* Brush,
POINTL* BrushPoint, ROP4 Rop4)
{
LONG i, j, dx, dy, c8;
BYTE *tMask, *lMask;
@@ -5,12 +5,12 @@
#include <debug.h>
BOOL STDCALL
DrvCopyBits(OUT PSURFOBJ DestObj,
IN PSURFOBJ SourceObj,
IN PCLIPOBJ ClipObj,
IN PXLATEOBJ XLateObj,
IN PRECTL DestRectL,
IN PPOINTL SrcPointL)
DrvCopyBits(OUT SURFOBJ* DestObj,
IN SURFOBJ* SourceObj,
IN CLIPOBJ* ClipObj,
IN XLATEOBJ* XLateObj,
IN RECTL* DestRectL,
IN POINTL* SrcPointL)
{
BOOL Done = FALSE;
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: lineto.c,v 1.16 2003/11/14 17:13:25 weiden Exp $
* $Id: lineto.c,v 1.17 2003/11/16 12:36:24 gvg Exp $
*/
#include "../vgaddi.h"
@@ -26,7 +26,7 @@
* Draw a line from top-left to bottom-right
*/
static void FASTCALL
vgaNWtoSE(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG deltay)
vgaNWtoSE(CLIPOBJ* Clip, BRUSHOBJ* Brush, LONG x, LONG y, LONG deltax, LONG deltay)
{
int i;
int error;
@@ -92,7 +92,7 @@ vgaNWtoSE(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG delt
}
static void FASTCALL
vgaSWtoNE(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG deltay)
vgaSWtoNE(CLIPOBJ* Clip, BRUSHOBJ* Brush, LONG x, LONG y, LONG deltax, LONG deltay)
{
int i;
int error;
@@ -157,7 +157,7 @@ vgaSWtoNE(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG delt
}
static void FASTCALL
vgaNEtoSW(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG deltay)
vgaNEtoSW(CLIPOBJ* Clip, BRUSHOBJ* Brush, LONG x, LONG y, LONG deltax, LONG deltay)
{
int i;
int error;
@@ -222,7 +222,7 @@ vgaNEtoSW(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG delt
}
static void FASTCALL
vgaSEtoNW(PCLIPOBJ Clip, PBRUSHOBJ Brush, LONG x, LONG y, LONG deltax, LONG deltay)
vgaSEtoNW(CLIPOBJ* Clip, BRUSHOBJ* Brush, LONG x, LONG y, LONG deltax, LONG deltay)
{
int i;
int error;
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: pointer.c,v 1.17 2003/11/14 17:13:25 weiden Exp $
/* $Id: pointer.c,v 1.18 2003/11/16 12:36:24 gvg Exp $
*
* PROJECT: ReactOS VGA16 display driver
* FILE: drivers/dd/vga/display/objects/pointer.c
@@ -30,7 +30,7 @@
/* GLOBALS *******************************************************************/
static ULONG oldx, oldy;
static LONG oldx, oldy;
static PSAVED_SCREEN_BITS ImageBehindCursor = NULL;
VOID VGADDI_HideCursor(PPDEV ppdev);
VOID VGADDI_ShowCursor(PPDEV ppdev);
@@ -38,10 +38,10 @@ VOID VGADDI_ShowCursor(PPDEV ppdev);
/* FUNCTIONS *****************************************************************/
VOID
VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
VGADDI_BltPointerToVGA(LONG StartX, LONG StartY, ULONG SizeX,
ULONG SizeY, PUCHAR MaskBits, ULONG MaskPitch, ULONG MaskOp)
{
ULONG EndX, EndY;
ULONG DestX, EndX, DestY, EndY;
UCHAR Mask;
PUCHAR Video;
PUCHAR Src;
@@ -49,7 +49,10 @@ VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
ULONG i, j;
ULONG Left;
ULONG Length;
LONG Bits;
DestX = StartX < 0 ? 0 : StartX;
DestY = StartY < 0 ? 0 : StartY;
EndX = StartX + SizeX;
EndY = StartY + SizeY;
@@ -61,11 +64,11 @@ VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 3);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, MaskOp);
if ((StartX % 8) != 0)
if ((DestX % 8) != 0)
{
/* Disable writes to pixels outside of the destination rectangle. */
Mask = (1 << (8 - (StartX % 8))) - 1;
if ((EndX - StartX) < (8 - (StartX % 8)))
Mask = (1 << (8 - (DestX % 8))) - 1;
if ((EndX - DestX) < (8 - (DestX % 8)))
{
Mask &= ~((1 << (8 - (EndX % 8))) - 1);
}
@@ -73,12 +76,12 @@ VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
WRITE_PORT_UCHAR((PUCHAR)GRA_D, Mask);
/* Write the mask. */
Video = (PUCHAR)vidmem + StartY * 80 + (StartX >> 3);
Src = MaskBits + SizeY * MaskPitch;
for (i = 0; i < SizeY; i++, Video+=80)
Video = (PUCHAR)vidmem + DestY * 80 + (DestX >> 3);
Src = MaskBits + (SizeY - (DestY - StartY)) * MaskPitch;
for (i = DestY; i < EndY; i++, Video += 80)
{
Src -= MaskPitch;
SrcValue = (*Src) >> (StartX % 8);
SrcValue = (*Src) >> (DestX % 8);
(VOID)READ_REGISTER_UCHAR(Video);
WRITE_REGISTER_UCHAR(Video, SrcValue);
}
@@ -89,24 +92,30 @@ VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0xFF);
/* Have we finished. */
if ((EndX - StartX) < (8 - (StartX % 8)))
if ((EndX - DestX) < (8 - (DestX % 8)))
{
return;
}
/* Fill any whole rows of eight pixels. */
Left = (StartX + 7) & ~0x7;
Left = (DestX + 7) & ~0x7;
Length = (EndX >> 3) - (Left >> 3);
for (i = StartY; i < EndY; i++)
Bits = StartX;
while (Bits < 0)
{
Bits += 8;
}
Bits = Bits % 8;
for (i = DestY; i < EndY; i++)
{
Video = (PUCHAR)vidmem + i * 80 + (Left >> 3);
Src = MaskBits + (EndY - i - 1) * MaskPitch;
Src = MaskBits + (EndY - i - 1) * MaskPitch + ((DestX - StartX) >> 3);
for (j = 0; j < Length; j++, Video++, Src++)
{
if ((StartX % 8) != 0)
if (Bits != 0)
{
SrcValue = (Src[0] << (8 - (StartX % 8)));
SrcValue |= (Src[1] >> (StartX % 8));
SrcValue = (Src[0] << (8 - Bits));
SrcValue |= (Src[1] >> Bits);
}
else
{
@@ -125,12 +134,12 @@ VGADDI_BltPointerToVGA(ULONG StartX, ULONG StartY, ULONG SizeX,
WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x8);
WRITE_PORT_UCHAR((PUCHAR)GRA_D, Mask);
Video = (PUCHAR)vidmem + StartY * 80 + (EndX >> 3);
Src = MaskBits + SizeY * MaskPitch + (SizeX >> 3) - 1;
for (i = StartY; i < EndY; i++, Video+=80)
Video = (PUCHAR)vidmem + DestY * 80 + (EndX >> 3);
Src = MaskBits + (SizeY - (DestY - StartY)) * MaskPitch + (SizeX >> 3) - 1;
for (i = DestY; i < EndY; i++, Video+=80)
{
Src -= MaskPitch;
SrcValue = (Src[0] << (8 - (StartX % 8)));
SrcValue = (Src[0] << (8 - Bits));
(VOID)READ_REGISTER_UCHAR(Video);
WRITE_REGISTER_UCHAR(Video, SrcValue);
}
@@ -177,16 +186,16 @@ BOOL InitPointer(PPDEV ppdev)
return(TRUE);
}
VOID STDCALL
DrvMovePointer(IN PSURFOBJ pso,
DrvMovePointer(IN SURFOBJ* pso,
IN LONG x,
IN LONG y,
IN PRECTL prcl)
{
PPDEV ppdev = (PPDEV)pso->dhpdev;
if (x < 0 )
if (x < 0 && 0 == (ppdev->flCursor & CURSOR_DOWN))
{
/* x < 0 and y < 0 indicates we must hide the cursor */
VGADDI_HideCursor(ppdev);
@@ -196,7 +205,10 @@ DrvMovePointer(IN PSURFOBJ pso,
ppdev->xyCursor.x = x;
ppdev->xyCursor.y = y;
VGADDI_ShowCursor(ppdev);
if (0 == (ppdev->flCursor & CURSOR_DOWN))
{
VGADDI_ShowCursor(ppdev);
}
/* Give feedback on the new cursor rectangle */
/*if (prcl != NULL) ComputePointerRect(ppdev, prcl);*/
@@ -204,10 +216,10 @@ DrvMovePointer(IN PSURFOBJ pso,
ULONG STDCALL
DrvSetPointerShape(PSURFOBJ pso,
PSURFOBJ psoMask,
PSURFOBJ psoColor,
PXLATEOBJ pxlo,
DrvSetPointerShape(SURFOBJ* pso,
SURFOBJ* psoMask,
SURFOBJ* psoColor,
XLATEOBJ* pxlo,
LONG xHot,
LONG yHot,
LONG x,
@@ -219,22 +231,24 @@ DrvSetPointerShape(PSURFOBJ pso,
ULONG NewWidth, NewHeight;
PUCHAR Src, Dest;
ULONG i;
if(!psoMask)
{
VGADDI_HideCursor(ppdev);
return SPS_ACCEPT_EXCLUDE;
}
NewWidth = psoMask->lDelta << 3;
NewHeight = (psoMask->cjBits / psoMask->lDelta) / 2;
/* Hide the cursor */
if(ppdev->pPointerAttributes->Enable != 0)
if (ppdev->pPointerAttributes->Enable != 0
&& 0 == (ppdev->flCursor & CURSOR_DOWN))
{
VGADDI_HideCursor(ppdev);
}
if (! psoMask)
{
ppdev->flCursor = CURSOR_DOWN;
return SPS_ACCEPT_EXCLUDE;
}
ppdev->flCursor = ppdev->flCursor & (~ CURSOR_DOWN);
NewWidth = psoMask->lDelta << 3;
NewHeight = (psoMask->cjBits / psoMask->lDelta) / 2;
/* Reallocate the space for the cursor if necessary. */
if (ppdev->pPointerAttributes->Width != NewWidth ||
ppdev->pPointerAttributes->Height != NewHeight)
@@ -282,6 +296,8 @@ DrvSetPointerShape(PSURFOBJ pso,
/* Set the new cursor position */
ppdev->xyCursor.x = x;
ppdev->xyCursor.y = y;
ppdev->xyHotSpot.x = xHot;
ppdev->xyHotSpot.y = yHot;
/* Show the cursor */
VGADDI_ShowCursor(ppdev);
@@ -298,8 +314,8 @@ VGADDI_HideCursor(PPDEV ppdev)
SizeX = min(((oldx + ppdev->pPointerAttributes->Width) + 7) & ~0x7, ppdev->sizeSurf.cx);
SizeX -= (oldx & ~0x7);
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - oldy);
VGADDI_BltFromSavedScreenBits(oldx & ~0x7,
oldy,
VGADDI_BltFromSavedScreenBits(max(oldx, 0) & ~0x7,
max(oldy, 0),
ImageBehindCursor,
SizeX,
SizeY);
@@ -310,7 +326,7 @@ VGADDI_HideCursor(PPDEV ppdev)
VOID
VGADDI_ShowCursor(PPDEV ppdev)
{
ULONG cx, cy;
LONG cx, cy;
PUCHAR AndMask, XorMask;
ULONG SizeX, SizeY;
@@ -320,8 +336,8 @@ VGADDI_ShowCursor(PPDEV ppdev)
}
/* Capture pixels behind the cursor */
cx = ppdev->xyCursor.x;
cy = ppdev->xyCursor.y;
cx = ppdev->xyCursor.x - ppdev->xyHotSpot.x;
cy = ppdev->xyCursor.y - ppdev->xyHotSpot.y;
/* Used to repaint background */
SizeX = min(((cx + ppdev->pPointerAttributes->Width) + 7) & ~0x7, ppdev->sizeSurf.cx);
@@ -329,18 +345,18 @@ VGADDI_ShowCursor(PPDEV ppdev)
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - cy);
VGADDI_BltToSavedScreenBits(ImageBehindCursor,
cx & ~0x7,
cy,
max(cx, 0) & ~0x7,
max(cy, 0),
SizeX,
SizeY);
/* Display the cursor. */
SizeX = min(ppdev->pPointerAttributes->Width, ppdev->sizeSurf.cx - ppdev->xyCursor.x);
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - ppdev->xyCursor.y);
SizeX = min(ppdev->pPointerAttributes->Width, ppdev->sizeSurf.cx - cx);
SizeY = min(ppdev->pPointerAttributes->Height, ppdev->sizeSurf.cy - cy);
AndMask = ppdev->pPointerAttributes->Pixels +
(ppdev->pPointerAttributes->Height - SizeY) * ppdev->pPointerAttributes->WidthInBytes;
VGADDI_BltPointerToVGA(ppdev->xyCursor.x,
ppdev->xyCursor.y,
VGADDI_BltPointerToVGA(cx,
cy,
SizeX,
SizeY,
AndMask,
@@ -349,8 +365,8 @@ VGADDI_ShowCursor(PPDEV ppdev)
XorMask = AndMask +
ppdev->pPointerAttributes->WidthInBytes *
ppdev->pPointerAttributes->Height;
VGADDI_BltPointerToVGA(ppdev->xyCursor.x,
ppdev->xyCursor.y,
VGADDI_BltPointerToVGA(cx,
cy,
SizeX,
SizeY,
XorMask,
@@ -358,8 +374,8 @@ VGADDI_ShowCursor(PPDEV ppdev)
VGA_XOR);
/* Save the new cursor location. */
oldx = ppdev->xyCursor.x;
oldy = ppdev->xyCursor.y;
oldx = cx;
oldy = cy;
/* Mark the cursor as currently displayed. */
ppdev->pPointerAttributes->Enable = 1;
@@ -7,12 +7,12 @@
#include "bitblt.h"
BOOL STDCALL
DrvTransparentBlt(PSURFOBJ Dest,
PSURFOBJ Source,
PCLIPOBJ Clip,
PXLATEOBJ ColorTranslation,
PRECTL DestRect,
PRECTL SourceRect,
DrvTransparentBlt(SURFOBJ* Dest,
SURFOBJ* Source,
CLIPOBJ* Clip,
XLATEOBJ* ColorTranslation,
RECTL* DestRect,
RECTL* SourceRect,
ULONG TransparentColor,
ULONG Reserved)
{
+1 -1
View File
@@ -10,7 +10,6 @@
#define POW2(stride) (!((stride) & ((stride)-1))) // TRUE if stride is power of 2
#define BROKEN_RASTERS(stride,cy) ((!(POW2(stride))) && ((stride*cy) > 0x10000))
#define DM_SPECVERSION 1 // FIXME: What is this really?
#define ENUM_RECT_LIMIT 50
typedef struct _RECT_ENUM
@@ -45,6 +44,7 @@ typedef struct _PDEV
// Cursor
XYPAIR xyCursor; // cursor position
XYPAIR xyHotSpot; // cursor hotspot
POINTL ptlExtent; // cursor extent
ULONG cExtent; // effective cursor extent
ULONG flCursor; // cursor status
@@ -1,2 +1,3 @@
*.o
*.map
.*.d
@@ -2,6 +2,7 @@
#include <ddk/ntddvid.h>
#include <ddk/winddi.h>
#include <ntos/minmax.h>
#include <stdlib.h>
#include "vgavideo.h"
UCHAR PreCalcReverseByte[256];
@@ -569,7 +570,7 @@ void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int St
/* DIB blt to the VGA. */
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, PXLATEOBJ Xlate)
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ* Xlate)
{
PBYTE pb, opb = b;
ULONG i, j;
@@ -71,5 +71,5 @@ void get_masks(int x, int w);
#define mod2(n) ((n)&1)
void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta);
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod);
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, PXLATEOBJ Xlate);
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ* Xlate);
void DIB_TransparentBltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, ULONG trans);
+4 -2
View File
@@ -34,6 +34,8 @@
typedef DWORD PTRDIFF;
#endif
#define DM_SPECVERSION 0x0320
#define DDI_DRIVER_VERSION_NT4 0x20000
#define DDI_DRIVER_VERSION_SP3 0x20003
#define DDI_DRIVER_VERSION_NT5 0x30000
@@ -1009,10 +1011,10 @@ DrvEnablePDEV(IN DEVMODEW *DM,
IN ULONG PatternCount,
OUT HSURF *SurfPatterns,
IN ULONG GDIInfoSize,
OUT GDIINFO *GDIInfo,
OUT ULONG *GDIInfo,
IN ULONG DevInfoSize,
OUT DEVINFO *DevInfo,
IN LPWSTR DevDataFile,
IN HDEV Dev,
IN LPWSTR DeviceName,
IN HANDLE Driver);
HSURF STDCALL
+5 -4
View File
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: mouse.c,v 1.44 2003/11/10 17:44:49 weiden Exp $
/* $Id: mouse.c,v 1.45 2003/11/16 12:36:24 gvg Exp $
*
* PROJECT: ReactOS kernel
* PURPOSE: Mouse
@@ -43,7 +43,6 @@
#define NDEBUG
#include <debug.h>
#define GETSYSCURSOR(x) ((x) - OCR_NORMAL)
/* FUNCTIONS *****************************************************************/
@@ -177,8 +176,10 @@ MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1,
tmp = HazardY2; HazardY2 = HazardY1; HazardY1 = tmp;
}
if (((CurInfo->x + Cursor->Size.cx) >= HazardX1) && (CurInfo->x <= HazardX2) &&
((CurInfo->y + Cursor->Size.cy) >= HazardY1) && (CurInfo->y <= HazardY2))
if (CurInfo->x - (INT) Cursor->IconInfo.xHotspot + Cursor->Size.cx >= HazardX1
&& CurInfo->x - (INT) Cursor->IconInfo.xHotspot <= HazardX2
&& CurInfo->y - (INT) Cursor->IconInfo.yHotspot + Cursor->Size.cy >= HazardY1
&& CurInfo->y - (INT) Cursor->IconInfo.yHotspot <= HazardY2)
{
/* Mouse is not allowed to move if GDI is busy drawing */
ExAcquireFastMutexUnsafe(&CurInfo->CursorMutex);