From 8d047a8f0dcfb1bdaa4dcf87c001a30ebcc7cca8 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 20 Apr 2021 02:12:47 -0700 Subject: Better handling of null/missing items. More consistent error handling. Reduced compression to default to speed up saves. Optimized simple binary saves as well. Device interfaces now have automatic containers. Fixed duplicate entry detection. Added logic to parse an item we're skipping. Added detection of missing/duplicate items from input JSON. Fixed timing for save/load. --- src/emu/debug/dvsave.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/emu/debug/dvsave.cpp') diff --git a/src/emu/debug/dvsave.cpp b/src/emu/debug/dvsave.cpp index eda3fb59235..141d744f7e9 100644 --- a/src/emu/debug/dvsave.cpp +++ b/src/emu/debug/dvsave.cpp @@ -63,6 +63,11 @@ void debug_view_save::build_list_recursive(save_registered_item &item, uintptr_t if (item.unwrap_and_update_base(objbase)) return build_list_recursive(item.subitems().front(), objbase, depth, count); + // only containers are allowed to have null bases past this point; treat + // everything else as non-existent + if (objbase == 0 && item.type() != save_registered_item::TYPE_CONTAINER) + return; + // switch off the type switch (item.type()) { @@ -305,6 +310,11 @@ std::string debug_view_save::save_item::value(save_registered_item &item, int co if (item.unwrap_and_update_base(objbase)) return value(item.subitems().front(), 0, objbase, collapsed); + // only containers are allowed to have null bases past this point; treat + // everything else as non-existent + if (objbase == 0 && item.type() != save_registered_item::TYPE_CONTAINER) + return "(null)"; + char tempbuf[256]; tempbuf[0] = 0; int pos = 0; -- cgit v1.2.3