| Summary: | Trackpad scrolling on OSX broken | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Oskar Linde <oskar.linde> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | oskar.linde |
| Version: | HG 1.2 | ||
| Hardware: | PowerPC | ||
| OS: | Mac OS X 10.4 (Intel) | ||
This is fixed in revision 3460, thanks! |
Trackpad scrolling on OSX is broken. Scrolling up/slightly right gets translated into a Down event in SDL. The following patch fixes this extremely irritating issue: Index: SDL_QuartzEvents.m =================================================================== --- SDL_QuartzEvents.m (revision 3451) +++ SDL_QuartzEvents.m (working copy) @@ -930,10 +930,12 @@ Uint8 button; dy = [ event deltaY ]; dx = [ event deltaX ]; - if ( dy > 0.0 || dx > 0.0 ) /* Scroll up */ + if ( dy > 0.0 ) /* Scroll up */ button = SDL_BUTTON_WHEELUP; - else /* Scroll down */ + else if ( dy < 0.0 ) /* Scroll down */ button = SDL_BUTTON_WHEELDOWN; + else + break; /* Horizontal scroll */ /* For now, wheel is sent as a quick down+up */ SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0); SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0);