diff options
author | 2021-01-09 23:02:02 +0100 | |
---|---|---|
committer | 2021-01-09 23:03:43 +0100 | |
commit | c18d0b8a004fb3491ed30072a7d2a7c168c83b59 (patch) | |
tree | 347b3e3ffff8ddd58a969414022f26c0d6c1cc59 /src/tools/floptool.cpp | |
parent | 1d8251edd65fd1dfcc57b246dea0f32b54cff253 (diff) |
Update floptool to the new prototypes
Diffstat (limited to 'src/tools/floptool.cpp')
-rw-r--r-- | src/tools/floptool.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/floptool.cpp b/src/tools/floptool.cpp index 2a33a92a979..462ae389aa6 100644 --- a/src/tools/floptool.cpp +++ b/src/tools/floptool.cpp @@ -131,6 +131,8 @@ void CLIB_DECL ATTR_PRINTF(1,2) logerror(const char *format, ...) enum { FORMAT_COUNT = ARRAY_LENGTH(floppy_formats) }; static floppy_image_format_t *formats[FORMAT_COUNT]; +static std::vector<uint32_t> variants; + static void init_formats() { @@ -153,7 +155,7 @@ static floppy_image_format_t *find_format_by_identify(io_generic *image) for(int i = 0; i != FORMAT_COUNT; i++) { floppy_image_format_t *fif = formats[i]; - int score = fif->identify(image, floppy_image::FF_UNKNOWN); + int score = fif->identify(image, floppy_image::FF_UNKNOWN, variants); if(score > best) { best = score; best_fif = fif; @@ -281,12 +283,12 @@ static int convert(int argc, char *argv[]) dest_io.filler = 0xff; floppy_image image(84, 2, floppy_image::FF_UNKNOWN); - if(!source_format->load(&source_io, floppy_image::FF_UNKNOWN, &image)) { + if(!source_format->load(&source_io, floppy_image::FF_UNKNOWN, variants, &image)) { fprintf(stderr, "Error: parsing input file as '%s' failed\n", source_format->name()); return 1; } - if(!dest_format->save(&dest_io, &image)) { + if(!dest_format->save(&dest_io, variants, &image)) { fprintf(stderr, "Error: writing output file as '%s' failed\n", dest_format->name()); return 1; } |