Skip to content

Commit f3ef19a

Browse files
committed
increase font filename buffer size and print filename in use
1 parent 879849e commit f3ef19a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rpi/ui/ui_sdl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,24 +360,24 @@ int vui_init_sdl(vui_context_t *ctx, int fullscreen)
360360
return -1;
361361
}
362362

363-
char font_filename[128];
363+
char font_filename[4096];
364364
vpi_asset_filename(font_filename, sizeof(font_filename), "font", "system.ttf");
365365

366366
sdl_ctx->sysfont = TTF_OpenFont(font_filename, 36);
367367
if (!sdl_ctx->sysfont) {
368-
vpilog("Failed to TTF_OpenFont\n");
368+
vpilog("Failed to TTF_OpenFont: %s\n", font_filename);
369369
return -1;
370370
}
371371

372372
sdl_ctx->sysfont_small = TTF_OpenFont(font_filename, 24);
373373
if (!sdl_ctx->sysfont_small) {
374-
vpilog("Failed to TTF_OpenFont\n");
374+
vpilog("Failed to TTF_OpenFont: %s\n", font_filename);
375375
return -1;
376376
}
377377

378378
sdl_ctx->sysfont_tiny = TTF_OpenFont(font_filename, 16);
379379
if (!sdl_ctx->sysfont_tiny) {
380-
vpilog("Failed to TTF_OpenFont\n");
380+
vpilog("Failed to TTF_OpenFont: %s\n", font_filename);
381381
return -1;
382382
}
383383

0 commit comments

Comments
 (0)