Skip to content

Commit c2e30e6

Browse files
committed
Correct scrolling on OSX
Deltas should be float, otherwise scrolling doesn't work
1 parent 99677ea commit c2e30e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/MacOSAppSupport/MAS_NodeEditorNSViewControl.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ - (void) scrollWheel : (NSEvent*) event
118118
{
119119
NUIE::NodeEditor* nodeEditor = nodeEditorControl->GetNodeEditor ();
120120
NUIE::ModifierKeys modifierKeys = MAS::GetModifierKeysFromEvent (event);
121-
int deltaX = [event scrollingDeltaX];
122-
int deltaY = [event scrollingDeltaY];
121+
float deltaX = [event scrollingDeltaX];
122+
float deltaY = [event scrollingDeltaY];
123123
if ([event subtype] == NSEventSubtypeMouseEvent || [event modifierFlags] & NSEventModifierFlagOption) {
124124
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
125125
NUIE::MouseWheelRotation rotation = NUIE::MouseWheelRotation::Forward;

0 commit comments

Comments
 (0)