Beispiel #1
0
void ui_menu_network_devices::populate()
{
	/* cycle through all devices for this system */
	for (device_network_interface &network : network_interface_iterator(machine().root_device()))
	{
		int curr = network.get_interface();
		const char *title = nullptr;
		const osd_netdev::entry_t *entry = netdev_first();
		while(entry) {
			if(entry->id==curr) {
				title = entry->description;
				break;
			}
			entry = entry->m_next;
		}

		item_append(network.device().tag(),  (title) ? title : "------", MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)network);
	}
}
Beispiel #2
0
void osd_list_network_adapters(void)
{
	#ifdef USE_NETWORK
	int num_devs = netdev_list.count();

	if (num_devs == 0)
	{
		printf("No network adapters were found\n");
		return;
	}

	printf("Available network adapters:\n");
	const osd_netdev::entry_t *entry = netdev_first();
	while(entry) {
		printf("    %s\n", entry->description);
		entry = entry->m_next;
	}

	#else
	printf("Network is not supported in this build\n");
	#endif
}