Update GLFWController.java

This commit is contained in:
ArtDev 2021-08-28 08:54:11 +03:00 committed by GitHub
parent 00deca3360
commit 2b97ff2f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,8 @@ import java.nio.FloatBuffer;
public class GLFWController implements Controller{
int jid;
FloatBuffer axisData;
ByteBuffer buttonData;
FloatBuffer axisData = FloatBuffer.allocate(8);
ByteBuffer buttonData = ByteBuffer.allocate(8);
@Override
public String getName() {
return GLFW.glfwGetJoystickName(jid);
@ -57,8 +57,9 @@ public class GLFWController implements Controller{
@Override
public void poll() {
axisData = GLFW.glfwGetJoystickAxes(jid);
buttonData = GLFW.glfwGetJoystickButtons(jid);
//axisData = GLFW.glfwGetJoystickAxes(jid);
//buttonData = GLFW.glfwGetJoystickButtons(jid);
}
@Override