diff options
Diffstat (limited to 'src/osd/modules/debugger/osx/debugconsole.mm')
-rw-r--r-- | src/osd/modules/debugger/osx/debugconsole.mm | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/osd/modules/debugger/osx/debugconsole.mm b/src/osd/modules/debugger/osx/debugconsole.mm index c1689a8b855..f6d01375403 100644 --- a/src/osd/modules/debugger/osx/debugconsole.mm +++ b/src/osd/modules/debugger/osx/debugconsole.mm @@ -380,30 +380,30 @@ - (void)loadConfiguration:(util::xml::data_node const *)parentnode { util::xml::data_node const *node = nullptr; - for (node = parentnode->get_child("window"); node; node = node->get_next_sibling("window")) + for (node = parentnode->get_child(osd::debugger::NODE_WINDOW); node; node = node->get_next_sibling(osd::debugger::NODE_WINDOW)) { MAMEDebugWindowHandler *win = nil; - switch (node->get_attribute_int("type", -1)) + switch (node->get_attribute_int(osd::debugger::ATTR_WINDOW_TYPE, -1)) { - case MAME_DEBUGGER_WINDOW_TYPE_CONSOLE: + case osd::debugger::WINDOW_TYPE_CONSOLE: [self restoreConfigurationFromNode:node]; break; - case MAME_DEBUGGER_WINDOW_TYPE_MEMORY_VIEWER: + case osd::debugger::WINDOW_TYPE_MEMORY_VIEWER: win = [[MAMEMemoryViewer alloc] initWithMachine:*machine console:self]; break; - case MAME_DEBUGGER_WINDOW_TYPE_DISASSEMBLY_VIEWER: + case osd::debugger::WINDOW_TYPE_DISASSEMBLY_VIEWER: win = [[MAMEDisassemblyViewer alloc] initWithMachine:*machine console:self]; break; - case MAME_DEBUGGER_WINDOW_TYPE_ERROR_LOG_VIEWER: + case osd::debugger::WINDOW_TYPE_ERROR_LOG_VIEWER: win = [[MAMEErrorLogViewer alloc] initWithMachine:*machine console:self]; break; - case MAME_DEBUGGER_WINDOW_TYPE_POINTS_VIEWER: + case osd::debugger::WINDOW_TYPE_POINTS_VIEWER: win = [[MAMEPointsViewer alloc] initWithMachine:*machine console:self]; break; - case MAME_DEBUGGER_WINDOW_TYPE_DEVICES_VIEWER: + case osd::debugger::WINDOW_TYPE_DEVICES_VIEWER: win = [[MAMEDevicesViewer alloc] initWithMachine:*machine console:self]; break; - case MAME_DEBUGGER_WINDOW_TYPE_DEVICE_INFO_VIEWER: + case osd::debugger::WINDOW_TYPE_DEVICE_INFO_VIEWER: // FIXME: needs device info on init, make another variant //win = [[MAMEDeviceInfoViewer alloc] initWithMachine:*machine console:self]; break; @@ -423,15 +423,15 @@ - (void)saveConfigurationToNode:(util::xml::data_node *)node { [super saveConfigurationToNode:node]; - node->set_attribute_int("type", MAME_DEBUGGER_WINDOW_TYPE_CONSOLE); - util::xml::data_node *const splits = node->add_child("splits", nullptr); + node->set_attribute_int(osd::debugger::ATTR_WINDOW_TYPE, osd::debugger::WINDOW_TYPE_CONSOLE); + util::xml::data_node *const splits = node->add_child(osd::debugger::NODE_WINDOW_SPLITS, nullptr); if (splits) { - splits->set_attribute_float("state", + splits->set_attribute_float(osd::debugger::ATTR_SPLITS_CONSOLE_STATE, [regSplit isSubviewCollapsed:[[regSplit subviews] objectAtIndex:0]] ? 0.0 : NSMaxX([[[regSplit subviews] objectAtIndex:0] frame])); - splits->set_attribute_float("disassembly", + splits->set_attribute_float(osd::debugger::ATTR_SPLITS_CONSOLE_DISASSEMBLY, [dasmSplit isSubviewCollapsed:[[dasmSplit subviews] objectAtIndex:0]] ? 0.0 : NSMaxY([[[dasmSplit subviews] objectAtIndex:0] frame])); @@ -442,12 +442,12 @@ - (void)restoreConfigurationFromNode:(util::xml::data_node const *)node { [super restoreConfigurationFromNode:node]; - util::xml::data_node const *const splits = node->get_child("splits"); + util::xml::data_node const *const splits = node->get_child(osd::debugger::NODE_WINDOW_SPLITS); if (splits) { - [regSplit setPosition:splits->get_attribute_float("state", NSMaxX([[[regSplit subviews] objectAtIndex:0] frame])) + [regSplit setPosition:splits->get_attribute_float(osd::debugger::ATTR_SPLITS_CONSOLE_STATE, NSMaxX([[[regSplit subviews] objectAtIndex:0] frame])) ofDividerAtIndex:0]; - [dasmSplit setPosition:splits->get_attribute_float("disassembly", NSMaxY([[[dasmSplit subviews] objectAtIndex:0] frame])) + [dasmSplit setPosition:splits->get_attribute_float(osd::debugger::ATTR_SPLITS_CONSOLE_DISASSEMBLY, NSMaxY([[[dasmSplit subviews] objectAtIndex:0] frame])) ofDividerAtIndex:0]; } [dasmView restoreConfigurationFromNode:node]; |