GithubHelp home page GithubHelp logo

ralleytn / xinput-plugin-for-jinput Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 3.0 4.63 MB

A plugin for JInput that provides support for XInput gamepads

License: MIT License

Java 100.00%
jinput xinput java input gamepad xbox controller direct-input jna java-11

xinput-plugin-for-jinput's People

Contributors

ralleytn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

xinput-plugin-for-jinput's Issues

Migrate to Maven Central

Would you be willing to consider migrating to Maven Central (OSSRH) with future releases? The reason for my request is that I simply don't find JitPack reliable enough for commercial purposes (with deadlines). I publish my open source projects to Maven Central and I've been much more happy with their service stability.

For the last 3 hours, I haven't been able to build my project on GitHub, due to JitPack issues:

Execution failed for task ':game:app:kaptGenerateStubsKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':game:app:kaptGenerateStubsKotlin'
   > Could not resolve all files for configuration ':game:app:compileClasspath'.
      > Could not resolve com.github.RalleYTN:XInput-Wrapper:1.2.1.
        Required by:
            project :game:app
         > Could not resolve com.github.RalleYTN:XInput-Wrapper:1.2.1.
            > Could not get resource 'https://jitpack.io/com/github/RalleYTN/XInput-Wrapper/1.2.1/XInput-Wrapper-1.2.1.pom'.
               > Could not GET 'https://jitpack.io/com/github/RalleYTN/XInput-Wrapper/1.2.1/XInput-Wrapper-1.2.1.pom'. Received status code 521 from server: 
      > Could not resolve com.github.RalleYTN:XInput-Plugin-for-JInput:1.2.0.
        Required by:
            project :game:app
         > Could not resolve com.github.RalleYTN:XInput-Plugin-for-JInput:1.2.0.
            > Could not get resource 'https://jitpack.io/com/github/RalleYTN/XInput-Plugin-for-JInput/1.2.0/XInput-Plugin-for-JInput-1.2.0.pom'.
               > Could not GET 'https://jitpack.io/com/github/RalleYTN/XInput-Plugin-for-JInput/1.2.0/XInput-Plugin-for-JInput-1.2.0.pom'. Received status code 521 from server: 

despite JitPack claiming it is fully operational: https://status.jitpack.io/
It's not the first time I had this kind of issue in various projects with JitPack specifically.

In the meantime, I've downloaded jars and embedded them in the project, but it's rather a temporary workaround for me.

XIRumbler is broken

Calling rumbler.rumble(0.0F) makes the controller rumble when it shouldn't. I wondered why it is and I noticed the rumble() method.

this.vibration.wRightMotorSpeed = (short)((int)(intensity * MAX_VALUE) + Short.MIN_VALUE);

this.vibration.wLeftMotorSpeed = (short)((int)(intensity * MAX_VALUE) + Short.MIN_VALUE);

I think the use of Short.MIN_VALUE is invalid. The motor speed was being set to some ridiculous values, simply removing the + Short.MIN_VALUE worked fine for me. I think you may want to use Math.max() instead if you want values in a specific range.

This current version is making an intensity of 0.0F result in -32768, an intensity of 1.0F result in 32767, and an intensity of 0.5F result in -1, when it should be between 0 and 65535.

I simply removed the + Short.MIN_VALUE part for both and it worked fine.

Incorrect module-info.java

Hello, trying to use your library via maven (via jitpack). However, its build on jitpack is failing I believe primarily due to issues with module-info.java. Here is the full jitpack log; what follows below is the error section from that log:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XIControllerTestFrame.java:[26,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XIControllerTestFrame.java:[27,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/CheckList.java:[29,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/CheckList.java:[30,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/CheckList.java:[31,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/CheckList.java:[32,13] package javax.swing is not visible
  (package javax.swing is declared in module java.desktop, but module de.ralleytn.plugins.jinput.xinput does not read it)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XIControllerTestFrame.java:[61,21] cannot find symbol
  symbol: method pack()
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XIControllerTestFrame.java:[62,21] cannot find symbol
  symbol: method setLocationRelativeTo(<nulltype>)
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XInputPluginTest.java:[111,22] cannot find symbol
  symbol:   method setVisible(boolean)
  location: variable frame of type de.ralleytn.plugins.jinput.xinput.tests.XIControllerTestFrame
[ERROR] /home/jitpack/build/src/test/java/de/ralleytn/plugins/jinput/xinput/tests/XInputPluginTest.java:[204,22] cannot find symbol
  symbol:   method dispose()
  location: variable frame of type de.ralleytn.plugins.jinput.xinput.tests.XIControllerTestFrame
[INFO] 10 errors 

Version 1.0.0 works just fine - so I think the primary issue is just this module-info.java file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.