summaryrefslogtreecommitdiff
path: root/src/ast_cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_cursor.c')
-rw-r--r--src/ast_cursor.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/ast_cursor.c b/src/ast_cursor.c
index fbbce1b..e870331 100644
--- a/src/ast_cursor.c
+++ b/src/ast_cursor.c
@@ -159,7 +159,13 @@ ASTSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
ASTRecPtr pAST = ASTPTR(pScrn);
DisplayModePtr mode = pAST->ModePtr;
int x_offset, y_offset;
-
+ UCHAR *pjSignature;
+
+ /* Set cursor info to Offscreen */
+ pjSignature = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
+ *((ULONG *) (pjSignature + HWC_SIGNATURE_X)) = x;
+ *((ULONG *) (pjSignature + HWC_SIGNATURE_Y)) = y;
+
x_offset = pAST->HWCInfo.offset_x;
y_offset = pAST->HWCInfo.offset_y;
@@ -174,7 +180,7 @@ ASTSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
}
if(mode->Flags & V_DBLSCAN) y *= 2;
-
+
/* Set to Reg. */
SetIndexReg(CRTC_PORT, 0xC2, (UCHAR) (x_offset));
SetIndexReg(CRTC_PORT, 0xC3, (UCHAR) (y_offset));
@@ -249,7 +255,11 @@ ASTLoadCursorImage(ScrnInfoPtr pScrn, UCHAR *src)
/* Write Checksum as signature */
pjDstData = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
*((ULONG *) pjDstData) = ulCheckSum;
-
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_SizeX)) = pAST->HWCInfo.width;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_SizeY)) = pAST->HWCInfo.height;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_HOTSPOTX)) = 0;
+ *((ULONG *) (pjDstData + HWC_SIGNATURE_HOTSPOTY)) = 0;
+
/* set pattern offset */
ulPatternAddr = ((pAST->HWCInfo.ulHWCOffsetAddr+(HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next) >> 3);
SetIndexReg(CRTC_PORT, 0xC8, (UCHAR) (ulPatternAddr & 0xFF));
@@ -346,7 +356,11 @@ ASTLoadCursorARGB(ScrnInfoPtr pScrn, CursorPtr pCurs)
/* Write Checksum as signature */
pjDstXor = (UCHAR *) pAST->HWCInfo.pjHWCVirtualAddr + (HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next + HWC_SIZE;
*((ULONG *) pjDstXor) = ulCheckSum;
-
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_SizeX)) = pAST->HWCInfo.width;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_SizeY)) = pAST->HWCInfo.height;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_HOTSPOTX)) = 0;
+ *((ULONG *) (pjDstXor + HWC_SIGNATURE_HOTSPOTY)) = 0;
+
/* set pattern offset */
ulPatternAddr = ((pAST->HWCInfo.ulHWCOffsetAddr +(HWC_SIZE+HWC_SIGNATURE_SIZE)*pAST->HWCInfo.HWC_NUM_Next) >> 3);
SetIndexReg(CRTC_PORT, 0xC8, (UCHAR) (ulPatternAddr & 0xFF));