diff options
author | 2016-08-01 18:46:56 +1000 | |
---|---|---|
committer | 2016-08-01 18:47:22 +1000 | |
commit | 15e7be7ac8e4127e9fc0f9b5c248f4a73ba85703 (patch) | |
tree | 71346f2c2d1ac08e0e9c9f4dea8f2537af380143 /src/devices/bus/msx_slot | |
parent | c4c05c9735a5b956de128d6017027658b6c61a8e (diff) |
Turn image init/validate into scoped enums to avoid accidental casts to/from integer and boolean types
The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
Diffstat (limited to 'src/devices/bus/msx_slot')
-rw-r--r-- | src/devices/bus/msx_slot/cartridge.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/msx_slot/cartridge.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp index b926a5679d5..19be1b77921 100644 --- a/src/devices/bus/msx_slot/cartridge.cpp +++ b/src/devices/bus/msx_slot/cartridge.cpp @@ -102,7 +102,7 @@ void msx_slot_cartridge_device::device_start() } -bool msx_slot_cartridge_device::call_load() +image_init_result msx_slot_cartridge_device::call_load() { if ( m_cartridge ) { @@ -164,7 +164,7 @@ bool msx_slot_cartridge_device::call_load() if (fread(m_cartridge->get_rom_base(), length) != length) { seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read file"); - return IMAGE_INIT_FAIL; + return image_init_result::FAIL; } // Check if there's some mapper related @@ -182,7 +182,7 @@ bool msx_slot_cartridge_device::call_load() battery_load(m_cartridge->get_sram_base(), m_cartridge->get_sram_size(), 0x00); } } - return IMAGE_INIT_PASS; + return image_init_result::PASS; } diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index 33acf0f9f9d..b9e1ca5e4f7 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -41,7 +41,7 @@ public: virtual void device_config_complete() override { update_names(MSX_SLOT_CARTRIDGE, "cartridge", "cart"); } // image-level overrides - virtual bool call_load() override; + virtual image_init_result call_load() override; virtual void call_unload() override; virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } virtual iodevice_t image_type() const override { return IO_CARTSLOT; } |