mirror of
https://github.com/holub/mame
synced 2025-06-30 07:58:56 +03:00
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.
This commit is contained in:
parent
e2ed5d1008
commit
17f30b20f2
@ -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);
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
virtual const char *name() const override;
|
||||
virtual const char *description() const override;
|
||||
virtual const char *extensions() const override;
|
||||
virtual int identify(io_generic *io, uint32_t form_factor) override;
|
||||
virtual int find_size(io_generic *io, uint32_t form_factor) override;
|
||||
virtual const wd177x_format::format &get_track_format(const format &f, int head, int track) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user