From ceb558070e93dd6f6ef3bd9df048048208876d1c Mon Sep 17 00:00:00 2001 From: MooglyGuy Date: Mon, 24 Jun 2019 05:07:44 +0200 Subject: -save: Print all duplicate savestate entries found rather than bailing after the first one, nw --- src/emu/save.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/emu/save.cpp b/src/emu/save.cpp index d8051c72390..a8a59c90817 100644 --- a/src/emu/save.cpp +++ b/src/emu/save.cpp @@ -84,9 +84,18 @@ void save_manager::allow_registration(bool allowed) std::sort(m_entry_list.begin(), m_entry_list.end(), [](std::unique_ptr const& a, std::unique_ptr const& b) { return a->m_name < b->m_name; }); + int dupes_found = 0; for (int i = 0; i < m_entry_list.size() - 1; i++) + { if (m_entry_list[i]->m_name == m_entry_list[i + 1]->m_name) - fatalerror("Duplicate save state registration entry (%s)\n", m_entry_list[i]->m_name.c_str()); + { + osd_printf_error("Duplicate save state registration entry (%s)\n", m_entry_list[i]->m_name.c_str()); + dupes_found++; + } + } + + if (dupes_found) + fatalerror("%d duplicate save state entries found.\n", dupes_found); dump_registry(); -- cgit v1.2.3