Save and restore BP, DS and ES when calling the mouse callback.


svn path=/trunk/; revision=69298
This commit is contained in:
Aleksandar Andrejevic 2015-09-19 22:29:45 +00:00
parent d9a6ce4f12
commit 7c44fa3b89

View file

@ -243,7 +243,7 @@ static VOID FromMouseCoordinates(PCOORD Position)
static VOID CallMouseUserHandlers(USHORT CallMask) static VOID CallMouseUserHandlers(USHORT CallMask)
{ {
USHORT i; USHORT i;
USHORT AX, BX, CX, DX, SI, DI; USHORT AX, BX, CX, DX, BP, SI, DI, DS, ES;
COORD Position = DriverState.Position; COORD Position = DriverState.Position;
ToMouseCoordinates(&Position); ToMouseCoordinates(&Position);
@ -262,8 +262,11 @@ static VOID CallMouseUserHandlers(USHORT CallMask)
BX = getBX(); BX = getBX();
CX = getCX(); CX = getCX();
DX = getDX(); DX = getDX();
BP = getBP();
SI = getSI(); SI = getSI();
DI = getDI(); DI = getDI();
DS = getDS();
ES = getES();
setAX(CallMask); setAX(CallMask);
setBX(DriverState.ButtonState); setBX(DriverState.ButtonState);
@ -284,8 +287,11 @@ static VOID CallMouseUserHandlers(USHORT CallMask)
setBX(BX); setBX(BX);
setCX(CX); setCX(CX);
setDX(DX); setDX(DX);
setBP(BP);
setSI(SI); setSI(SI);
setDI(DI); setDI(DI);
setDS(DS);
setES(ES);
} }
for (i = 0; i < ARRAYSIZE(DriverState.Handlers); ++i) for (i = 0; i < ARRAYSIZE(DriverState.Handlers); ++i)