From 4c71fcc51bf25e450b245929e968ff63692ef181 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 25 May 2013 07:04:59 -0700 Subject: [PATCH] Don't invert horizontal scroll on the audio display on OS X For some reason horizontal scroll comes pre-flipped. Closes #1612. --- aegisub/src/audio_box.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/audio_box.cpp b/aegisub/src/audio_box.cpp index 9015da521..79066dd8b 100644 --- a/aegisub/src/audio_box.cpp +++ b/aegisub/src/audio_box.cpp @@ -152,9 +152,13 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) { if (!zoom) { int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3); + // If the user did a horizontal scroll the amount should be inverted // for it to be natural. + // On OS X it's pre-flipped for some reason. +#ifndef __APPLE__ if (evt.GetWheelAxis() == 1) amount = -amount; +#endif // Reset any accumulated zoom mouse_zoom_accum = 0;