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

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

(cherry picked from commit 4356367929b95f61fae9e98b0d94743ec807701c)
parent e7776651
......@@ -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 )
......
......@@ -617,6 +617,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