Mercurial > mplayer.hg
comparison Gui/interface.c @ 10607:a17ebe817e33
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.
author | alex |
---|---|
date | Thu, 14 Aug 2003 01:54:27 +0000 |
parents | 57bdcdb061d7 |
children | 73702d2f93ab |
comparison
equal
deleted
inserted
replaced
10606:f9c1b97a71cb | 10607:a17ebe817e33 |
---|---|
184 skinDirInHome=get_path("Skin"); | 184 skinDirInHome=get_path("Skin"); |
185 skinMPlayerDir=MPLAYER_DATADIR "/Skin"; | 185 skinMPlayerDir=MPLAYER_DATADIR "/Skin"; |
186 printf("SKIN dir 1: '%s'\n",skinDirInHome); | 186 printf("SKIN dir 1: '%s'\n",skinDirInHome); |
187 printf("SKIN dir 2: '%s'\n",skinMPlayerDir); | 187 printf("SKIN dir 2: '%s'\n",skinMPlayerDir); |
188 if ( !skinName ) skinName=strdup( "default" ); | 188 if ( !skinName ) skinName=strdup( "default" ); |
189 switch ( skinRead( skinName ) ) | 189 i = skinRead( skinName ); |
190 { | 190 if ((i == -1) && strcmp(skinName,"default")) |
191 { | |
192 mp_msg( MSGT_GPLAYER,MSGL_INFO,"Selected skin ( %s ) not found, trying 'default'...\n", skinName); | |
193 skinName=strdup( "default" ); | |
194 i = skinRead( skinName ); | |
195 } | |
196 switch (i) { | |
191 case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 ); | 197 case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 ); |
192 case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); | 198 case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); |
193 } | 199 } |
194 // --- initialize windows | 200 // --- initialize windows |
195 if ( ( mplDrawBuffer = (unsigned char *)malloc( appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) | 201 if ( ( mplDrawBuffer = (unsigned char *)malloc( appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) |