From: <eli...@us...> - 2007-01-17 08:16:21
|
Revision: 2727 http://svn.sourceforge.net/java-game-lib/?rev=2727&view=rev Author: elias_naur Date: 2007-01-17 00:16:16 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Linux: Fixed wrong return type in LinuxEvent.nGetKeyAddress Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java 2007-01-17 08:01:49 UTC (rev 2726) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java 2007-01-17 08:16:16 UTC (rev 2727) @@ -149,7 +149,7 @@ 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); Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c =================================================================== --- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c 2007-01-17 08:01:49 UTC (rev 2726) +++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxEvent.c 2007-01-17 08:16:16 UTC (rev 2727) @@ -135,9 +135,10 @@ 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) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |