frontend: Load INI files for the 'empty' driver that runs under the system selection menu.

This commit is contained in:
Vas Crabb 2022-12-05 17:56:36 +11:00
parent b7a807443a
commit 7e11c0968d
2 changed files with 42 additions and 39 deletions

View File

@ -266,7 +266,7 @@ int mame_machine_manager::execute()
m_options.revert(OPTION_PRIORITY_INI);
std::ostringstream errors;
mame_options::parse_standard_inis(m_options, errors);
mame_options::parse_standard_inis(m_options, errors, system);
}
// otherwise, perform validity checks before anything else

View File

@ -46,6 +46,8 @@ void mame_options::parse_standard_inis(emu_options &options, std::ostream &error
if (!cursystem)
return;
if (&GAME_NAME(___empty) != cursystem) // hacky - this thing isn't a real system
{
// parse "vertical.ini" or "horizont.ini"
if (cursystem->flags & ORIENTATION_SWAP_XY)
parse_one_ini(options, "vertical", OPTION_PRIORITY_ORIENTATION_INI, &error_stream);
@ -92,6 +94,7 @@ void mame_options::parse_standard_inis(emu_options &options, std::ostream &error
break;
}
}
}
// next parse "source/<sourcefile>.ini"
std::string sourcename = std::string(core_filename_extract_base(cursystem->type.source(), true)).insert(0, "source" PATH_SEPARATOR);