mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
invert mouse wheel count
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user