From d31d2c2108e1c28dba9cac20e4602ccb936a442d Mon Sep 17 00:00:00 2001 From: David Fuhrmann Date: Mon, 25 Jun 2012 18:25:04 +0200 Subject: [PATCH] macosx: don't use a private api for standard magnification threshold --- modules/gui/macosx/VideoView.m | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m index 428d187d78..c20feb19e6 100644 --- a/modules/gui/macosx/VideoView.m +++ b/modules/gui/macosx/VideoView.m @@ -40,12 +40,6 @@ #import #import -#import - -@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 ) ) -- 2.39.2