rtl-console: fixed keypressed implementation in the Amiga VidCRT unit

git-svn-id: trunk@45318 -
This commit is contained in:
Károly Balogh 2020-05-09 12:56:19 +00:00
parent bd19575f92
commit 8b31df7067

View File

@ -59,21 +59,8 @@ begin
end;
function KeyPressed: Boolean;
var
NKey: TKeyEvent;
begin
KeyPressed := False;
// Try to get a key if not already pressed one
if LastKeysIdx < 0 then
begin
NKey := PollKeyEvent;
if NKey <> 0 then
begin
ProcessKeyEvent(NKey);
end;
end;
// if last key is set, return that we have something
KeyPressed := LastKeysIdx <> 0;
KeyPressed := (LastKeysIdx >= 0) or (PollKeyEvent <> 0);
end;
function ReadKey: Char;