[Mplayer-cvslog] CVS: main/Gui interface.c,1.87,1.88

Alex Beregszaszi alex at mplayerhq.hu
Thu Aug 14 03:54:55 CEST 2003


Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv9214

Modified Files:
	interface.c 
Log Message:
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.

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- interface.c	13 Aug 2003 16:29:25 -0000	1.87
+++ interface.c	14 Aug 2003 01:54:27 -0000	1.88
@@ -186,8 +186,14 @@
  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 );
   }



More information about the MPlayer-cvslog mailing list