1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// license:BSD-3-Clause
// copyright-holders:F.Ulivi
/***************************************************************************
ui/info_pty.cpp
Information screen on pseudo terminals
***************************************************************************/
#include "emu.h"
#include "ui/info_pty.h"
#include "dipty.h"
namespace ui {
menu_pty_info::menu_pty_info(mame_ui_manager &mui, render_container &container) :
menu(mui, container)
{
}
menu_pty_info::~menu_pty_info()
{
}
void menu_pty_info::populate(float &customtop, float &custombottom)
{
item_append(_("Pseudo terminals"), "", FLAG_DISABLE, nullptr);
item_append("", "", FLAG_DISABLE, nullptr);
for (device_pty_interface &pty : pty_interface_iterator(machine().root_device()))
{
const char *port_name = pty.device().owner()->tag() + 1;
if (pty.is_open())
item_append(port_name, pty.slave_name(), FLAG_DISABLE, nullptr);
else
item_append(port_name, _("[failed]"), FLAG_DISABLE, nullptr);
item_append("", "", FLAG_DISABLE, nullptr);
}
}
void menu_pty_info::handle()
{
process(0);
}
} // namespace ui
|