diff options
author | 2021-10-05 03:34:45 +1100 | |
---|---|---|
committer | 2021-10-05 03:34:45 +1100 | |
commit | aeb9eae87469e67bc6a91caf3840c34c11d959fc (patch) | |
tree | 45bffedf374dbce47caca633ad7bda547592e6c9 /src/devices/bus/vcs | |
parent | 33723892a3f06e678d817b36aef84364c32848ec (diff) |
util: Further API cleanups: (#8661)
* Turned `core_file` into an implementation of `random_read_write`.
* Turned PNG errors into a standard error category.
* Added a helper for generating what look like derived classes on-the-fly.
Diffstat (limited to 'src/devices/bus/vcs')
-rw-r--r-- | src/devices/bus/vcs/vcs_slot.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp index 5efcc4ba32d..3d0fe0e4fb9 100644 --- a/src/devices/bus/vcs/vcs_slot.cpp +++ b/src/devices/bus/vcs/vcs_slot.cpp @@ -762,15 +762,15 @@ std::string vcs_cart_slot_device::get_default_card_software(get_default_card_sof { if (hook.image_file()) { - const char *slot_string; - uint32_t len = hook.image_file()->size(); + uint64_t len; + hook.image_file()->length(len); // FIXME: check error return, guard against excessively large files std::vector<uint8_t> rom(len); - int type; - hook.image_file()->read(&rom[0], len); + size_t actual; + hook.image_file()->read(&rom[0], len, actual); // FIXME: check error return or read returning short - type = identify_cart_type(&rom[0], len); - slot_string = vcs_get_slot(type); + int const type = identify_cart_type(&rom[0], len); + char const *const slot_string = vcs_get_slot(type); return std::string(slot_string); } |