MacOS edge-scroll broken (especially multi-monitor)
MacOS edge-scroll is totally fubar. A specific case of this is "full screen mode on multi-monitor", where the mouse occasional "escapes" the game screen to the other monitor. This happens whether using "software mouse" or not. Here are the steps to reproduce:
- find a multi-monitor mac
- play LoL in "full screen" mode
- edge-scroll, by bumping the edge of the screen towards the other monitor desktop
- WITNESS: if you do it quickly, the mouse will sometimes leave LOL, ending up on the other desktop.
However, this isn't the only problem with Mac edge-scroll. It's just busted. It seems like it's using Cocoa mouse-events, which are only delivered when the mouse is inside the window. Subjectively, it feels like it "loses" data between when the mouse gets outside the window and when LoL snaps it back in. As a programmer, I know MacOS kinda stinks for gaming direct input. AFAIK, there are two main ways to fix this:
(a) Using Cocoa events - hide the hardware cursor, use a software cursor, and every-mouse-event apply the mouse-delta movement to the software-cursor and reset the hardware mouse position to the middle of the window. This effectively "traps" the mouse in the middle of the game-window, so it can never get anywhere near the edge ... where Cocoa will stop delivering window events. The downside of this is that a software-cursor only moves as fast as the game redraw loop.
(b) Switch to IOKit raw mouse events - use the hardware cursor, use IOKit events to watch the raw mouse-desktop position, so it doesn't "lose" data when the mouse leaves the window. When the mouse goes outside the window, use these IOKit mouse events to quickly reposition the cursor to the edge of the window. Be sure to stop listening to IOKit events when the game is not foreground. The downside of this method is one has to be careful to only listen to mouse-events when appropriate, since otherwise you'll get the raw stream even when other apps are active.
Implementing one of these methods on the mac would go a long way towards making it more playable.