mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
Search font files in ~/.mplayer/font/ instead of current dir
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@218 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5919d4a501
commit
3bdf0810d7
@ -109,8 +109,12 @@ while(fgets(sor,1020,f)){
|
||||
|
||||
if(strcmp(section,"[files]")==0){
|
||||
if(pdb==2 && strcmp(p[0],"alpha")==0){
|
||||
char *cp=get_path("font/");
|
||||
char *cp2=malloc(strlen(cp)+strlen(p[1])+1);
|
||||
char *cp,*cp2;
|
||||
if (!(cp=get_path("font/"))) return NULL;
|
||||
if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) {
|
||||
free(cp);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(cp2,"%s%s",cp,p[1]);
|
||||
if(!((desc->pic_a[fontdb]=load_raw(cp2)))){
|
||||
printf("Can't load font bitmap: %s\n",p[1]);
|
||||
@ -123,8 +127,12 @@ while(fgets(sor,1020,f)){
|
||||
continue;
|
||||
}
|
||||
if(pdb==2 && strcmp(p[0],"bitmap")==0){
|
||||
char *cp=get_path("font/");
|
||||
char *cp2=malloc(strlen(cp)+strlen(p[1])+1);
|
||||
char *cp,*cp2;
|
||||
if (!(cp=get_path("font/"))) return NULL;
|
||||
if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) {
|
||||
free(cp);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(cp2,"%s%s",cp,p[1]);
|
||||
if(!((desc->pic_b[fontdb]=load_raw(cp2)))){
|
||||
printf("Can't load font bitmap: %s\n",p[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user