From 14275baf39c03cdb75faf38ba25ed1d31191609c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Sun, 14 Jan 2007 12:40:05 +0000 Subject: [PATCH] * 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) --- modules/gui/macosx/intf.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index e3da93f863..7a572336e2 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -1528,6 +1528,7 @@ static VLCMain *_o_sharedMainInstance = nil; { playlist_t * p_playlist; vout_thread_t * p_vout; + int returnedValue = 0; #define p_input p_intf->p_sys->p_input if( p_input ) @@ -1554,6 +1555,14 @@ static VLCMain *_o_sharedMainInstance = nil; msleep( 100000 ); } 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 */ if (o_extended && [o_extended getConfigChanged]) -- 2.39.2