#include <com.badlogic.gdx.controllers.desktop.ois.OisJoystick.h>
-//@line:151
+//@line:157
#include <OISJoyStick.h>
#include <OISInputManager.h>
JNIEXPORT void JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_initialize(JNIEnv* env, jobject object, jobject joystick) {
-//@line:218
+//@line:224
\r
initializeClasses(env, joystick);\r
JNIEXPORT void JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_update(JNIEnv* env, jobject object, jlong joystickPtr, jobject callback) {
-//@line:222
+//@line:228
\r
OIS::JoyStick* joystick = (OIS::JoyStick*)joystickPtr;\r
Listener listener(env, callback);\r
JNIEXPORT jint JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_getAxesCount(JNIEnv* env, jobject object, jlong joystickPtr) {
-//@line:229
+//@line:235
\r
OIS::JoyStick* joystick = (OIS::JoyStick*)joystickPtr;\r
return joystick->getNumberOfComponents(OIS::OIS_Axis);\r
JNIEXPORT jint JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_getButtonCount(JNIEnv* env, jobject object, jlong joystickPtr) {
-//@line:234
+//@line:240
\r
OIS::JoyStick* joystick = (OIS::JoyStick*)joystickPtr;\r
return joystick->getNumberOfComponents(OIS::OIS_Button);\r
JNIEXPORT jint JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_getPovCount(JNIEnv* env, jobject object, jlong joystickPtr) {
-//@line:239
+//@line:245
\r
OIS::JoyStick* joystick = (OIS::JoyStick*)joystickPtr;\r
return joystick->getNumberOfComponents(OIS::OIS_POV);\r
JNIEXPORT jint JNICALL Java_com_badlogic_gdx_controllers_desktop_ois_OisJoystick_getSliderCount(JNIEnv* env, jobject object, jlong joystickPtr) {
-//@line:244
+//@line:250
\r
OIS::JoyStick* joystick = (OIS::JoyStick*)joystickPtr;\r
return joystick->getNumberOfComponents(OIS::OIS_Slider);\r
if(mBuffered && mListener)
{
- if(event.value == 0)
+ if(event.value == 1)
mListener->buttonPressed(JoyStickEvent(this, mState), button);
- else if(event.value == 1)
+ else if(event.value == 0)
mListener->buttonReleased(JoyStickEvent(this, mState), button);
}
break;
if(mBuffered && mListener)
{
- if(event.value == 0)
+ if(event.value == 1)
mListener->buttonPressed(JoyStickEvent(this, mState), button);
- else if(event.value == 1)
+ else if(event.value == 0)
mListener->buttonReleased(JoyStickEvent(this, mState), button);
}
break;
mac.libraries = "-framework CoreServices -framework Carbon -framework IOKit -framework Cocoa";
new AntScriptGenerator().generate(buildConfig, win32home, win32, win64, lin32, lin64, mac);
- if(!BuildExecutor.executeAnt("jni/build-macosx32.xml", "-Dhas-compiler=true -v postcompile")) {
+ if(!BuildExecutor.executeAnt("jni/build-macosx32.xml", "-Dhas-compiler=true -v clean postcompile")) {
throw new Exception("build failed");
}
BuildExecutor.executeAnt("jni/build.xml", "pack-natives");
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");\r
new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");\r
new SharedLibraryLoader("../../extensions/gdx-freetype/libs/gdx-freetype-natives.jar").load("gdx-freetype");\r
-// new SharedLibraryLoader("../../extensions/gdx-controllers/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");\r
+ new SharedLibraryLoader("../../extensions/gdx-controllers/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar").load("gdx-controllers-desktop");\r
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");\r
\r
- GdxTest test = new InverseKinematicsTest();\r
+ GdxTest test = new GamepadTest();\r
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();\r
config.useGL20 = test.needsGL20();\r
new LwjglApplication(test, config);\r