Function result of GetMouseState on unit msmouse.pas with strange bits
Original Reporter info from Mantis: juegosenlazaruscr
-
Reporter name: Rafael Ángel Campos Vargas
Original Reporter info from Mantis: juegosenlazaruscr
- Reporter name: Rafael Ángel Campos Vargas
Description:
If I assign in Go32v2 (FreeDOS-VirtualBox)
GetMouseState(x,y,buttons);
SomeWord := buttons;
// Runtime error because out of range buttons is $00A0000 (It is a Longint not a Word).
unit msmouse.pas;
Procedure GetMouseState(var x, y, buttons : LongInt);
begin
if (not MouseFound) then Exit;
asm
...
...
movw %bx, (%eax)
end;
end;
Simple solution...
Procedure GetMouseState(var x, y, buttons : LongInt);
begin
if (not MouseFound) then Exit;
asm
...
...
movl $0, (%eax)
movw %bx, (%eax)
end;
end;
Additional information:
NOTE: Actually I am using a modified version of msmouse.pas with a modified Initialization
I artificially increments MaxXValue to 1600 and MaxYValue to 1200 to obtain a
finner mouse pointer on graph unit of Go32v2.
In theory, I think I must to decrement cell size, or report change to graph mode...
Mantis conversion info:
- Mantis ID: 36708
- Version: 3.0.2
- Fixed in revision: 44210 (#5d0c9cee)