summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-12-08 04:00:49 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-12-08 04:00:49 +1100
commitd8ef34be9a20cd28a11aef627c533554f49346b8 (patch)
treea528ea40e19161c36875af7baef7090ca86eb5dd /src/emu
parentd4b3128e0d410c02dd2f82b52b3d626e86ef816e (diff)
softlist_dev.cpp: get some stuff out of the global namespace (nw)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/softlist_dev.cpp8
-rw-r--r--src/emu/softlist_dev.h18
2 files changed, 14 insertions, 12 deletions
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp
index 2c30be8b906..e177954b248 100644
--- a/src/emu/softlist_dev.cpp
+++ b/src/emu/softlist_dev.cpp
@@ -80,9 +80,9 @@ bool image_software_list_loader::load_software(device_image_interface &image, so
// software_list_device - constructor
//-------------------------------------------------
-software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, SOFTWARE_LIST, tag, owner, clock),
- m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM),
+software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+ device_t(mconfig, SOFTWARE_LIST, tag, owner, clock),
+ m_list_type(softlist_type::ORIGINAL_SYSTEM),
m_filter(nullptr),
m_parsed(false),
m_file(mconfig.options().hash_path(), OPEN_FLAG_READ),
@@ -220,7 +220,7 @@ void software_list_device::display_matches(const machine_config &config, const c
if (matches[0] != nullptr)
{
// different output depending on original system or compatible
- if (swlistdev.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
+ if (swlistdev.is_original())
osd_printf_error("* Software list \"%s\" (%s) matches: \n", swlistdev.list_name(), swlistdev.description());
else
osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev.list_name(), swlistdev.description());
diff --git a/src/emu/softlist_dev.h b/src/emu/softlist_dev.h
index 4370ec8a20d..f3d222d65d5 100644
--- a/src/emu/softlist_dev.h
+++ b/src/emu/softlist_dev.h
@@ -25,12 +25,6 @@
#define SOFTWARE_SUPPORTED_PARTIAL 1
#define SOFTWARE_SUPPORTED_NO 2
-enum softlist_type
-{
- SOFTWARE_LIST_ORIGINAL_SYSTEM,
- SOFTWARE_LIST_COMPATIBLE_SYSTEM
-};
-
enum software_compatibility
{
SOFTWARE_IS_COMPATIBLE,
@@ -100,18 +94,26 @@ class software_list_device : public device_t
friend class softlist_parser;
public:
+ enum class softlist_type
+ {
+ ORIGINAL_SYSTEM,
+ COMPATIBLE_SYSTEM
+ };
+
// construction/destruction
software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// inline configuration helpers
software_list_device &set_type(const char *list, softlist_type list_type) { m_list_name.assign(list); m_list_type = list_type; return *this; }
- software_list_device &set_original(const char *list) { return set_type(list, SOFTWARE_LIST_ORIGINAL_SYSTEM); }
- software_list_device &set_compatible(const char *list) { return set_type(list, SOFTWARE_LIST_COMPATIBLE_SYSTEM); }
+ software_list_device &set_original(const char *list) { return set_type(list, softlist_type::ORIGINAL_SYSTEM); }
+ software_list_device &set_compatible(const char *list) { return set_type(list, softlist_type::COMPATIBLE_SYSTEM); }
software_list_device &set_filter(const char *filter) { m_filter = filter; return *this; }
// getters
const std::string &list_name() const { return m_list_name; }
softlist_type list_type() const { return m_list_type; }
+ bool is_original() const { return softlist_type::ORIGINAL_SYSTEM == m_list_type; }
+ bool is_compatible() const { return softlist_type::COMPATIBLE_SYSTEM == m_list_type; }
const char *filter() const { return m_filter; }
const char *filename() { return m_file.filename(); }