Previous 15994 Revisions Next

r12136 Sunday 3rd July, 2011 at 09:03:47 UTC by Miodrag Milanović
Ok this time really checks if there was something added (no whatsnew)
[src/emu]render.c

src/emu/render.c
r12135r12136
16261626
16271627void render_target::load_layout_files(const char *layoutfile, bool singlefile)
16281628{
1629   bool have_default = false;
16291630   // if there's an explicit file, load that first
16301631   const char *basename = m_manager.machine().basename();
16311632   if (layoutfile != NULL)
1632      load_layout_file(basename, layoutfile);
1633      have_default |= load_layout_file(basename, layoutfile);
16331634
16341635   // if we're only loading this file, we know our final result
16351636   if (singlefile)
r12135r12136
16381639   // try to load a file based on the driver name
16391640   const game_driver &system = m_manager.machine().system();
16401641   if (!load_layout_file(basename, system.name))
1641      load_layout_file(basename, "default");
1642      have_default |= load_layout_file(basename, "default");
1643   else
1644      have_default |= true;
16421645
16431646   // if a default view has been specified, use that as a fallback
16441647   if (system.default_layout != NULL)
1645      load_layout_file(NULL, system.default_layout);
1648      have_default |= load_layout_file(NULL, system.default_layout);
16461649   if (m_manager.machine().config().m_default_layout != NULL)
1647      load_layout_file(NULL, m_manager.machine().config().m_default_layout);
1650      have_default |= load_layout_file(NULL, m_manager.machine().config().m_default_layout);
16481651
16491652   // try to load another file based on the parent driver name
16501653   int cloneof = driver_list::clone(system);
1651   if (cloneof != -1)
1654   if (cloneof != -1) {
16521655      if (!load_layout_file(driver_list::driver(cloneof).name, driver_list::driver(cloneof).name))
1653         load_layout_file(driver_list::driver(cloneof).name, "default");
1654
1656         have_default |= load_layout_file(driver_list::driver(cloneof).name, "default");
1657      else
1658         have_default |= true;
1659   }
16551660   int screens = m_manager.machine().devicelist().count(SCREEN);
16561661   // now do the built-in layouts for single-screen games
16571662   if (screens == 1)
r12135r12136
16621667         load_layout_file(NULL, layout_horizont);
16631668      assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
16641669   }
1665   if (system.default_layout== NULL && m_manager.machine().config().m_default_layout==NULL)
1670   if (!have_default)
16661671   {
16671672      if (screens == 2)
16681673      {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team