From: <eli...@us...> - 2008-01-19 08:57:43
|
Revision: 2933 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2933&view=rev Author: elias_naur Date: 2008-01-19 00:57:20 -0800 (Sat, 19 Jan 2008) Log Message: ----------- Linux: Fixed test for XkbSetDetectableAutoRepeat success Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2008-01-19 08:49:10 UTC (rev 2932) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2008-01-19 08:57:20 UTC (rev 2933) @@ -151,7 +151,7 @@ private static void setDetectableKeyRepeat(long display, boolean enabled) { boolean success = nSetDetectableKeyRepeat(display, enabled); if (!success) - LWJGLUtil.log("Failed to set detectable key repeat"); + LWJGLUtil.log("Failed to set detectable key repeat to " + enabled); } private static native boolean nSetDetectableKeyRepeat(long display, boolean enabled); Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c =================================================================== --- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2008-01-19 08:49:10 UTC (rev 2932) +++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2008-01-19 08:57:20 UTC (rev 2933) @@ -55,10 +55,9 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_nSetDetectableKeyRepeat(JNIEnv *env, jclass unused, jlong display_ptr, jboolean set_enabled) { Display *disp = (Display *)(intptr_t)display_ptr; - Bool result; Bool enabled = set_enabled == JNI_TRUE ? True : False; - Bool success = XkbSetDetectableAutoRepeat(disp, enabled, &result); - return success && enabled == result ? JNI_TRUE : JNI_FALSE; + Bool result = XkbSetDetectableAutoRepeat(disp, enabled, NULL); + return result == enabled ? JNI_TRUE : JNI_FALSE; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_freeModifierMapping(JNIEnv *env, jclass unused, jlong mapping_ptr) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |