Mail Archives: djgpp/1998/05/27/06:58:16
I found why this fault happens.
My event routine was reading the mouse coordinates thus:-
Jerry.x=R->cx/8; Jerry.y=R->dx/8;
where R->cx and R->dx are 4-byte, i.e. are really ECX and EDX.
In DOS 6.22 and previous, and in plain DOS 7, I get away with this.
But in Windows 95, this value of (mouse Y as supplied in EDX) contains
binary trash in its high two bytes. This alteration cured the trouble:-
Jerry.x=(R->cx/8)&0xffff; Jerry.y=(R->dx/8)&0xffff;
- Raw text -