ESC/P Printer: No longer assume roms/ is where the binary is, fixes #5221.
This commit is contained in:
@@ -1968,16 +1968,16 @@ escp_init(void *lpt)
|
||||
dev->ctrl = 0x04;
|
||||
dev->lpt = lpt;
|
||||
|
||||
rom_get_full_path(dev->fontpath, "roms/printer/fonts/");
|
||||
|
||||
/* Create a full pathname for the font files. */
|
||||
if (strlen(exe_path) >= sizeof(dev->fontpath)) {
|
||||
if (strlen(dev->fontpath) == 0) {
|
||||
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_ESCP_ERROR_TITLE),
|
||||
plat_get_string(STRING_ESCP_ERROR_DESC));
|
||||
free(dev);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
strcpy(dev->fontpath, exe_path);
|
||||
path_slash(dev->fontpath);
|
||||
strcat(dev->fontpath, "roms/printer/fonts/");
|
||||
|
||||
/* Create the full path for the page images. */
|
||||
path_append_filename(dev->pagepath, usr_path, "printer");
|
||||
if (!plat_dir_check(dev->pagepath))
|
||||
|
||||
Reference in New Issue
Block a user