]> git.sesse.net Git - vlc/commitdiff
macosx: don't use a private api for standard magnification threshold
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Mon, 25 Jun 2012 16:25:04 +0000 (18:25 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Mon, 25 Jun 2012 16:25:04 +0000 (18:25 +0200)
modules/gui/macosx/VideoView.m

index 428d187d7864a9a3d242449ad403afda0913f6e3..c20feb19e6ee346817e449ff7152621d0b78fcb5 100644 (file)
 #import <vlc_common.h>
 #import <vlc_keys.h>
 
-#import <AppKit/NSEvent.h>
-
-@interface NSEvent (Undocumented)
-+ (CGFloat)standardMagnificationThreshold;
-@end
-
 /*****************************************************************************
  * DeviceCallback: Callback triggered when the video-device variable is changed
  *****************************************************************************/
@@ -263,7 +257,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 - (void)magnifyWithEvent:(NSEvent *)event
 {
     f_cumulated_magnification += [event magnification];
-    CGFloat f_threshold = [NSEvent standardMagnificationThreshold];
+
+    // This is the result of [NSEvent standardMagnificationThreshold].
+    // Unfortunately, this is a private API, currently.
+    CGFloat f_threshold = 0.3;
     BOOL b_fullscreen = [[VLCMainWindow sharedInstance] isFullscreen];
 
     if( ( f_cumulated_magnification > f_threshold && !b_fullscreen ) || ( f_cumulated_magnification < -f_threshold && b_fullscreen ) )