summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/mameopts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/mameopts.cpp')
-rw-r--r--src/frontend/mame/mameopts.cpp79
1 files changed, 35 insertions, 44 deletions
diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp
index bbdf8a692b4..cd754fcb0f3 100644
--- a/src/frontend/mame/mameopts.cpp
+++ b/src/frontend/mame/mameopts.cpp
@@ -11,13 +11,19 @@
#include "emu.h"
#include "mameopts.h"
+#include "clifront.h"
+
+// emu
#include "drivenum.h"
#include "fileio.h"
+#include "hashfile.h"
+#include "main.h"
#include "screen.h"
#include "softlist_dev.h"
+
+// lib/util
+#include "path.h"
#include "zippath.h"
-#include "hashfile.h"
-#include "clifront.h"
#include <cctype>
#include <stack>
@@ -44,50 +50,35 @@ void mame_options::parse_standard_inis(emu_options &options, std::ostream &error
if (!cursystem)
return;
- // parse "vertical.ini" or "horizont.ini"
- 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)
+ if (&GAME_NAME(___empty) != cursystem) // hacky - this thing isn't a real system
{
- 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;
- }
-
- machine_config config(*cursystem, options);
- 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);
- break;
- }
- // parse "vector.ini" for vector games
- 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 "vertical.ini" or "horizont.ini"
+ 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);
+
+ machine_config config(*cursystem, options);
+ for (const screen_device &device : screen_device_enumerator(config.root_device()))
{
- parse_one_ini(options, "lcd", OPTION_PRIORITY_SCREEN_INI, &error_stream);
- break;
+ // parse "raster.ini" for raster games
+ if (device.screen_type() == SCREEN_TYPE_RASTER)
+ {
+ parse_one_ini(options, "raster", OPTION_PRIORITY_SCREEN_INI, &error_stream);
+ break;
+ }
+ // parse "vector.ini" for vector games
+ 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;
+ }
}
}