From 5de1667104ec735a43caa3829b79a72d6835e9d8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 13 Jul 2017 05:01:24 +1000 Subject: don't drop an entire layout if one view fails to load - it breaks intlc44/intlc440 with null_modem --- src/emu/rendlay.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index 5785f5f20b7..162f2c350d9 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -2561,7 +2561,20 @@ layout_file::layout_file(running_machine &machine, util::xml::data_node const &r // parse all the views for (util::xml::data_node const *viewnode = mamelayoutnode->get_child("view"); viewnode != nullptr; viewnode = viewnode->get_next_sibling("view")) - m_viewlist.append(*global_alloc(layout_view(machine, *viewnode, m_elemlist))); + { + // the trouble with allowing emu_fatalerror to propagate here is that it wreaks havoc with screenless systems that use a terminal by default + // e.g. intlc44 and intlc440 have a terminal on the tty port by default and have a view with the front panel above the terminal screen + // however, they have a second view with just the front panel which is very useful if you're using e.g. -tty null_modem with a socket + // if the emu_fatalerror is allowed to propagate, the entire layout is dropped so you can't select the useful view + try + { + m_viewlist.append(*global_alloc(layout_view(machine, *viewnode, m_elemlist))); + } + catch (emu_fatalerror const &error) + { + // the exception will print its own message before we get here + } + } } -- cgit v1.2.3