mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
frontend: Load INI files for the 'empty' driver that runs under the system selection menu.
This commit is contained in:
parent
b7a807443a
commit
7e11c0968d
@ -266,7 +266,7 @@ int mame_machine_manager::execute()
|
|||||||
m_options.revert(OPTION_PRIORITY_INI);
|
m_options.revert(OPTION_PRIORITY_INI);
|
||||||
|
|
||||||
std::ostringstream errors;
|
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
|
// otherwise, perform validity checks before anything else
|
||||||
|
@ -46,50 +46,53 @@ void mame_options::parse_standard_inis(emu_options &options, std::ostream &error
|
|||||||
if (!cursystem)
|
if (!cursystem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// parse "vertical.ini" or "horizont.ini"
|
if (&GAME_NAME(___empty) != cursystem) // hacky - this thing isn't a real system
|
||||||
if (cursystem->flags & ORIENTATION_SWAP_XY)
|
|
||||||
parse_one_ini(options, "vertical", OPTION_PRIORITY_ORIENTATION_INI, &error_stream);
|
|
||||||
else
|
|
||||||
parse_one_ini(options, "horizont", OPTION_PRIORITY_ORIENTATION_INI, &error_stream);
|
|
||||||
|
|
||||||
switch (cursystem->flags & machine_flags::MASK_TYPE)
|
|
||||||
{
|
{
|
||||||
case machine_flags::TYPE_ARCADE:
|
// parse "vertical.ini" or "horizont.ini"
|
||||||
parse_one_ini(options, "arcade", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
if (cursystem->flags & ORIENTATION_SWAP_XY)
|
||||||
break;
|
parse_one_ini(options, "vertical", OPTION_PRIORITY_ORIENTATION_INI, &error_stream);
|
||||||
case machine_flags::TYPE_CONSOLE:
|
else
|
||||||
parse_one_ini(options ,"console", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
parse_one_ini(options, "horizont", OPTION_PRIORITY_ORIENTATION_INI, &error_stream);
|
||||||
break;
|
|
||||||
case machine_flags::TYPE_COMPUTER:
|
|
||||||
parse_one_ini(options, "computer", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
|
||||||
break;
|
|
||||||
case machine_flags::TYPE_OTHER:
|
|
||||||
parse_one_ini(options, "othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
machine_config config(*cursystem, options);
|
switch (cursystem->flags & machine_flags::MASK_TYPE)
|
||||||
for (const screen_device &device : screen_device_enumerator(config.root_device()))
|
|
||||||
{
|
|
||||||
// parse "raster.ini" for raster games
|
|
||||||
if (device.screen_type() == SCREEN_TYPE_RASTER)
|
|
||||||
{
|
{
|
||||||
parse_one_ini(options, "raster", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
case machine_flags::TYPE_ARCADE:
|
||||||
|
parse_one_ini(options, "arcade", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
case machine_flags::TYPE_CONSOLE:
|
||||||
|
parse_one_ini(options ,"console", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
case machine_flags::TYPE_COMPUTER:
|
||||||
|
parse_one_ini(options, "computer", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
case machine_flags::TYPE_OTHER:
|
||||||
|
parse_one_ini(options, "othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// parse "vector.ini" for vector games
|
|
||||||
if (device.screen_type() == SCREEN_TYPE_VECTOR)
|
machine_config config(*cursystem, options);
|
||||||
|
for (const screen_device &device : screen_device_enumerator(config.root_device()))
|
||||||
{
|
{
|
||||||
parse_one_ini(options, "vector", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
// parse "raster.ini" for raster games
|
||||||
break;
|
if (device.screen_type() == SCREEN_TYPE_RASTER)
|
||||||
}
|
{
|
||||||
// parse "lcd.ini" for lcd games
|
parse_one_ini(options, "raster", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
||||||
if (device.screen_type() == SCREEN_TYPE_LCD)
|
break;
|
||||||
{
|
}
|
||||||
parse_one_ini(options, "lcd", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
// parse "vector.ini" for vector games
|
||||||
break;
|
if (device.screen_type() == SCREEN_TYPE_VECTOR)
|
||||||
|
{
|
||||||
|
parse_one_ini(options, "vector", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// parse "lcd.ini" for lcd games
|
||||||
|
if (device.screen_type() == SCREEN_TYPE_LCD)
|
||||||
|
{
|
||||||
|
parse_one_ini(options, "lcd", OPTION_PRIORITY_SCREEN_INI, &error_stream);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user