forked from mia/Aegisub
Don't invert horizontal scroll on the audio display on OS X
For some reason horizontal scroll comes pre-flipped. Closes #1612.
This commit is contained in:
parent
8e491a9ecc
commit
4c71fcc51b
1 changed files with 4 additions and 0 deletions
|
@ -152,9 +152,13 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) {
|
||||||
if (!zoom)
|
if (!zoom)
|
||||||
{
|
{
|
||||||
int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3);
|
int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3);
|
||||||
|
|
||||||
// If the user did a horizontal scroll the amount should be inverted
|
// If the user did a horizontal scroll the amount should be inverted
|
||||||
// for it to be natural.
|
// for it to be natural.
|
||||||
|
// On OS X it's pre-flipped for some reason.
|
||||||
|
#ifndef __APPLE__
|
||||||
if (evt.GetWheelAxis() == 1) amount = -amount;
|
if (evt.GetWheelAxis() == 1) amount = -amount;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Reset any accumulated zoom
|
// Reset any accumulated zoom
|
||||||
mouse_zoom_accum = 0;
|
mouse_zoom_accum = 0;
|
||||||
|
|
Loading…
Reference in a new issue