add font free func.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1830 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2001-09-01 19:57:44 +00:00
parent aada0e47d2
commit 897670e751
3 changed files with 14 additions and 2 deletions

View File

@ -134,6 +134,8 @@ void ChangeSkin( void )
skinAppMPlayer=&tmpList;
ret=skinRead( gtkShMem->sb.name );
fntFreeFont();
appInitStruct( &tmpList );
skinAppMPlayer=&appMPlayer;
appInitStruct( &appMPlayer );

View File

@ -23,8 +23,18 @@ int fntAddNewFont( char * name )
return id;
}
void fntFreeFont( int id )
void fntFreeFont( void )
{
int i;
for( i=0;i<25;i++ )
{
if ( Fonts[i] )
{
if ( Fonts[i]->Bitmap.Image ) free( Fonts[i]->Bitmap.Image );
free( Fonts[i] );
Fonts[i]=NULL;
}
}
}
int fntRead( char * path,char * fname,int id )

View File

@ -22,7 +22,7 @@ extern txSample Bitmap;
extern bmpFont * Fonts[25];
extern int fntAddNewFont( char * name );
extern void fntFreeFont( int id );
extern void fntFreeFont( void );
extern int fntFindID( char * name );
extern int fntRead( char * path,char * fname,int id );