Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+

Due to the new "tap and hold" IME in Mountain Lion and above, we were getting
inconsistent repeat of SDL_TEXTINPUT events. Disabling that functionality (since
you can't see the popover anyway) solves this.

Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2387
This commit is contained in:
J?rgen P. Tjern? 2014-02-24 16:42:08 -08:00
parent 6ee12d6ccc
commit d6b1218b46

View file

@ -271,7 +271,10 @@ Cocoa_RegisterApp(void)
CreateApplicationMenus(); CreateApplicationMenus();
} }
[NSApp finishLaunching]; [NSApp finishLaunching];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"AppleMomentumScrollSupported"]; NSDictionary *appDefaults = @{
@"AppleMomentumScrollSupported": @NO,
@"ApplePressAndHoldEnabled": @NO,
};
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
} }