mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
fix playtree bug. but ... i dont' see this ... bazmeg
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4849 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
bccc26f973
commit
c31e49a4d5
@ -100,8 +100,9 @@ extern void guiInit( int argc,char* argv[], char *envp[] );
|
|||||||
extern void guiGetEvent( int type,char * arg );
|
extern void guiGetEvent( int type,char * arg );
|
||||||
extern void guiEventHandling( void );
|
extern void guiEventHandling( void );
|
||||||
|
|
||||||
#define guiSetFilename( s,n ) \
|
#define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); }
|
||||||
{ if ( s ) free( s ); s=NULL; s=strdup( n ); }
|
|
||||||
|
#define guiSetFilename( s,n ) { s=strdup( n ); }
|
||||||
|
|
||||||
#define guiSetDF( s,d,n ) \
|
#define guiSetDF( s,d,n ) \
|
||||||
{ \
|
{ \
|
||||||
@ -110,4 +111,4 @@ extern void guiEventHandling( void );
|
|||||||
sprintf( s,"%s/%s",d,n ); \
|
sprintf( s,"%s/%s",d,n ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -121,6 +121,7 @@ int fntTextHeight( int id,char * str )
|
|||||||
txSample * fntRender( int id,int px,int sx,char * fmt,... )
|
txSample * fntRender( int id,int px,int sx,char * fmt,... )
|
||||||
{
|
{
|
||||||
txSample * tmp = NULL;
|
txSample * tmp = NULL;
|
||||||
|
txSample tmp2;
|
||||||
char p[512];
|
char p[512];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
unsigned long * ibuf;
|
unsigned long * ibuf;
|
||||||
@ -147,7 +148,7 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
|
|||||||
ibuf=(unsigned long *)Fonts[id]->Bitmap.Image;
|
ibuf=(unsigned long *)Fonts[id]->Bitmap.Image;
|
||||||
for ( i=0;i < (int)strlen( p );i++ )
|
for ( i=0;i < (int)strlen( p );i++ )
|
||||||
{
|
{
|
||||||
int c = (int)p[i];
|
char c = p[i];
|
||||||
if ( Fonts[id]->Fnt[c].x == -1 ) c=32;
|
if ( Fonts[id]->Fnt[c].x == -1 ) c=32;
|
||||||
for ( oy=0,y=Fonts[id]->Fnt[c].y;y < Fonts[id]->Fnt[c].y + Fonts[id]->Fnt[c].sy; y++,oy++ )
|
for ( oy=0,y=Fonts[id]->Fnt[c].y;y < Fonts[id]->Fnt[c].y + Fonts[id]->Fnt[c].sy; y++,oy++ )
|
||||||
for ( ox=0,x=Fonts[id]->Fnt[c].x;x < Fonts[id]->Fnt[c].x + Fonts[id]->Fnt[c].sx; x++,ox++ )
|
for ( ox=0,x=Fonts[id]->Fnt[c].x;x < Fonts[id]->Fnt[c].x + Fonts[id]->Fnt[c].sx; x++,ox++ )
|
||||||
@ -159,7 +160,6 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... )
|
|||||||
|
|
||||||
if ( ( sx > 0 )&&( sx < tmp->Width ) )
|
if ( ( sx > 0 )&&( sx < tmp->Width ) )
|
||||||
{
|
{
|
||||||
txSample tmp2;
|
|
||||||
tmp2.ImageSize=sx * tmp->Height * 4;
|
tmp2.ImageSize=sx * tmp->Height * 4;
|
||||||
if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; }
|
if ( ( tmp2.Image=malloc( tmp2.ImageSize ) ) == NULL ) { free( tmp->Image ); return NULL; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user