In class consolewin_info method set_cpu does nothing if the cpu to be set is the current one (nw)

This solves a problem in the windows debugger where the registers view would always return to the topafter being scrolled down.
This commit is contained in:
yz70s 2017-07-23 15:04:13 +02:00
parent a068cbd5d1
commit 0d8155ab2c
2 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,7 @@
consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
disasmbasewin_info(debugger, true, "Debug", nullptr),
m_current_cpu(nullptr),
m_devices_menu(nullptr)
{
if ((window() == nullptr) || (m_views[0] == nullptr))
@ -94,9 +95,13 @@ 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);

View File

@ -49,6 +49,7 @@ private:
static void copy_extension_list(std::string &dest, char const *extensions);
bool get_softlist_info(device_image_interface *img);
device_t *m_current_cpu;
HMENU m_devices_menu;
std::map<std::string,std::string> slmap;
};