macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values

This commit is contained in:
Jan Sedivy
2024-09-06 23:26:39 +02:00
committed by Sam Lantinga
parent 2fa8acb084
commit c2b98e21ba
2 changed files with 18 additions and 1 deletions

View File

@@ -106,8 +106,10 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
+ (void)registerUserDefaults
{
BOOL momentumScrollSupported = (BOOL)SDL_GetHintBoolean(SDL_HINT_MAC_SCROLL_MOMENTUM, false);
NSDictionary *appDefaults = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithBool:NO], @"AppleMomentumScrollSupported",
[NSNumber numberWithBool:momentumScrollSupported], @"AppleMomentumScrollSupported",
[NSNumber numberWithBool:NO], @"ApplePressAndHoldEnabled",
[NSNumber numberWithBool:YES], @"ApplePersistenceIgnoreState",
nil];