summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/rendlay.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-07-13 05:01:24 +1000
committer Vas Crabb <vas@vastheman.com>2017-07-13 05:01:24 +1000
commit5de1667104ec735a43caa3829b79a72d6835e9d8 (patch)
tree80e3822faba4820aac0f96e8b26c6ce1f7ca2cb3 /src/emu/rendlay.cpp
parentf1b30abacfb830600ea4a68cd6ae978a98f30ac9 (diff)
don't drop an entire layout if one view fails to load - it breaks intlc44/intlc440 with null_modem
Diffstat (limited to 'src/emu/rendlay.cpp')
-rw-r--r--src/emu/rendlay.cpp15
1 files changed, 14 insertions, 1 deletions
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
+ }
+ }
}