mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
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:
parent
927be66938
commit
e9e209a34c
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
|
consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
|
||||||
disasmbasewin_info(debugger, true, "Debug", nullptr),
|
disasmbasewin_info(debugger, true, "Debug", nullptr),
|
||||||
|
m_current_cpu(nullptr),
|
||||||
m_devices_menu(nullptr)
|
m_devices_menu(nullptr)
|
||||||
{
|
{
|
||||||
if ((window() == nullptr) || (m_views[0] == nullptr))
|
if ((window() == nullptr) || (m_views[0] == nullptr))
|
||||||
@ -94,9 +95,13 @@ consolewin_info::~consolewin_info()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void consolewin_info::set_cpu(device_t &device)
|
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
|
// first set all the views to the new cpu number
|
||||||
m_views[0]->set_source_for_device(device);
|
m_views[0]->set_source_for_device(device);
|
||||||
m_views[1]->set_source_for_device(device);
|
m_views[1]->set_source_for_device(device);
|
||||||
|
@ -49,6 +49,7 @@ private:
|
|||||||
static void copy_extension_list(std::string &dest, char const *extensions);
|
static void copy_extension_list(std::string &dest, char const *extensions);
|
||||||
bool get_softlist_info(device_image_interface *img);
|
bool get_softlist_info(device_image_interface *img);
|
||||||
|
|
||||||
|
device_t *m_current_cpu;
|
||||||
HMENU m_devices_menu;
|
HMENU m_devices_menu;
|
||||||
std::map<std::string,std::string> slmap;
|
std::map<std::string,std::string> slmap;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user