mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +03:00
Merge pull request #1290 from npwoods/set_filetype_for_softlist_images
Now setting m_filetype for images loaded from softlists
This commit is contained in:
commit
0e03164fc1
@ -96,6 +96,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_start() override;
|
||||
virtual const bool use_software_list_file_extension_for_filetype() const override { return true; }
|
||||
|
||||
private:
|
||||
cassette_image *m_cassette;
|
||||
|
@ -1080,7 +1080,9 @@ image_init_result device_image_interface::load_software(const std::string &softw
|
||||
m_image_name = m_full_software_name;
|
||||
m_basename = m_full_software_name;
|
||||
m_basename_noext = m_full_software_name;
|
||||
m_filetype = "";
|
||||
m_filetype = use_software_list_file_extension_for_filetype() && m_mame_file != nullptr
|
||||
? core_filename_extract_extension(m_mame_file->filename(), true)
|
||||
: "";
|
||||
|
||||
// check if image should be read-only
|
||||
const char *read_only = get_feature("read_only");
|
||||
|
@ -252,6 +252,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual const software_list_loader &get_software_list_loader() const;
|
||||
virtual const bool use_software_list_file_extension_for_filetype() const { return false; }
|
||||
|
||||
image_init_result load_internal(const std::string &path, bool is_create, int create_format, util::option_resolution *create_args, bool just_load);
|
||||
image_error_t load_image_by_path(UINT32 open_flags, const std::string &path);
|
||||
|
Loading…
Reference in New Issue
Block a user