Browse Source

rtl-console: fixed TKeyEvent to TKeyRecord mapping on big endian systems

git-svn-id: trunk@28550 -
Károly Balogh 11 years ago
parent
commit
bf35dae486
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/rtl-console/src/inc/keybrdh.inc

+ 5 - 0
packages/rtl-console/src/inc/keybrdh.inc

@@ -20,8 +20,13 @@ const
 type
 type
   TKeyEvent = Cardinal;
   TKeyEvent = Cardinal;
   TKeyRecord = packed record
   TKeyRecord = packed record
+{$IFDEF ENDIAN_LITTLE}
     KeyCode : Word;
     KeyCode : Word;
     ShiftState, Flags : Byte;
     ShiftState, Flags : Byte;
+{$ELSE}
+    Flags, ShiftState : Byte;
+    KeyCode : Word;
+{$ENDIF}
   end;
   end;
 
 
 { The structure of a TKeyEvent follows in LSB-MSB order:
 { The structure of a TKeyEvent follows in LSB-MSB order: