Use the actual buffer size in nPoll

This commit is contained in:
Elias Naur 2004-03-23 07:47:39 +00:00
parent 25a663b691
commit af6c61c241

View file

@ -163,7 +163,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Keyboard_nPoll
} while (ret != DI_OK && ret != S_FALSE);
void *keyboardBuffer = (void *)env->GetDirectBufferAddress(buffer);
lpdiKeyboard->GetDeviceState(256, keyboardBuffer);
jlong buffer_size = env->GetDirectBufferCapacity(buffer);
lpdiKeyboard->GetDeviceState((DWORD)buffer_size, keyboardBuffer);
}
/*