Browse Source

Fix for building in older OSX versions.

tags/2021-05-28
jules 13 years ago
parent
commit
b36708e3f3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 2
- 2
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -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…
Cancel
Save