[Mplayer-cvslog] CVS: main/Gui/skin font.c,1.1,1.2 font.h,1.1,1.2

Zoltan Ponekker pontscho at mplayer.dev.hu
Sat Sep 1 21:57:36 CEST 2001


Update of /cvsroot/mplayer/main/Gui/skin
In directory mplayer:/var/tmp.root/cvs-serv15945

Modified Files:
	font.c font.h 
Log Message:
add font free func.

Index: font.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/skin/font.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- font.c	25 Aug 2001 21:04:29 -0000	1.1
+++ font.c	1 Sep 2001 19:57:34 -0000	1.2
@@ -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 )

Index: font.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/skin/font.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- font.h	25 Aug 2001 21:04:29 -0000	1.1
+++ font.h	1 Sep 2001 19:57:34 -0000	1.2
@@ -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 );




More information about the MPlayer-cvslog mailing list