[vlc-commits] macosx: fixed setting the following options on the command line: ' macosx-vdev', 'macosx-nativefullscreenmode', 'macosx-video-autoresize', ' macosx-black', 'macosx-mediakeys', 'macosx-appleremote'

Felix Paul Kühne git at videolan.org
Thu Aug 16 13:49:44 CEST 2012


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Aug 16 13:49:32 2012 +0200| [717f28a0767a23c8b960a149f3873b9c1fcabaea] | committer: Felix Paul Kühne

macosx: fixed setting the following options on the command line: 'macosx-vdev', 'macosx-nativefullscreenmode', 'macosx-video-autoresize', 'macosx-black', 'macosx-mediakeys', 'macosx-appleremote'

This also closes #5892.

This is a manual backport of 7f0b026896bf32365a641b54bc9d88d95d45885d

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=717f28a0767a23c8b960a149f3873b9c1fcabaea
---

 modules/gui/macosx/MainWindow.m |   10 +++++-----
 modules/gui/macosx/intf.m       |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index ae1e897..751bf62 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -163,7 +163,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
     if( OSX_LION && b_video_deco )
-        b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
+        b_nativeFullscreenMode = var_InheritBool( VLCIntf, "macosx-nativefullscreenmode" );
 #endif
     i_lastShownVolume = -1;
     t_hide_mouse_timer = nil;
@@ -1719,7 +1719,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 {
     nativeVideoSize = size;
 
-    if( config_GetInt( VLCIntf, "macosx-video-autoresize" ) && !b_fullscreen )
+    if( var_InheritBool( VLCIntf, "macosx-video-autoresize" ) && !b_fullscreen )
         [self performSelectorOnMainThread:@selector(resizeWindow) withObject:nil waitUntilDone:NO];
 }
 
@@ -1782,10 +1782,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
     NSScreen *screen;
     NSRect screen_rect;
     NSRect rect;
-    BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
+    BOOL blackout_other_displays = var_InheritBool( VLCIntf, "macosx-black" );
     id o_videoWindow = b_nonembedded ? o_detached_video_window : self;
 
-    screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)config_GetInt( VLCIntf, "macosx-vdev" )];
+    screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger( VLCIntf, "macosx-vdev" )];
     [self lockFullscreenAnimation];
 
     if (!screen)
@@ -1970,7 +1970,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 {
     NSMutableDictionary *dict1, *dict2;
     NSRect frame;
-    BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
+    BOOL blackout_other_displays = var_InheritBool( VLCIntf, "macosx-black" );
 
     [self lockFullscreenAnimation];
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 16b49a1..917b6a5 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -621,12 +621,12 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     [o_msgs_refresh_btn setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
 
-     BOOL b_video_deco = config_GetInt( VLCIntf, "video-deco" );
+     BOOL b_video_deco = var_InheritBool( VLCIntf, "video-deco" );
     /* yeah, we are done */
     b_nativeFullscreenMode = NO;
 #ifdef MAC_OS_X_VERSION_10_7
     if( OSX_LION && b_video_deco )
-        b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
+        b_nativeFullscreenMode = var_InheritBool( p_intf, "macosx-nativefullscreenmode" );
 #endif
 
     /* recover stored audio device, if set
@@ -665,7 +665,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_mainwindow makeKeyAndOrderFront: self];
 
     /* init media key support */
-    b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
+    b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
     if( b_mediaKeySupport )
     {
         o_mediaKeyController = [[SPMediaKeyTap alloc] initWithDelegate:self];
@@ -893,7 +893,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 - (void)applicationDidBecomeActive:(NSNotification *)aNotification
 {
     if( !p_intf ) return;
-    if( config_GetInt( p_intf, "macosx-appleremote" ) == YES )
+    if( var_InheritBool( p_intf, "macosx-appleremote" ) == YES )
         [o_remote startListening: self];
 }
 - (void)applicationDidResignActive:(NSNotification *)aNotification
@@ -2166,7 +2166,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
 }
 - (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification
 {
-    b_mediaKeySupport = config_GetInt( VLCIntf, "macosx-mediakeys" );
+    b_mediaKeySupport = var_InheritBool( VLCIntf, "macosx-mediakeys" );
     if (b_mediaKeySupport)
     {
         if (!o_mediaKeyController)



More information about the vlc-commits mailing list