mirror of https://github.com/mpv-player/mpv
add font free func.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1830 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
aada0e47d2
commit
897670e751
|
@ -134,6 +134,8 @@ void ChangeSkin( void )
|
|||
skinAppMPlayer=&tmpList;
|
||||
ret=skinRead( gtkShMem->sb.name );
|
||||
|
||||
fntFreeFont();
|
||||
|
||||
appInitStruct( &tmpList );
|
||||
skinAppMPlayer=&appMPlayer;
|
||||
appInitStruct( &appMPlayer );
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue