diff options
author | 2022-09-16 22:09:58 +1000 | |
---|---|---|
committer | 2022-09-16 22:23:34 +1000 | |
commit | c76cf754b3cb1a07f8d3ca585bb3a055d78f25be (patch) | |
tree | 833fa7b23f8a84a79fd052008a6ad7c3847b46da /src/osd/modules/debugger/debugqt.cpp | |
parent | 1aae44005b59aa712fb60f639ddbb9e8e5e7a357 (diff) |
debugger/win: Added capability to save/restore window arrangement.
* Format is mostly compatible with the Cocoa debugger, besides reversed
vertical positioning.
* Made Qt debugger more compatible with configuration format used by
Win32 and Cocoa debuggers.
* emu/config.cpp: Preserve elements with no registered handlers in
default and system configuation files.
Diffstat (limited to 'src/osd/modules/debugger/debugqt.cpp')
-rw-r--r-- | src/osd/modules/debugger/debugqt.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/osd/modules/debugger/debugqt.cpp b/src/osd/modules/debugger/debugqt.cpp index a48f419a6a3..dbc638d354a 100644 --- a/src/osd/modules/debugger/debugqt.cpp +++ b/src/osd/modules/debugger/debugqt.cpp @@ -32,6 +32,9 @@ #include "qt/deviceswindow.h" #include "qt/deviceinformationwindow.h" +#include "util/xmlfile.h" + + class debug_qt : public osd_module, public debug_module #if defined(_WIN32) && !defined(SDLMAME_WIN32) , public QAbstractNativeEventFilter @@ -89,9 +92,9 @@ void xml_configuration_load(running_machine &machine, config_type cfg_type, conf // Configuration load util::xml::data_node const *wnode = nullptr; - for (wnode = parentnode->get_child("window"); wnode; wnode = wnode->get_next_sibling("window")) + for (wnode = parentnode->get_child(osd::debugger::NODE_WINDOW); wnode; wnode = wnode->get_next_sibling(osd::debugger::NODE_WINDOW)) { - WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)wnode->get_attribute_int("type", WindowQtConfig::WIN_TYPE_UNKNOWN); + WindowQtConfig::WindowType type = (WindowQtConfig::WindowType)wnode->get_attribute_int(osd::debugger::ATTR_WINDOW_TYPE, WindowQtConfig::WIN_TYPE_UNKNOWN); switch (type) { case WindowQtConfig::WIN_TYPE_MAIN: xmlConfigurations.push_back(std::make_unique<MainWindowQtConfig>()); break; @@ -119,7 +122,7 @@ void xml_configuration_save(running_machine &machine, config_type cfg_type, util WindowQtConfig &config = *xmlConfigurations[i]; // Create an xml node - util::xml::data_node *const debugger_node = parentnode->add_child("window", nullptr); + util::xml::data_node *const debugger_node = parentnode->add_child(osd::debugger::NODE_WINDOW, nullptr); // Insert the appropriate information if (debugger_node) |