comparison tools/64vw.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 d56a0e86067a
children 9807ae37ad69
comparison
equal deleted inserted replaced
2570:1559011d749f 2571:bb44c48cffac
23 BOOL optInfoOnly = FALSE, 23 BOOL optInfoOnly = FALSE,
24 optProbeOnly = FALSE, 24 optProbeOnly = FALSE,
25 optListOnly = FALSE; 25 optListOnly = FALSE;
26 size_t noptFilenames1 = 0, noptFilenames2 = 0; 26 size_t noptFilenames1 = 0, noptFilenames2 = 0;
27 char **optFilenames = NULL; 27 char **optFilenames = NULL;
28 char *optCharROMFilename = NULL; 28 const char *optCharROMFilename = NULL;
29 DMC64Palette *optC64Palette = NULL; 29 DMC64Palette *optC64Palette = NULL;
30 char *optC64PaletteFile = NULL; 30 char *optC64PaletteFile = NULL;
31 31
32 DMC64MemBlock setCharROM; 32 DMC64MemBlock setCharROM;
33 33
76 " f - toggle fullscreen\n" 76 " f - toggle fullscreen\n"
77 "\n" 77 "\n"
78 "Default character ROM file for this build is:\n" 78 "Default character ROM file for this build is:\n"
79 " %s\n", 79 " %s\n",
80 SET_SKIP_AMOUNT, 80 SET_SKIP_AMOUNT,
81 DM_DEF_CHARGEN 81 dmGetChargenROMPath()
82 ); 82 );
83 } 83 }
84 84
85 85
86 BOOL argHandleOpt(const int optN, char *optArg, char *currArg) 86 BOOL argHandleOpt(const int optN, char *optArg, char *currArg)
390 } 390 }
391 } 391 }
392 392
393 // Check character ROM filename 393 // Check character ROM filename
394 if (optCharROMFilename == NULL) 394 if (optCharROMFilename == NULL)
395 optCharROMFilename = DM_DEF_CHARGEN; 395 optCharROMFilename = dmGetChargenROMPath();
396 396
397 // Attempt to read character ROM 397 // Attempt to read character ROM
398 dmMsg(1, "Using character ROM file '%s'.\n", 398 dmMsg(1, "Using character ROM file '%s'.\n",
399 optCharROMFilename); 399 optCharROMFilename);
400 400