Skip to content

Commit

Permalink
Use point delta instead of line delta
Browse files Browse the repository at this point in the history
  • Loading branch information
emreyolcu committed Nov 29, 2016
1 parent 4bfdc6b commit 63c4bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DiscreteScroll/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CGEventRef cgEventCallback(CGEventTapProxy proxy, CGEventType type,
CGEventRef event, void *refcon)
{
if (!CGEventGetIntegerValueField(event, kCGScrollWheelEventIsContinuous)) {
int64_t delta = CGEventGetIntegerValueField(event, kCGScrollWheelEventDeltaAxis1);
int64_t delta = CGEventGetIntegerValueField(event, kCGScrollWheelEventPointDeltaAxis1);

CGEventSetIntegerValueField(event, kCGScrollWheelEventDeltaAxis1, SIGN(delta) * LINES);
}
Expand Down

0 comments on commit 63c4bb1

Please sign in to comment.