Changing the font path of onscreen keyboard to be relative to DATA_PREFIX.
This commit is contained in:
parent
ccc38f6c96
commit
c669418b1e
1 changed files with 7 additions and 1 deletions
|
|
@ -23644,7 +23644,12 @@ int button(int id, int x, int y)
|
|||
|
||||
void keybd_prepare()
|
||||
{
|
||||
fonty = TTF_OpenFont( "data/fonts/FreeSansBold.ttf", 12 );
|
||||
/* FIXME we should use the current font to draw the keyboard */
|
||||
char * fontname;
|
||||
fontname = malloc(128);
|
||||
|
||||
sprintf(fontname, "%s/fonts/FreeSansBold.ttf", DATA_PREFIX);
|
||||
fonty = TTF_OpenFont( fontname, 12 );
|
||||
if (fonty == NULL)
|
||||
{
|
||||
fprintf(stderr, "\nError: Can't open the font!\n"
|
||||
|
|
@ -23653,6 +23658,7 @@ void keybd_prepare()
|
|||
exit(1);
|
||||
}
|
||||
uistate.hotitem = 0;
|
||||
free(fontname);
|
||||
}
|
||||
|
||||
void keybd_finish()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue