Преглед на файлове

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
J?rgen P. Tjern? преди 11 години
родител
ревизия
d6b1218b46
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      src/video/cocoa/SDL_cocoaevents.m

+ 4 - 1
src/video/cocoa/SDL_cocoaevents.m

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