Now that no native side event_queue_t type is used anymore, convert input read() semantics to use normal nio Buffer semantics - that is, move the position when writing events

This commit is contained in:
Elias Naur 2006-07-03 19:09:47 +00:00
parent b20423aa62
commit 3902c69c7a
11 changed files with 37 additions and 50 deletions

View file

@ -348,8 +348,7 @@ public class Keyboard {
private static void read() {
readBuffer.compact();
int numEvents = Display.getImplementation().readKeyboard(readBuffer);
readBuffer.position(readBuffer.position() + numEvents*EVENT_SIZE);
Display.getImplementation().readKeyboard(readBuffer);
readBuffer.flip();
}