invert mouse wheel count

This commit is contained in:
codeanticode
2015-09-22 14:28:58 -05:00
parent 12b9430b61
commit 0a9e5063ac
+4 -2
View File
@@ -942,8 +942,10 @@ public class PSurfaceJOGL implements PSurface {
int peCount = 0;
if (peAction == MouseEvent.WHEEL) {
peCount = nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0] :
(int)nativeEvent.getRotation()[1];
// Invert wheel rotation count so it matches JAVA2D's
// https://github.com/processing/processing/issues/3840
peCount = -(nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0]:
(int)nativeEvent.getRotation()[1]);
} else {
peCount = nativeEvent.getClickCount();
}