From 17f30b20f2123cb56b29ee10cb11004b709b50e7 Mon Sep 17 00:00:00 2001 From: 68bit Date: Sun, 9 Feb 2020 10:35:25 +1100 Subject: flex_dsk: include an identify() method. It is necessary to return a higher score on success, higher than returned by the default method, in order for a general 'identify' to succeed over competitive matches. --- src/lib/formats/flex_dsk.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/formats/flex_dsk.cpp') diff --git a/src/lib/formats/flex_dsk.cpp b/src/lib/formats/flex_dsk.cpp index 5944c1ca3bd..ee3750b6101 100644 --- a/src/lib/formats/flex_dsk.cpp +++ b/src/lib/formats/flex_dsk.cpp @@ -71,6 +71,15 @@ const char *flex_format::extensions() const return "dsk"; } +int flex_format::identify(io_generic *io, uint32_t form_factor) +{ + int type = find_size(io, form_factor); + + if (type != -1) + return 75; + return 0; +} + int flex_format::find_size(io_generic *io, uint32_t form_factor) { uint64_t size = io_generic_size(io); -- cgit v1.2.3-70-g09d2