summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/flex_dsk.cpp
diff options
context:
space:
mode:
author 68bit <info@68bit.org>2020-02-09 10:35:25 +1100
committer 68bit <info@68bit.org>2020-02-09 11:45:52 +1100
commit17f30b20f2123cb56b29ee10cb11004b709b50e7 (patch)
tree599f3259122aec2e73a8ad3cac610dbf10fb0c94 /src/lib/formats/flex_dsk.cpp
parente2ed5d10085861af5cee459fd85ab49e280fe09b (diff)
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.
Diffstat (limited to 'src/lib/formats/flex_dsk.cpp')
-rw-r--r--src/lib/formats/flex_dsk.cpp9
1 files changed, 9 insertions, 0 deletions
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);