Parcourir la source

Amiga: keyboard prevent double keys on GetKeyEvent, if called without PollKeyEvent

git-svn-id: trunk@45196 -
marcus il y a 5 ans
Parent
commit
c6b0195c5f
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      packages/rtl-console/src/amicommon/keyboard.pp

+ 3 - 0
packages/rtl-console/src/amicommon/keyboard.pp

@@ -485,6 +485,9 @@ begin
     repeat
       WaitPort(VideoWindow^.UserPort);
       Res := SysPollKeyEvent;
+      // remove event from KeyQueue, because we return it here,
+      // else we get double keys if GetKeyevent is called without a PollKeyEvent called first
+      KeyQueue := 0; 
     until Res <> 0;
   end else
   begin