mirror of https://github.com/mpv-player/mpv
Fixed a long standing issue: if configured a not available (not existing, permission denied, ...) skin, the gui never ever started again. Now it reverts to 'default' if it can't open the selected skin, if 'default' fails too, the gui exits with error.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10608 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
56059cf2bd
commit
df56e83ed9
|
@ -186,8 +186,14 @@ void guiInit( void )
|
|||
printf("SKIN dir 1: '%s'\n",skinDirInHome);
|
||||
printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
|
||||
if ( !skinName ) skinName=strdup( "default" );
|
||||
switch ( skinRead( skinName ) )
|
||||
{
|
||||
i = skinRead( skinName );
|
||||
if ((i == -1) && strcmp(skinName,"default"))
|
||||
{
|
||||
mp_msg( MSGT_GPLAYER,MSGL_INFO,"Selected skin ( %s ) not found, trying 'default'...\n", skinName);
|
||||
skinName=strdup( "default" );
|
||||
i = skinRead( skinName );
|
||||
}
|
||||
switch (i) {
|
||||
case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );
|
||||
case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue