From d1e81fc8c9241d08a9f6e16133b3c53d06bc324f Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sat, 29 Oct 2011 20:29:49 +0000 Subject: [PATCH] * Specify library path for JInput as well as LWJGL in case the user's home directory is used for natives git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8545 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/desktop/com/jme3/system/Natives.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/src/desktop/com/jme3/system/Natives.java b/engine/src/desktop/com/jme3/system/Natives.java index 8708b93a1..e9e5c4d72 100644 --- a/engine/src/desktop/com/jme3/system/Natives.java +++ b/engine/src/desktop/com/jme3/system/Natives.java @@ -196,6 +196,7 @@ public class Natives { boolean needOAL = false; boolean needJInput = false; boolean needNativeBullet = isUsingNativeBullet(); + if (renderer != null) { if (renderer.startsWith("LWJGL")) { needLWJGL = true; @@ -209,12 +210,17 @@ public class Natives { } needJInput = settings.useJoysticks(); + String libraryPath = getExtractionDir().toString(); if (needLWJGL) { logger.log(Level.INFO, "Extraction Directory: {0}", getExtractionDir().toString()); // LWJGL supports this feature where // it can load libraries from this path. - System.setProperty("org.lwjgl.librarypath", getExtractionDir().toString()); + System.setProperty("org.lwjgl.librarypath", libraryPath); + } + if (needJInput) { + // AND Luckily enough JInput supports the same feature. + System.setProperty("net.java.games.input.librarypath", libraryPath); } switch (platform) {