From aeb9eae87469e67bc6a91caf3840c34c11d959fc Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 5 Oct 2021 03:34:45 +1100 Subject: 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. --- src/devices/bus/astrocde/slot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/devices/bus/astrocde') diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp index 0e72d9b57b9..b629c57322d 100644 --- a/src/devices/bus/astrocde/slot.cpp +++ b/src/devices/bus/astrocde/slot.cpp @@ -179,16 +179,16 @@ std::string astrocade_cart_slot_device::get_default_card_software(get_default_ca { if (hook.image_file()) { - const char *slot_string; - uint32_t size = hook.image_file()->size(); - int type = ASTROCADE_STD; + uint64_t size; + hook.image_file()->length(size); // FIXME: check error return + int type = ASTROCADE_STD; if (size == 0x40000) type = ASTROCADE_256K; if (size == 0x80000) type = ASTROCADE_512K; - slot_string = astrocade_get_slot(type); + char const *const slot_string = astrocade_get_slot(type); //printf("type: %s\n", slot_string); -- cgit v1.2.3-70-g09d2