Add system scroll-acceleration property

This commit is contained in:
Jack Andersen 2015-12-31 14:15:34 -10:00
parent ce9d877cfa
commit 9c17350524
2 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ struct SScrollDelta
{
double delta[2];
bool isFine; /* Use system-scale fine-scroll (for scrollable-trackpads) */
bool isAccelerated = false; /* System performs acceleration computation */
SScrollDelta operator+(const SScrollDelta& other)
{return {{delta[0] + other.delta[0], delta[1] + other.delta[1]}, isFine || other.isFine};}

View File

@ -819,7 +819,7 @@ static inline boo::EMouseButton getButton(NSEvent* event)
boo::SScrollDelta scroll =
{
{(float)[theEvent scrollingDeltaX], (float)[theEvent scrollingDeltaY]},
(bool)[theEvent hasPreciseScrollingDeltas]
(bool)[theEvent hasPreciseScrollingDeltas], true
};
booContext->m_callback->scroll(coord, scroll);
[textContext handleEvent:theEvent];