Mercurial > mplayer.hg
comparison Gui/skin/skin.c @ 6218:8cfddba867b4
fix text render chrash ...
author | pontscho |
---|---|
date | Tue, 28 May 2002 11:55:17 +0000 |
parents | 436cf6ef67fd |
children | 4b2459557340 |
comparison
equal
deleted
inserted
replaced
6217:d2167f69a48b | 6218:8cfddba867b4 |
---|---|
27 char p[512]; | 27 char p[512]; |
28 va_list ap; | 28 va_list ap; |
29 va_start( ap,format ); | 29 va_start( ap,format ); |
30 vsnprintf( p,512,format,ap ); | 30 vsnprintf( p,512,format,ap ); |
31 va_end( ap ); | 31 va_end( ap ); |
32 // message( False,"[skin] error in skin config file on line %d: %s",linenumber,p ); | |
33 // message( False,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); | |
34 mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); | 32 mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); |
35 } | 33 } |
36 | 34 |
37 #define CHECKDEFLIST( str ) \ | 35 #define CHECKDEFLIST( str ) \ |
38 { \ | 36 { \ |
412 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] name: %s\n",name ); | 410 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] name: %s\n",name ); |
413 | 411 |
414 defList->NumberOfItems++; | 412 defList->NumberOfItems++; |
415 item=&defList->Items[ defList->NumberOfItems ]; | 413 item=&defList->Items[ defList->NumberOfItems ]; |
416 item->type=itFont; | 414 item->type=itFont; |
417 item->fontid=fntAddNewFont( name ); | 415 item->fontid=fntRead( path,name ); |
418 switch ( item->fontid ) | 416 switch ( item->fontid ) |
419 { | 417 { |
420 case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; | 418 case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; |
421 case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_TooManyFontsDeclared ); return 1; | 419 case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_TooManyFontsDeclared ); return 1; |
422 } | 420 case -3: ERRORMESSAGE( MSGTR_SKIN_FONT_FontFileNotFound ); return 1; |
423 | 421 case -4: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; |
424 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin] id: %s ( %d )\n",id,item->fontid ); | 422 } |
425 | |
426 switch ( fntRead( path,name,item->fontid ) ) | |
427 { | |
428 case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_FontFileNotFound ); return 1; | |
429 case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; | |
430 } | |
431 | |
432 return 0; | 423 return 0; |
433 } | 424 } |
434 | 425 |
435 int __slabel( char * in ) | 426 int __slabel( char * in ) |
436 { | 427 { |