Permalink
Browse files

Public Release 1.1.0: Fixed: Could send data only once

  • Loading branch information...
1 parent 0542de4 commit e396e42f71b0cce4df45b806aeb6afdc9050d783 @dumbledore committed Jan 5, 2011
Showing with 19 additions and 1 deletion.
  1. +3 −1 src/org/flypad/joystick/Joystick.java
  2. +16 −0 src/org/flypad/joystick/jna/TempStruct.java
View
4 src/org/flypad/joystick/Joystick.java
@@ -11,6 +11,7 @@
import com.sun.jna.Pointer;
import com.sun.jna.examples.win32.Kernel32;
import com.sun.jna.examples.win32.W32API.HANDLE;
+import org.flypad.joystick.jna.TempStruct;
/**
*
@@ -29,6 +30,7 @@
*/
public final byte[] digital = new byte[NUM_DIGITAL];
+ private final TempStruct temp = new TempStruct();
private HANDLE handle = null;
private final JoystickState state = new JoystickState();
@@ -115,7 +117,7 @@ public final void send() throws JoystickException {
size,
Pointer.NULL,
0,
- state.getPointer(),
+ temp.getPointer(),
null
);
View
16 src/org/flypad/joystick/jna/TempStruct.java
@@ -0,0 +1,16 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.flypad.joystick.jna;
+
+import com.sun.jna.Structure;
+
+/**
+ *
+ * @author albus
+ */
+public class TempStruct extends Structure {
+ public int somevalue = 0;
+}

0 comments on commit e396e42

Please sign in to comment.