mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
change initialization order, removes need for additional checks (nw)
This commit is contained in:
parent
e96fd34dd8
commit
04a5484b49
@ -224,6 +224,9 @@ void running_machine::start()
|
||||
// allocate a soft_reset timer
|
||||
m_soft_reset_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::soft_reset), this));
|
||||
|
||||
// intialize UI input
|
||||
m_ui_input = std::make_unique<ui_input_manager>(*this);
|
||||
|
||||
// init the osd layer
|
||||
m_manager.osd().init(*this);
|
||||
|
||||
@ -241,9 +244,6 @@ void running_machine::start()
|
||||
if (newbase != 0)
|
||||
m_base_time = newbase;
|
||||
|
||||
// intialize UI input
|
||||
m_ui_input = std::make_unique<ui_input_manager>(*this);
|
||||
|
||||
// initialize the streams engine before the sound devices start
|
||||
m_sound = std::make_unique<sound_manager>(*this);
|
||||
|
||||
|
@ -1292,18 +1292,15 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
|
||||
|
||||
// input events
|
||||
case WM_MOUSEMOVE:
|
||||
if (window->machine().phase() != MACHINE_PHASE_RUNNING) break;
|
||||
window->machine().ui_input().push_mouse_move_event(window->m_target, GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam));
|
||||
break;
|
||||
|
||||
case WM_MOUSELEAVE:
|
||||
if (window->machine().phase() != MACHINE_PHASE_RUNNING) break;
|
||||
window->machine().ui_input().push_mouse_leave_event(window->m_target);
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
{
|
||||
if (window->machine().phase() != MACHINE_PHASE_RUNNING) break;
|
||||
DWORD ticks = GetTickCount();
|
||||
window->machine().ui_input().push_mouse_down_event(window->m_target, GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam));
|
||||
|
||||
@ -1325,12 +1322,10 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
|
||||
}
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if (window->machine().phase() != MACHINE_PHASE_RUNNING) break;
|
||||
window->machine().ui_input().push_mouse_up_event(window->m_target, GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam));
|
||||
break;
|
||||
|
||||
case WM_CHAR:
|
||||
if (window->machine().phase() != MACHINE_PHASE_RUNNING) break;
|
||||
window->machine().ui_input().push_char_event(window->m_target, (unicode_char) wparam);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user