summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/debugqt.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-07-15 04:09:18 +1000
committer Vas Crabb <cuavas@users.noreply.github.com>2021-07-15 13:54:40 +1000
commit37157461313b13a691722b83c87df8d2315457da (patch)
tree8034c6f33776f5a8bfc8f6c69af879975061bd0a /src/osd/modules/debugger/debugqt.cpp
parent66554d3b84f5fec60dcf5d896283a1a04487c0e0 (diff)
API cleanups and miscellaneous fixes.
emu/ioport.cpp: Allow controller files to override input sequences for inputs that don't use defaults, and to override the toggle setting for digital inputs. emu/config.cpp: Expose configuration level (mostly matters for controller files), improved verbose diagnostic messages, and moved a few things out of the global and preprocessor namespaces. docs: Added documentation for some controller configuration file features. The device mapping feature documentation will be merged in at some point. util/unicode.cpp, emu/input.cpp: API cleanups.
Diffstat (limited to 'src/osd/modules/debugger/debugqt.cpp')
-rw-r--r--src/osd/modules/debugger/debugqt.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp
index c8845d42448..6731dc63e21 100644
--- a/src/osd/modules/debugger/debugqt.cpp
+++ b/src/osd/modules/debugger/debugqt.cpp
@@ -79,21 +79,17 @@ MainWindow *mainQtWindow = nullptr;
std::vector<std::unique_ptr<WindowQtConfig> > xmlConfigurations;
-void xml_configuration_load(running_machine &machine, config_type cfg_type, util::xml::data_node const *parentnode)
+void xml_configuration_load(running_machine &machine, config_type cfg_type, config_level cfg_level, util::xml::data_node const *parentnode)
{
- // We only care about game files
- if (cfg_type != config_type::GAME)
- return;
-
- // Might not have any data
- if (!parentnode)
+ // We only care about system configuration files
+ if ((cfg_type != config_type::SYSTEM) || !parentnode)
return;
xmlConfigurations.clear();
// Configuration load
util::xml::data_node const *wnode = nullptr;
- for (wnode = parentnode->get_child("window"); wnode != nullptr; wnode = wnode->get_next_sibling("window"))
+ for (wnode = parentnode->get_child("window"); wnode; wnode = wnode->get_next_sibling("window"))
{
WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)wnode->get_attribute_int("type", WindowQtConfig::WIN_TYPE_UNKNOWN);
switch (type)
@@ -114,8 +110,8 @@ void xml_configuration_load(running_machine &machine, config_type cfg_type, util
void xml_configuration_save(running_machine &machine, config_type cfg_type, util::xml::data_node *parentnode)
{
- // We only write to game configurations
- if (cfg_type != config_type::GAME)
+ // We only save system configuration
+ if (cfg_type != config_type::SYSTEM)
return;
for (int i = 0; i < xmlConfigurations.size(); i++)
@@ -269,8 +265,8 @@ void debug_qt::init_debugger(running_machine &machine)
m_machine = &machine;
// Setup the configuration XML saving and loading
machine.configuration().config_register("debugger",
- config_load_delegate(&xml_configuration_load, &machine),
- config_save_delegate(&xml_configuration_save, &machine));
+ configuration_manager::load_delegate(&xml_configuration_load, &machine),
+ configuration_manager::save_delegate(&xml_configuration_save, &machine));
}