DeZog fix
This commit is contained in:
parent
09851a7211
commit
fcb9dd34ed
@ -161,7 +161,7 @@ void debugger_osx::wait_for_debugger(device_t &device, bool firststop)
|
|||||||
|
|
||||||
// get and process messages
|
// get and process messages
|
||||||
NSEvent *ev = [NSApp nextEventMatchingMask:NSEventMaskAny
|
NSEvent *ev = [NSApp nextEventMatchingMask:NSEventMaskAny
|
||||||
untilDate:[NSDate distantFuture]
|
untilDate:[NSDate dateWithTimeIntervalSinceNow:0.001]
|
||||||
inMode:NSDefaultRunLoopMode
|
inMode:NSDefaultRunLoopMode
|
||||||
dequeue:YES];
|
dequeue:YES];
|
||||||
if (ev != nil)
|
if (ev != nil)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Aaron Giles, Vas Crabb
|
// copyright-holders:Aaron Giles, Vas Crabb, Janko Stamenović
|
||||||
//============================================================
|
//============================================================
|
||||||
//
|
//
|
||||||
// debugwin.cpp - Win32 debug window handling
|
// debugwin.cpp - Win32 debug window handling
|
||||||
@ -39,6 +39,31 @@ namespace osd {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
class win_timer {
|
||||||
|
public:
|
||||||
|
win_timer() : m_timer_id(0) {}
|
||||||
|
~win_timer()
|
||||||
|
{
|
||||||
|
kill();
|
||||||
|
}
|
||||||
|
void set_timer(HWND hwnd, UINT_PTR id_event, UINT u_elapse)
|
||||||
|
{
|
||||||
|
kill();
|
||||||
|
m_idevent = id_event;
|
||||||
|
m_hwnd = hwnd;
|
||||||
|
m_timer_id = SetTimer(hwnd, id_event, u_elapse, (TIMERPROC)NULL);
|
||||||
|
}
|
||||||
|
void kill()
|
||||||
|
{
|
||||||
|
if (m_timer_id)
|
||||||
|
KillTimer(m_hwnd, m_idevent);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
UINT_PTR m_idevent;
|
||||||
|
HWND m_hwnd;
|
||||||
|
UINT_PTR m_timer_id;
|
||||||
|
};
|
||||||
|
|
||||||
class debugger_windows :
|
class debugger_windows :
|
||||||
public osd_module,
|
public osd_module,
|
||||||
public debug_module,
|
public debug_module,
|
||||||
@ -118,6 +143,8 @@ private:
|
|||||||
bool m_save_windows;
|
bool m_save_windows;
|
||||||
bool m_group_windows;
|
bool m_group_windows;
|
||||||
bool m_group_windows_setting;
|
bool m_group_windows_setting;
|
||||||
|
|
||||||
|
win_timer m_min_periodic_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -161,10 +188,10 @@ void debugger_windows::wait_for_debugger(device_t &device, bool firststop)
|
|||||||
{
|
{
|
||||||
m_main_console = create_window<debugger::win::consolewin_info>();
|
m_main_console = create_window<debugger::win::consolewin_info>();
|
||||||
|
|
||||||
|
HWND const front_hwnd = dynamic_cast<win_window_info &>(*osd_common_t::window_list().front()).platform_window();
|
||||||
|
|
||||||
// set the starting position for new auxiliary windows
|
// set the starting position for new auxiliary windows
|
||||||
HMONITOR const nearest_monitor = MonitorFromWindow(
|
HMONITOR const nearest_monitor = MonitorFromWindow(front_hwnd, MONITOR_DEFAULTTONEAREST);
|
||||||
dynamic_cast<win_window_info &>(*osd_common_t::window_list().front()).platform_window(),
|
|
||||||
MONITOR_DEFAULTTONEAREST);
|
|
||||||
if (nearest_monitor)
|
if (nearest_monitor)
|
||||||
{
|
{
|
||||||
MONITORINFO info;
|
MONITORINFO info;
|
||||||
@ -177,6 +204,11 @@ void debugger_windows::wait_for_debugger(device_t &device, bool firststop)
|
|||||||
m_window_start_x = m_next_window_pos.x;
|
m_window_start_x = m_next_window_pos.x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 10 == 100 times per second tick to interrupt GetMessage
|
||||||
|
// when no user input messages happen
|
||||||
|
// which allows lua's periodic to be called periodically
|
||||||
|
m_min_periodic_timer.set_timer(front_hwnd, WM_USER+1, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the views in the console to reflect the current CPU
|
// update the views in the console to reflect the current CPU
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user