mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix for building in older OSX versions.
This commit is contained in:
parent
746331a88a
commit
b36708e3f3
1 changed files with 2 additions and 2 deletions
|
|
@ -1593,12 +1593,11 @@ void NSViewComponentPeer::redirectMouseWheel (NSEvent* ev)
|
|||
if ([ev respondsToSelector: @selector (isDirectionInvertedFromDevice)])
|
||||
wheel.isReversed = [ev isDirectionInvertedFromDevice];
|
||||
|
||||
const float scale = 0.5f / 256.0f;
|
||||
|
||||
if ([ev respondsToSelector: @selector (hasPreciseScrollingDeltas)])
|
||||
{
|
||||
if ([ev hasPreciseScrollingDeltas])
|
||||
{
|
||||
const float scale = 0.5f / 256.0f;
|
||||
wheel.deltaX = [ev scrollingDeltaX] * scale;
|
||||
wheel.deltaY = [ev scrollingDeltaY] * scale;
|
||||
wheel.isSmooth = true;
|
||||
|
|
@ -1607,6 +1606,7 @@ void NSViewComponentPeer::redirectMouseWheel (NSEvent* ev)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
const float scale = 0.5f / 256.0f;
|
||||
wheel.deltaX = [ev deviceDeltaX] * scale;
|
||||
wheel.deltaY = [ev deviceDeltaY] * scale;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue