diff tools/gfxconv.c @ 2571:bb44c48cffac

Add helper function for getting C64 chargen ROM path from environment variable 'CHARGEN_ROM' and use it instead of the compile-time hardcoded value.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Mar 2022 23:23:05 +0200
parents d75431bf1a7d
children 9807ae37ad69
line wrap: on
line diff
--- a/tools/gfxconv.c	Wed Mar 02 00:31:27 2022 +0200
+++ b/tools/gfxconv.c	Wed Mar 02 23:23:05 2022 +0200
@@ -154,7 +154,7 @@
 int     optRemapNoMatchColor = -1;
 DMMapValue optRemapTable[DM_MAX_COLORS];
 int     optColorMap[D64_NCOLORS];
-char    *optCharROMFilename = NULL;
+const char *optCharROMFilename = NULL;
 DMC64Palette *optC64Palette = NULL;
 char    *optPaletteFile = NULL;
 DMPalette *optPaletteData = NULL;
@@ -248,7 +248,7 @@
     "Default C64 character ROM file for this build is:\n"
     "%s\n"
     "\n",
-    DM_DEF_CHARGEN
+    dmGetChargenROMPath()
     );
 }
 
@@ -3010,7 +3010,7 @@
                     {
                         // Check character ROM filename
                         if (optCharROMFilename == NULL)
-                            optCharROMFilename = DM_DEF_CHARGEN;
+                            optCharROMFilename = dmGetChargenROMPath();
 
                         // Attempt to read character ROM
                         dmMsg(1, "Using character ROM file '%s'.\n",