From 85e284a7b00afef820e962445dffd54f37c6edc8 Mon Sep 17 00:00:00 2001 From: javasabr Date: Tue, 29 Mar 2016 19:13:00 +0300 Subject: [PATCH] moved the magic number to constant --- .../src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java index 89f60fb7f..17c91aa33 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java @@ -67,6 +67,8 @@ public class GlfwMouseInput implements MouseInput { private static final Logger logger = Logger.getLogger(GlfwMouseInput.class.getName()); + private static final int WHEEL_SCALE = 120; + private LwjglWindow context; private RawInputListener listener; private boolean cursorVisible = true; @@ -136,7 +138,7 @@ public class GlfwMouseInput implements MouseInput { glfwSetScrollCallback(context.getWindowHandle(), scrollCallback = new GLFWScrollCallback() { @Override public void invoke(final long window, final double xOffset, final double yOffset) { - onWheelScroll(window, xOffset, yOffset * 120); + onWheelScroll(window, xOffset, yOffset * WHEEL_SCALE); } });