Commit 43563679 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: retain the macosx-audio-device across multiple sessions (close #6551)

parent 1b00b4a7
......@@ -1129,6 +1129,10 @@ static VLCMainMenu *_o_sharedInstance = nil;
if( !strcmp( [menuContent name], "fullscreen" ) || !strcmp( [menuContent name], "video-on-top" ) )
var_Set( pl_Get( VLCIntf ), [menuContent name] , [menuContent value] );
/* save our audio device across multiple sessions */
if( !strcmp( [menuContent name], "audio-device" ) )
config_PutInt( VLCIntf, "macosx-audio-device", [menuContent value].i_int );
p_object = [menuContent vlcObject];
if( p_object != NULL )
......
......@@ -618,6 +618,13 @@ static VLCMain *_o_sharedMainInstance = nil;
if( OSX_LION )
b_nativeFullscreenMode = config_GetInt( p_intf, "macosx-nativefullscreenmode" );
#endif
/* recover stored audio device, if set
* in case it was unplugged in the meantime, auhal will fall back on the default */
int i_value = config_GetInt( p_intf, "macosx-audio-device" );
if (i_value > 0)
var_SetInteger( pl_Get( VLCIntf ), "audio-device", i_value );
nib_main_loaded = TRUE;
}
......
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