Commit 14275baf authored by Felix Paul Kühne's avatar Felix Paul Kühne

* design change: the current volume is automatically stored on quit now and...

* design change: the current volume is automatically stored on quit now and restored on first playback of the next run, similar to other major media players (closes #989)
parent 41fc10b7
...@@ -1528,6 +1528,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1528,6 +1528,7 @@ static VLCMain *_o_sharedMainInstance = nil;
{ {
playlist_t * p_playlist; playlist_t * p_playlist;
vout_thread_t * p_vout; vout_thread_t * p_vout;
int returnedValue = 0;
#define p_input p_intf->p_sys->p_input #define p_input p_intf->p_sys->p_input
if( p_input ) if( p_input )
...@@ -1555,6 +1556,14 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1555,6 +1556,14 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
msleep( 500000 ); msleep( 500000 );
/* make sure that the current volume is saved */
config_PutInt( p_intf->p_libvlc, "volume", i_lastShownVolume );
returnedValue = config_SaveConfigFile( p_intf->p_libvlc, "main" );
if( returnedValue != 0 )
msg_Err( p_intf,
"error while saving volume in osx's terminate method (%i)",
returnedValue );
/* save the prefs if they were changed in the extended panel */ /* save the prefs if they were changed in the extended panel */
if (o_extended && [o_extended getConfigChanged]) if (o_extended && [o_extended getConfigChanged])
{ {
......
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