Also save and restore the registers around other mouse callbacks
and the DOS driver routine calls.
svn path=/trunk/; revision=69299
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
{
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
{
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
+ WORD AX = getAX();
+ WORD CX = getCX();
+ WORD DX = getDX();
+ WORD BP = getBP();
+ WORD SI = getSI();
+ WORD DI = getDI();
+ WORD DS = getDS();
+ WORD ES = getES();
/* Set ES:BX to the location of the request */
setES(DOS_DATA_SEGMENT);
/* Set ES:BX to the location of the request */
setES(DOS_DATA_SEGMENT);
/* Get the request structure from ES:BX */
RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
/* Get the request structure from ES:BX */
RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
- /* Restore ES:BX */
- setES(ES);
+ /* Restore the registers */
+ setAX(AX);
+ setCX(CX);
+ setDX(DX);
+ setBP(BP);
+ setSI(SI);
+ setDI(DI);
+ setDS(DS);
+ setES(ES);
}
static inline WORD NTAPI DosDriverReadInternal(PDOS_DEVICE_NODE DeviceNode,
}
static inline WORD NTAPI DosDriverReadInternal(PDOS_DEVICE_NODE DeviceNode,
BX = getBX();
CX = getCX();
DX = getDX();
BX = getBX();
CX = getCX();
DX = getDX();
SI = getSI();
DI = getDI();
SI = getSI();
DI = getDI();
+ DS = getDS();
+ ES = getES();
setAX(CallMask);
setBX(DriverState.ButtonState);
setAX(CallMask);
setBX(DriverState.ButtonState);
setBX(BX);
setCX(CX);
setDX(DX);
setBX(BX);
setCX(CX);
setDX(DX);
+ setDS(DS);
+ setES(ES);