Mercurial > mplayer.hg
changeset 1829:a4156c8cdd57
add font free func.
author | pontscho |
---|---|
date | Sat, 01 Sep 2001 19:57:44 +0000 |
parents | 60afe3421c04 |
children | 46347c4075da |
files | Gui/mplayer/play.c Gui/skin/font.c Gui/skin/font.h |
diffstat | 3 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/play.c Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/mplayer/play.c Sat Sep 01 19:57:44 2001 +0000 @@ -134,6 +134,8 @@ skinAppMPlayer=&tmpList; ret=skinRead( gtkShMem->sb.name ); + fntFreeFont(); + appInitStruct( &tmpList ); skinAppMPlayer=&appMPlayer; appInitStruct( &appMPlayer );
--- a/Gui/skin/font.c Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/skin/font.c Sat Sep 01 19:57:44 2001 +0000 @@ -23,8 +23,18 @@ 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 )
--- a/Gui/skin/font.h Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/skin/font.h Sat Sep 01 19:57:44 2001 +0000 @@ -22,7 +22,7 @@ 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 );