diff options
Diffstat (limited to 'src/frontend/mame/pluginopts.cpp')
-rw-r--r-- | src/frontend/mame/pluginopts.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/frontend/mame/pluginopts.cpp b/src/frontend/mame/pluginopts.cpp index 19053c2ceab..d06bb4ce49b 100644 --- a/src/frontend/mame/pluginopts.cpp +++ b/src/frontend/mame/pluginopts.cpp @@ -10,7 +10,9 @@ #include "emu.h" #include "pluginopts.h" + #include "options.h" +#include "path.h" #include <rapidjson/document.h> #include <rapidjson/error/en.h> @@ -47,13 +49,12 @@ void plugin_options::scan_directory(const std::string &path, bool recursive) { if (entry->type == osd::directory::entry::entry_type::FILE && !strcmp(entry->name, "plugin.json")) { - std::string curfile = std::string(path).append(PATH_SEPARATOR).append(entry->name); - load_plugin(curfile); + load_plugin(util::path_concat(path, entry->name)); } else if (entry->type == osd::directory::entry::entry_type::DIR) { if (recursive && strcmp(entry->name, ".") && strcmp(entry->name, "..")) - scan_directory(path + PATH_SEPARATOR + entry->name, recursive); + scan_directory(util::path_concat(path, entry->name), recursive); } } } @@ -141,11 +142,14 @@ static core_options create_core_options(const plugin_options &plugin_opts) // create an entry for each option for (const plugin_options::plugin &p : plugin_opts.plugins()) { - opts.add_entry( - { p.m_name }, - nullptr, - core_options::option_type::BOOLEAN, - p.m_start ? "1" : "0"); + if (p.m_type != "library") + { + opts.add_entry( + { p.m_name }, + nullptr, + core_options::option_type::BOOLEAN, + p.m_start ? "1" : "0"); + } } return opts; |