Autor Beitrag
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Sa 12.04.03 15:23 
hallo...

Einigen von euch dürfte das phänomen bekannt sein! Wenn ich mehrere keys zur gleichen zeit drücke (mehr als 6),dann erscheinen die nicht mehr in meinen keyBuffer.

Kann man dagegen was tun?


zur sicherheit der code:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
var
  DInput8:IDirectInput8 = nil;
  DIKeyboard8:IDirectInputDevice8 = nil;

  KeyBuffer : array[0..255] of byte;
...
function dmInitKeyboard(WinHandle:HWND):boolean;
begin
  result := not failed(DInput8.CreateDevice(GUID_SysKeyboard, DIKeyboard8, nil));
  if result then
  begin
    DIKeyboard8.SetCooperativeLevel(WinHandle, DISCL_FOREGROUND or DISCL_NONEXCLUSIVE);
    DIKeyboard8.SetDataFormat(@c_dfDIKeyboard);
    DIKeyboard8.Acquire;
  end;
end;


procedure dmKeyboardState;
begin
  DIKeyboard8.GetDeviceState(sizeof(KeyBuffer), @KeyBuffer);
end;

function isKeyDown(const key:byte):boolean;
begin
  result := (keybuffer[key] and $80) = $80;
end;
Denke das ist standartmässig!?

_________________
mfg.
mâximôv
maximus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: So 13.04.03 17:48 
Hat sich erledigt...liegt wohl am tastatur-puffer, ergo kann DirectInput nix dafür :?

_________________
mfg.
mâximôv