Commit 47e8817a authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: save volume on exit

parent 35f470c9
......@@ -507,6 +507,17 @@ static void *Thread( void *obj )
/* Save the path */
getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath );
/* Save volume on exit */
audio_volume_t i_volume;
module_config_t *volconf;
if ( var_InheritBool( p_intf, "qt-autosave-volume" ) )
aout_VolumeGet( p_intf, &i_volume );
else
i_volume = config_GetInt( p_intf, "qt-startvolume" );
config_PutInt( p_intf, "volume", i_volume );
volconf = config_FindConfig( VLC_OBJECT(p_intf), "volume" );
if ( volconf ) volconf->b_autosave = true;
/* Delete the configuration. Application has to be deleted after that. */
delete p_intf->p_sys->mainSettings;
......
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