Commit 717f28a0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed setting the following options on the command line:...

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
parent 408240ed
......@@ -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];
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment