diff options
author | 2017-03-02 20:01:17 -0500 | |
---|---|---|
committer | 2017-03-02 20:01:17 -0500 | |
commit | 3ad77eae8a3c541fd02ece252ef56a6d9e3e2a49 (patch) | |
tree | fc112d758817569a40d13ae51535b4b37642e873 /src/devices/bus/msx_slot | |
parent | e27a978955f4a849b7c11ae0bb0fbc6a2bcdd9af (diff) |
Image instance name refactoring and bug fixing (nw)
- update_names no longer takes arguments; the device type can be obtained easily, and the custom instance names are now overrides. Devices might not need to explicitly call update_names in the future.
- Fix the frontend crash/assert failure resulting from instance names not being generated properly.
Diffstat (limited to 'src/devices/bus/msx_slot')
-rw-r--r-- | src/devices/bus/msx_slot/cartridge.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index b554eec833b..72cbcb805ac 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -39,7 +39,7 @@ public: // device-level overrides virtual void device_start() override; - virtual void device_config_complete() override { update_names(MSX_SLOT_CARTRIDGE, "cartridge", "cart"); } + virtual void device_config_complete() override { update_names(); } // image-level overrides virtual image_init_result call_load() override; @@ -53,6 +53,8 @@ public: virtual bool is_reset_on_load() const override { return true; } virtual const char *image_interface() const override { return "msx_cart"; } virtual const char *file_extensions() const override { return "mx1,bin,rom"; } + virtual const char *custom_instance_name() const override { return "cartridge"; } + virtual const char *custom_brief_instance_name() const override { return "cart"; } // slot interface overrides virtual std::string get_default_card_software() override; @@ -78,9 +80,10 @@ public: msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void device_start() override; - virtual void device_config_complete() override { update_names(MSX_SLOT_YAMAHA_EXPANSION, "cartridge60pin", "cart60p"); } virtual const char *image_interface() const override { return "msx_yamaha_60pin"; } + virtual const char *custom_instance_name() const override { return "cartridge60pin"; } + virtual const char *custom_brief_instance_name() const override { return "cart60p"; } }; |