summaryrefslogtreecommitdiff
path: root/src/ui/macos.m
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 08:20:24 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 08:20:32 +0300
commit4a03c76b436bf0fe27b33039b12f034b85b27341 (patch)
treeb345c060fcea2debc08fa04d20ce48a5e69a4e22 /src/ui/macos.m
parentaacb723fa99bb59bd7dcf94d089fc004a171f82d (diff)
macOS: Smooth inertia scrolling with trackpad
Requires a slightly tweaked SDL 2, though, when it comes to handling the scroll events.
Diffstat (limited to 'src/ui/macos.m')
-rw-r--r--src/ui/macos.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/macos.m b/src/ui/macos.m
index b50fbf38..46d2bfa1 100644
--- a/src/ui/macos.m
+++ b/src/ui/macos.m
@@ -98,7 +98,7 @@ enum iTouchBarVariant {
98//- (NSTouchBar *)makeTouchBar; 98//- (NSTouchBar *)makeTouchBar;
99/* SDL needs to do its own thing. */ 99/* SDL needs to do its own thing. */
100- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename; 100- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
101- (void)applicationDidFinishLaunching:(NSNotification *)notificatiosn; 101- (void)applicationDidFinishLaunching:(NSNotification *)notifications;
102@end 102@end
103 103
104@implementation MyDelegate 104@implementation MyDelegate
@@ -333,6 +333,11 @@ enum iTouchBarVariant {
333 333
334@end 334@end
335 335
336void enableWheel_MacOS(void) {
337 [[NSUserDefaults standardUserDefaults] setBool: YES
338 forKey: @"AppleMomentumScrollSupported"];
339}
340
336void setupApplication_MacOS(void) { 341void setupApplication_MacOS(void) {
337 NSApplication *app = [NSApplication sharedApplication]; 342 NSApplication *app = [NSApplication sharedApplication];
338 /* Our delegate will override SDL's delegate. */ 343 /* Our delegate will override SDL's delegate. */