mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +02:00
rtl-console: fixed keypressed implementation in the Amiga VidCRT unit
git-svn-id: trunk@45318 -
This commit is contained in:
parent
bd19575f92
commit
8b31df7067
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user