Windows: Use data size constant for input devices instead of hard coded size

This commit is contained in:
Elias Naur 2006-07-04 17:46:33 +00:00
parent 4e68c787b3
commit 6650e03ef4
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ final class WindowsKeyboard {
throw e;
}
keyboard.acquire();
temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*2);
temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*WindowsDirectInputDevice.DATA_SIZE);
keyboard_state = BufferUtils.createByteBuffer(256);
unicode_buffer = BufferUtils.createCharBuffer(BUFFER_SIZE);
}

View File

@ -100,7 +100,7 @@ final class WindowsMouse {
this.mouse_button_count = Math.min(enumerator.getButtonCount(), 4);
this.has_wheel = enumerator.hasWheel();
mouse_state = BufferUtils.createByteBuffer(3*4 + 4);
temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*2);
temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*WindowsDirectInputDevice.DATA_SIZE);
}
public boolean hasWheel() {