* return the proper shift state in the i8086-msdos keyboard unit GetKeyEvent and

PollKeyEvent (previously, it was truncated, due to the native int being 16-bit
  on i8086)
This commit is contained in:
Nikolay Nikolov 2022-03-12 18:46:46 +02:00
parent 5e0d5cd92e
commit 398c6519a5

View File

@ -53,7 +53,7 @@ begin
intr($16,regs);
if (regs.al=$e0) and (regs.ah<>0) then
regs.al:=0;
SysGetKeyEvent:=(kbPhys shl 24) or regs.ax or ((mem[$40:$17] and $f) shl 16);
SysGetKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(mem[$40:$17] and $f) shl 16);
end;
@ -67,7 +67,7 @@ begin
exit(0);
if (regs.al=$e0) and (regs.ah<>0) then
regs.al:=0;
SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or ((mem[$40:$17] and $f) shl 16);
SysPollKeyEvent:=(kbPhys shl 24) or regs.ax or (longint(mem[$40:$17] and $f) shl 16);
end;