Linux: Fixed wrong return type in LinuxEvent.nGetKeyAddress

This commit is contained in:
Elias Naur 2007-01-17 08:16:16 +00:00
parent d3f6588580
commit 4b13bb10d3
2 changed files with 4 additions and 3 deletions

View File

@ -149,7 +149,7 @@ final class LinuxEvent {
public final long getKeyAddress() {
return nGetKeyAddress(event_buffer);
}
private static native int nGetKeyAddress(ByteBuffer event_buffer);
private static native long nGetKeyAddress(ByteBuffer event_buffer);
public final long getKeyTime() {
return nGetKeyTime(event_buffer);

View File

@ -135,9 +135,10 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonY(JNIEnv *env,
return event->xbutton.y;
}
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyAddress(JNIEnv *env, jclass unused, jobject event_buffer) {
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyAddress(JNIEnv *env, jclass unused, jobject event_buffer) {
XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer);
return (jlong)(intptr_t)&(event->xkey);
XKeyEvent *key_event = &(event->xkey);
return (jlong)(intptr_t)key_event;
}
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyTime(JNIEnv *env, jclass unused, jobject event_buffer) {