Closed SDLBugzilla closed 1 month ago
@mcourteaux , I'm not having success in using your hack for enabling scroll momentum. From what part of the code should you call that function? Just after SDL_Init() ?
@mcourteaux , I'm not having success in using your hack for enabling scroll momentum. From what part of the code should you call that function? Just after SDL_Init() ?
Indeed, I was calling it right after SDL_Init()
. I haven't tested this in a while on my MacBook so I can't confirm this still works, but that's where the call to that code is...
For the record, I have one file macos.mm
containing:
#import <Foundation/Foundation.h>
void MACOS_enable_scroll_momentum() {
[[NSUserDefaults standardUserDefaults]
setBool: YES forKey: @"AppleMomentumScrollSupported"];
}
Good luck!
Make sure you have SDL_INIT_EVENTS
included in the bitmask to the SDL_Init()
call.
Thank you very much @mcourteaux !! Yes, it works, I made a dumb mistake but now it works perfectly. Thanks!
I'm going to reopen this for SDL 3.0, we can add a hint to enable momentum scrolling.
Yes, while I agree games don't want momentum, however, non-games are likely to prefer it (at least in my case, I do). And not only when panning through a 2D image/drawing, but even when 3D panning in a 3D scene: the Trackpad in the Mac feels weird when momentum is disabled (except in games, of course).
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.4 Reported for operating system, platform: Mac OS X 10.11, All
Comments on the original bug report:
On 2016-05-26 10:33:00 +0000, Martijn Courteaux wrote:
On 2016-05-27 17:04:29 +0000, Alex Szpakowski wrote:
On 2016-05-27 18:00:32 +0000, Martijn Courteaux wrote:
On 2016-05-31 21:17:56 +0000, Martijn Courteaux wrote:
On 2017-08-12 02:20:36 +0000, Sam Lantinga wrote:
On 2019-08-23 13:24:20 +0000, Martijn Courteaux wrote: