mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
2a2a4a3c6e
@ -278,6 +278,7 @@ static DView * focus_view;
|
||||
static ui_menu * menu;
|
||||
static DView_edit * cur_editor;
|
||||
static int win_count;
|
||||
static void* menu_sel; // selected item in the menu
|
||||
|
||||
static void set_focus_view(DView *dv)
|
||||
{
|
||||
@ -1017,7 +1018,7 @@ static void on_memory_window_activate(DView *dv, const ui_menu_event *event)
|
||||
ndv->ofs_x = ndv->ofs_y = win_count * TITLE_HEIGHT;
|
||||
ndv->bounds.setx(0,500);
|
||||
win_count++;
|
||||
|
||||
dview_set_state(ndv,VIEW_STATE_VISIBLE,true);
|
||||
set_focus_view(ndv);
|
||||
}
|
||||
|
||||
@ -1036,6 +1037,7 @@ static void on_disassembly_window_activate(DView *dv, const ui_menu_event *event
|
||||
dview_set_title(ndv, source->name());
|
||||
ndv->ofs_x = ndv->ofs_y = win_count * TITLE_HEIGHT;
|
||||
win_count++;
|
||||
dview_set_state(ndv,VIEW_STATE_VISIBLE,true);
|
||||
set_focus_view(ndv);
|
||||
}
|
||||
|
||||
@ -1065,6 +1067,7 @@ static void on_log_window_activate(DView *dv, const ui_menu_event *event)
|
||||
ndv->ofs_x = ndv->ofs_y = win_count * TITLE_HEIGHT;
|
||||
ndv->bounds.setx(0,600);
|
||||
win_count++;
|
||||
dview_set_state(ndv,VIEW_STATE_VISIBLE,true);
|
||||
set_focus_view(ndv);
|
||||
}
|
||||
|
||||
@ -1079,6 +1082,7 @@ static void on_bp_window_activate(DView *dv, const ui_menu_event *event)
|
||||
ndv->ofs_x = ndv->ofs_y = win_count * TITLE_HEIGHT;
|
||||
ndv->bounds.setx(0,600);
|
||||
win_count++;
|
||||
dview_set_state(ndv,VIEW_STATE_VISIBLE,true);
|
||||
set_focus_view(ndv);
|
||||
}
|
||||
|
||||
@ -1093,6 +1097,7 @@ static void on_wp_window_activate(DView *dv, const ui_menu_event *event)
|
||||
ndv->ofs_x = ndv->ofs_y = win_count * TITLE_HEIGHT;
|
||||
ndv->bounds.setx(0,600);
|
||||
win_count++;
|
||||
dview_set_state(ndv,VIEW_STATE_VISIBLE,true);
|
||||
set_focus_view(ndv);
|
||||
}
|
||||
|
||||
@ -1318,7 +1323,10 @@ static void CreateMainMenu(running_machine &machine)
|
||||
std::string title;
|
||||
|
||||
if (menu)
|
||||
{
|
||||
menu_sel = menu->get_selection();
|
||||
global_free( menu);
|
||||
}
|
||||
menu = global_alloc_clear<ui_menu_debug>(machine, &machine.render().ui_container());
|
||||
|
||||
switch (focus_view->type)
|
||||
@ -1419,6 +1427,7 @@ static void CreateMainMenu(running_machine &machine)
|
||||
if (!dview_is_state(focus_view, VIEW_STATE_FOLLOW_CPU))
|
||||
menu->item_append("Close Window", "[Shift+F4]", 0, (void *)on_close_activate);
|
||||
menu->item_append("Exit", nullptr, 0, (void *)on_exit_activate);
|
||||
menu->set_selection(menu_sel);
|
||||
}
|
||||
|
||||
static int map_point(DView *dv, INT32 target_x, INT32 target_y, INT32 *mapped_x, INT32 *mapped_y)
|
||||
@ -1731,6 +1740,7 @@ static void handle_menus(running_machine &machine)
|
||||
}
|
||||
else if (ui_input_pressed(machine, IPT_UI_CONFIGURE))
|
||||
{
|
||||
menu_sel = menu->get_selection();
|
||||
global_free(menu);
|
||||
menu = nullptr;
|
||||
}
|
||||
@ -1819,8 +1829,8 @@ void debug_internal::wait_for_debugger(device_t &device, bool firststop)
|
||||
win_count++;
|
||||
|
||||
DView *statewin = dview_alloc(target, device.machine(), DVT_STATE, VIEW_STATE_FOLLOW_CPU);
|
||||
statewin->ofs_x = 350;
|
||||
statewin->bounds.set(0,150,0,600);
|
||||
statewin->ofs_x = 300;
|
||||
statewin->bounds.set(0,200,0,600);
|
||||
win_count++;
|
||||
|
||||
DView *console = dview_alloc(target, device.machine(), DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU);
|
||||
@ -1835,9 +1845,11 @@ void debug_internal::wait_for_debugger(device_t &device, bool firststop)
|
||||
}
|
||||
|
||||
followers_set_cpu(&device);
|
||||
debug_show_all();
|
||||
if(firststop)
|
||||
{
|
||||
debug_show_all();
|
||||
ui_input_reset(device.machine());
|
||||
}
|
||||
//ui_update_and_render(device.machine(), device.machine().render().ui_container()());
|
||||
update_views();
|
||||
device.machine().osd().update(false);
|
||||
|
Loading…
Reference in New Issue
Block a user