Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GamepadManager does not detect any added controllers #429

Open
ecchilds opened this issue Dec 9, 2021 · 1 comment
Open

GamepadManager does not detect any added controllers #429

ecchilds opened this issue Dec 9, 2021 · 1 comment
Labels

Comments

@ecchilds
Copy link
Contributor

ecchilds commented Dec 9, 2021

Describe the bug
Game does not detect any added gamepad when I plug one into my computer. I have an event listener to detect when the gamepad is added, but the listener never runs.

Stack Trace

Dec 08, 2021 6:19:44 PM de.gurkenlabs.litiengine.configuration.Configuration load
INFO: Configuration config.properties created
java.lang.UnsatisfiedLinkError: no jinput-dx8_64 in java.library.path: C:\Users\caspar\.jdks\openjdk-17.0.1\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\caspar\AppData\Local\Microsoft\WindowsApps;C:\Users\caspar\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\caspar\AppData\Local\GitHubDesktop\bin;.
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
	at java.base/java.lang.System.loadLibrary(System.java:1989)
	at net.java.games.input.DirectInputEnvironmentPlugin.lambda$loadLibrary$0(DirectInputEnvironmentPlugin.java:73)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at net.java.games.input.DirectInputEnvironmentPlugin.loadLibrary(DirectInputEnvironmentPlugin.java:67)
	at net.java.games.input.DirectInputEnvironmentPlugin.<clinit>(DirectInputEnvironmentPlugin.java:98)
	at net.java.games.input.DirectAndRawInputEnvironmentPlugin.<init>(DirectAndRawInputEnvironmentPlugin.java:45)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:134)
	at de.gurkenlabs.litiengine.input.GamepadManager.updateGamepads(GamepadManager.java:307)
	at de.gurkenlabs.litiengine.input.GamepadManager.<init>(GamepadManager.java:90)
	at de.gurkenlabs.litiengine.input.Input$InputGameAdapter.init(Input.java:106)
	at de.gurkenlabs.litiengine.input.Input$InputGameAdapter.initialized(Input.java:83)
	at de.gurkenlabs.litiengine.Game.init(Game.java:493)
	at com.gradle.game.GameApp.main(GameApp.java:14)
java.lang.UnsatisfiedLinkError: no jinput-raw_64 in java.library.path: C:\Users\caspar\.jdks\openjdk-17.0.1\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\caspar\AppData\Local\Microsoft\WindowsApps;C:\Users\caspar\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\caspar\AppData\Local\GitHubDesktop\bin;.
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
	at java.base/java.lang.System.loadLibrary(System.java:1989)
	at net.java.games.input.RawInputEnvironmentPlugin.lambda$loadLibrary$0(RawInputEnvironmentPlugin.java:73)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at net.java.games.input.RawInputEnvironmentPlugin.loadLibrary(RawInputEnvironmentPlugin.java:67)
	at net.java.games.input.RawInputEnvironmentPlugin.<clinit>(RawInputEnvironmentPlugin.java:98)
	at net.java.games.input.DirectAndRawInputEnvironmentPlugin.<init>(DirectAndRawInputEnvironmentPlugin.java:46)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:134)
	at de.gurkenlabs.litiengine.input.GamepadManager.updateGamepads(GamepadManager.java:307)
	at de.gurkenlabs.litiengine.input.GamepadManager.<init>(GamepadManager.java:90)
	at de.gurkenlabs.litiengine.input.Input$InputGameAdapter.init(Input.java:106)
	at de.gurkenlabs.litiengine.input.Input$InputGameAdapter.initialized(Input.java:83)
	at de.gurkenlabs.litiengine.Game.init(Game.java:493)
	at com.gradle.game.GameApp.main(GameApp.java:14)
Dec 08, 2021 6:13:17 PM net.java.games.input.ControllerEnvironment log
INFO: net.java.games.input.DirectAndRawInputEnvironmentPlugin is not supported

To Reproduce
This error occurs whenever I set input_gamepadSupport to true in config.properties.

This error may be due to natives not being set up correctly. However, after following this guide, I get this error when running gradle includeNatives:

Execution failed for task ':includeNatives'.
> Configuration with name 'runtime' not found.

Expected behavior
Gamepad added listener should run when a gamepad is added.

Your System:

  • OS: Windows 10
  • IDE: IntelliJ
  • LITIENGINE version: 0.5.1-beta
  • Java JDK/JRE version: jdk16.0.1
  • Gradle version: 7.1

Additional context
Here's the relevant code (the breakpoint is never reached):
image

Here's a screenshot of my build.gradle file:
image

Let me know if I should re-categorize this, if it's not a bug.

@ecchilds ecchilds added the bug label Dec 9, 2021
@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Thank you for your reporting your first LITIENGINE issue! We are looking forward to your further contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant