summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-07-24 10:24:10 +1000
committer Vas Crabb <vas@vastheman.com>2017-07-24 10:24:10 +1000
commit867f145b06b8d664f778ff8b9765485d66b4aafc (patch)
treeab620f3d4ac86742cfe3939a89c1ccf1e1717697 /src/osd/modules/debugger
parente9e209a34c8607b74811cd1c08bbfef8cadd214e (diff)
scope stuff down again, rvalue on left of ==, fewer early exits (nw)
Diffstat (limited to 'src/osd/modules/debugger')
-rw-r--r--src/osd/modules/debugger/win/consolewininfo.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp
index 1b7fd42b492..9662ec096cd 100644
--- a/src/osd/modules/debugger/win/consolewininfo.cpp
+++ b/src/osd/modules/debugger/win/consolewininfo.cpp
@@ -95,25 +95,27 @@ consolewin_info::~consolewin_info()
{
}
+
void consolewin_info::set_cpu(device_t &device)
{
// exit if this cpu is already selected
- if (m_current_cpu == &device)
- return;
- m_current_cpu = &device;
-
- // first set all the views to the new cpu number
- m_views[0]->set_source_for_device(device);
- m_views[1]->set_source_for_device(device);
-
- // then update the caption
- std::string title = string_format("Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag());
- std::string curtitle = win_get_window_text_utf8(window());
- if (title != curtitle)
- win_set_window_text_utf8(window(), title.c_str());
-
- // and recompute the children
- recompute_children();
+ if (&device != m_current_cpu)
+ {
+ m_current_cpu = &device;
+
+ // first set all the views to the new cpu number
+ m_views[0]->set_source_for_device(device);
+ m_views[1]->set_source_for_device(device);
+
+ // then update the caption
+ std::string title = string_format("Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag());
+ std::string curtitle = win_get_window_text_utf8(window());
+ if (title != curtitle)
+ win_set_window_text_utf8(window(), title.c_str());
+
+ // and recompute the children
+ recompute_children();
+ }
}