1
0
Fork 0
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:
jules 2012-05-26 10:48:44 +01:00
parent 746331a88a
commit b36708e3f3

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;
}