network: Added new ability for drivers to provide error information upon failed init. Updated translation strings. Fixed an issue with VDE configuration settings.
This commit is contained in:
@@ -163,6 +163,8 @@
|
||||
# define IDS_DYNAREC IDS_2163
|
||||
#endif
|
||||
#define IDS_2166 2166 // "Video card #2 ""%hs"" is not..."
|
||||
#define IDS_2167 2167 // "Network driver initialization failed"
|
||||
#define IDS_2168 2168 // "The network configuration will be switched to the null driver"
|
||||
|
||||
#define IDS_4096 4096 // "Hard disk (%s)"
|
||||
#define IDS_4097 4097 // "%01i:%01i"
|
||||
@@ -271,7 +273,7 @@
|
||||
|
||||
#define IDS_LANG_ENUS IDS_7168
|
||||
|
||||
#define STR_NUM_2048 118
|
||||
#define STR_NUM_2048 120
|
||||
// UNUSED: #define STR_NUM_3072 11
|
||||
#define STR_NUM_4096 40
|
||||
#define STR_NUM_4352 6
|
||||
|
@@ -64,6 +64,9 @@
|
||||
#define NET_PERIOD_10M 0.8
|
||||
#define NET_PERIOD_100M 0.08
|
||||
|
||||
/* Error buffers for network driver init */
|
||||
#define NET_DRV_ERRBUF_SIZE 384
|
||||
|
||||
enum {
|
||||
NET_LINK_DOWN = (1 << 1),
|
||||
NET_LINK_TEMP_DOWN = (1 << 2),
|
||||
@@ -118,7 +121,7 @@ typedef struct _netcard_t netcard_t;
|
||||
|
||||
typedef struct netdrv_t {
|
||||
void (*notify_in)(void *priv);
|
||||
void *(*init)(const netcard_t *card, const uint8_t *mac_addr, void *priv);
|
||||
void *(*init)(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf);
|
||||
void (*close)(void *priv);
|
||||
void *priv;
|
||||
} netdrv_t;
|
||||
|
@@ -158,7 +158,7 @@ net_null_thread(void *priv)
|
||||
#endif
|
||||
|
||||
void *
|
||||
net_null_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
net_null_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf)
|
||||
{
|
||||
net_null_log("Null Network: Init\n");
|
||||
|
||||
@@ -221,4 +221,4 @@ const netdrv_t net_null_drv = {
|
||||
&net_null_init,
|
||||
&net_null_close,
|
||||
NULL
|
||||
};
|
||||
};
|
||||
|
@@ -408,6 +408,15 @@ net_pcap_prepare(netdev_t *list)
|
||||
return (i);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy error message to the error buffer
|
||||
* and log if enabled.
|
||||
*/
|
||||
void net_pcap_error(char *errbuf, const char *message) {
|
||||
strncpy(errbuf, message, NET_DRV_ERRBUF_SIZE);
|
||||
pcap_log("PCAP: %s\n", message);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize (Win)Pcap for use.
|
||||
*
|
||||
@@ -416,18 +425,19 @@ net_pcap_prepare(netdev_t *list)
|
||||
* tries to attach to the network module.
|
||||
*/
|
||||
void *
|
||||
net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf)
|
||||
{
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
char *str;
|
||||
char filter_exp[255];
|
||||
struct bpf_program fp;
|
||||
char errbuf_prep[NET_DRV_ERRBUF_SIZE];
|
||||
|
||||
char *intf_name = (char *) priv;
|
||||
|
||||
/* Did we already load the library? */
|
||||
if (libpcap_handle == NULL) {
|
||||
pcap_log("PCAP: net_pcap_init without handle.\n");
|
||||
net_pcap_error(netdrv_errbuf, "net_pcap_init without handle");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -440,7 +450,7 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
|
||||
/* Get the value of our capture interface. */
|
||||
if ((intf_name[0] == '\0') || !strcmp(intf_name, "none")) {
|
||||
pcap_log("PCAP: no interface configured!\n");
|
||||
net_pcap_error(netdrv_errbuf, "No interface configured");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -451,7 +461,8 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
memcpy(pcap->mac_addr, mac_addr, sizeof(pcap->mac_addr));
|
||||
|
||||
if ((pcap->pcap = f_pcap_create(intf_name, errbuf)) == NULL) {
|
||||
pcap_log(" Unable to open device: %s!\n", intf_name);
|
||||
snprintf(errbuf_prep, NET_DRV_ERRBUF_SIZE, " Unable to open device: %s!\n", intf_name);
|
||||
net_pcap_error(netdrv_errbuf, errbuf_prep);
|
||||
free(pcap);
|
||||
return NULL;
|
||||
}
|
||||
@@ -469,7 +480,8 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
pcap_log("PCAP: error setting snaplen\n");
|
||||
|
||||
if (f_pcap_activate((void *) pcap->pcap) != 0) {
|
||||
pcap_log("PCAP: failed pcap_activate");
|
||||
snprintf(errbuf_prep, NET_DRV_ERRBUF_SIZE, "%s", (char *)f_pcap_geterr(pcap->pcap));
|
||||
net_pcap_error(netdrv_errbuf, errbuf_prep);
|
||||
f_pcap_close((void *) pcap->pcap);
|
||||
free(pcap);
|
||||
return NULL;
|
||||
@@ -484,13 +496,15 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
|
||||
if (f_pcap_compile((void *) pcap->pcap, &fp, filter_exp, 0, 0xffffffff) != -1) {
|
||||
if (f_pcap_setfilter((void *) pcap->pcap, &fp) != 0) {
|
||||
pcap_log("PCAP: error installing filter (%s) !\n", filter_exp);
|
||||
snprintf(errbuf_prep, NET_DRV_ERRBUF_SIZE, "Error installing filter (%s)\n", filter_exp);
|
||||
net_pcap_error(netdrv_errbuf, errbuf_prep);
|
||||
f_pcap_close((void *) pcap->pcap);
|
||||
free(pcap);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
pcap_log("PCAP: could not compile filter (%s) : %s!\n", filter_exp, f_pcap_geterr((void *) pcap->pcap));
|
||||
snprintf(errbuf_prep, NET_DRV_ERRBUF_SIZE, "Could not compile filter (%s) : %s!\n", filter_exp, (char *)f_pcap_geterr((void *) pcap->pcap));
|
||||
net_pcap_error(netdrv_errbuf, errbuf_prep);
|
||||
f_pcap_close((void *) pcap->pcap);
|
||||
free(pcap);
|
||||
return NULL;
|
||||
|
@@ -384,7 +384,7 @@ static int slirp_card_num = 2;
|
||||
|
||||
/* Initialize SLiRP for use. */
|
||||
void *
|
||||
net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf)
|
||||
{
|
||||
slirp_log("SLiRP: initializing...\n");
|
||||
net_slirp_t *slirp = calloc(1, sizeof(net_slirp_t));
|
||||
@@ -410,6 +410,7 @@ net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, void *priv)
|
||||
slirp->slirp = slirp_init(0, 1, net, mask, host, 0, ipv6_dummy, 0, ipv6_dummy, NULL, NULL, NULL, NULL, dhcp, dns, ipv6_dummy, NULL, NULL, &slirp_cb, slirp);
|
||||
if (!slirp->slirp) {
|
||||
slirp_log("SLiRP: initialization failed\n");
|
||||
snprintf(netdrv_errbuf, NET_DRV_ERRBUF_SIZE, "SLiRP initialization failed");
|
||||
free(slirp);
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -235,6 +235,15 @@ void net_vde_in_available(void *priv) {
|
||||
net_event_set(&vde->tx_event);
|
||||
}
|
||||
|
||||
//+
|
||||
// Copy error message to the error buffer
|
||||
// and log if enabled.
|
||||
//-
|
||||
void net_vde_error(char *errbuf, const char *message) {
|
||||
strncpy(errbuf, message, NET_DRV_ERRBUF_SIZE);
|
||||
vde_log("VDE: %s\n", message);
|
||||
}
|
||||
|
||||
//+
|
||||
// Initialize VDE for use
|
||||
// At this point the vdeplug library is already loaded
|
||||
@@ -242,19 +251,19 @@ void net_vde_in_available(void *priv) {
|
||||
// mac_addr: MAC address we are using
|
||||
// priv: Name of the VDE contol socket directory
|
||||
//-
|
||||
void *net_vde_init(const netcard_t *card, const uint8_t *mac_addr, void *priv) {
|
||||
void *net_vde_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *netdrv_errbuf) {
|
||||
struct vde_open_args vde_args;
|
||||
int i;
|
||||
|
||||
char *socket_name = (char *) priv;
|
||||
|
||||
if (libvde_handle == NULL) {
|
||||
vde_log("VDE: net_vde_init without library handle!\n");
|
||||
net_vde_error(netdrv_errbuf, "net_vde_init without library handle");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((socket_name[0] == '\0') || !strcmp(socket_name, "none")) {
|
||||
vde_log("VDE: No socket name configured!\n");
|
||||
net_vde_error(netdrv_errbuf, "No socket name configured");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -271,18 +280,10 @@ void *net_vde_init(const netcard_t *card, const uint8_t *mac_addr, void *priv) {
|
||||
// We are calling vde_open_real(), not the vde_open() macro...
|
||||
if ((vde->vdeconn = f_vde_open(socket_name, VDE_DESCRIPTION,
|
||||
LIBVDEPLUG_INTERFACE_VERSION, &vde_args)) == NULL) {
|
||||
vde_log("VDE: Unable to open socket %s (%s)!\n", socket_name, strerror(errno));
|
||||
char buf[NET_DRV_ERRBUF_SIZE];
|
||||
snprintf(buf, NET_DRV_ERRBUF_SIZE, "Unable to open socket %s (%s)", socket_name, strerror(errno));
|
||||
net_vde_error(netdrv_errbuf, buf);
|
||||
free(vde);
|
||||
//+
|
||||
// There is a bug upstream that causes an uncontrolled crash if the network is not
|
||||
// properly initialized.
|
||||
// To avoid that crash, we tell the user we cannot continue and exit the program.
|
||||
// TODO: Once there is a solution for the mentioned crash, this should be removed
|
||||
// and/or replaced by proper error handling code.
|
||||
//-
|
||||
// fatal("Could not open the specified VDE socket (%s). Please fix your networking configuration.", socket_name);
|
||||
// It makes no sense to issue this warning since the program will crash anyway...
|
||||
// ui_msgbox_header(MBX_WARNING, (wchar_t *) IDS_2167, (wchar_t *) IDS_2168);
|
||||
return NULL;
|
||||
}
|
||||
vde_log("VDE: Socket opened (%s).\n", socket_name);
|
||||
|
@@ -442,6 +442,9 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
|
||||
card->card_num = net_card_current;
|
||||
card->byte_period = NET_PERIOD_10M;
|
||||
|
||||
char net_drv_error[NET_DRV_ERRBUF_SIZE];
|
||||
wchar_t tempmsg[NET_DRV_ERRBUF_SIZE * 2];
|
||||
|
||||
for (int i = 0; i < NET_QUEUE_COUNT; i++) {
|
||||
network_queue_init(&card->queues[i]);
|
||||
}
|
||||
@@ -449,17 +452,17 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
|
||||
switch (net_cards_conf[net_card_current].net_type) {
|
||||
case NET_TYPE_SLIRP:
|
||||
card->host_drv = net_slirp_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, NULL);
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, NULL, net_drv_error);
|
||||
break;
|
||||
|
||||
case NET_TYPE_PCAP:
|
||||
card->host_drv = net_pcap_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name);
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name, net_drv_error);
|
||||
break;
|
||||
#ifdef HAS_VDE
|
||||
case NET_TYPE_VDE:
|
||||
card->host_drv = net_vde_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name);
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, net_cards_conf[net_card_current].host_dev_name, net_drv_error);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@@ -474,13 +477,14 @@ network_attach(void *card_drv, uint8_t *mac, NETRXCB rx, NETSETLINKSTATE set_lin
|
||||
|
||||
if(net_cards_conf[net_card_current].net_type != NET_TYPE_NONE) {
|
||||
// We're here because of a failure
|
||||
// Placeholder to display a msgbox about falling back to null
|
||||
ui_msgbox(MBX_ERROR | MBX_ANSI, "Network driver initialization failed. Falling back to NULL driver.");
|
||||
swprintf(tempmsg, sizeof_w(tempmsg), L"%ls:<br /><br />%s<br /><br />%ls", plat_get_string(IDS_2167), net_drv_error, plat_get_string(IDS_2168));
|
||||
ui_msgbox(MBX_ERROR, tempmsg);
|
||||
net_cards_conf[net_card_current].net_type = NET_TYPE_NONE;
|
||||
}
|
||||
|
||||
// Init null driver
|
||||
card->host_drv = net_null_drv;
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, NULL);
|
||||
card->host_drv.priv = card->host_drv.init(card, mac, NULL, net_drv_error);
|
||||
// Set link state to disconnected by default
|
||||
network_connect(card->card_num, 0);
|
||||
ui_sb_update_icon_state(SB_NETWORK | card->card_num, 1);
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% pod dokonalými ot./m"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Výchozí nastavení systému)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% unterhalb der perfekten Drehzahl"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Systemstandard)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% below perfect RPM"
|
||||
msgid "(System Default)"
|
||||
msgstr "(System Default)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% below perfect RPM"
|
||||
msgid "(System Default)"
|
||||
msgstr "(System Default)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% por debajo de RPM perfectas"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Por defecto del sistema)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,10 @@ msgstr "2% alle täydellisen RPM:n"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Järjestelmän oletus)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "Précision RPM de moins 2%"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Défaut du système)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% ispod savršenog broja okretaja"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Zadana postavka operativnog sustava)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2%-kal a tökéletes RPM alatt"
|
||||
msgid "(System Default)"
|
||||
msgstr "(A rendszer nyelve)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "RPM 2% sotto perfezione"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Predefinito del sistema)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2%低い回転数"
|
||||
msgid "(System Default)"
|
||||
msgstr "(システム既定値)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% 낮은 회전수"
|
||||
msgid "(System Default)"
|
||||
msgstr "(시스템 기본값)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% poniżej idealnych obrotów"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Domyślne ustawienie systemowe)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% abaixo das RPM perfeita"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Padrão do sistema)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "RPM 2% abaixo do RPM perfeito"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Padrão do sistema)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "На 2% медленнее точного RPM"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Системный)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "2% pod popolnimi obrati"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Sistemsko privzeto)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "mükemmel RPM değerinin 2% altı"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Sistem Varsayılanı)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "На 2% повільніше точного RPM"
|
||||
msgid "(System Default)"
|
||||
msgstr "(Системний)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1219,3 +1219,9 @@ msgstr "低于标准转速的 2%"
|
||||
msgid "(System Default)"
|
||||
msgstr "(系统默认)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -1218,3 +1218,10 @@ msgstr "低於標準轉速的 2%"
|
||||
|
||||
msgid "(System Default)"
|
||||
msgstr "(系統預設)"
|
||||
|
||||
msgid "Failed to initialize network driver"
|
||||
msgstr "Failed to initialize network driver"
|
||||
|
||||
msgid "The network configuration will be switched to the null driver"
|
||||
msgstr "The network configuration will be switched to the null driver"
|
||||
|
||||
|
@@ -602,6 +602,8 @@ ProgSettings::reloadStrings()
|
||||
translatedstrings[IDS_2143] = QCoreApplication::translate("", "Monitor in sleep mode").toStdWString();
|
||||
translatedstrings[IDS_2121] = QCoreApplication::translate("", "No ROMs found").toStdWString();
|
||||
translatedstrings[IDS_2056] = QCoreApplication::translate("", "86Box could not find any usable ROM images.\n\nPlease <a href=\"https://github.com/86Box/roms/releases/latest\">download</a> a ROM set and extract it into the \"roms\" directory.").toStdWString();
|
||||
translatedstrings[IDS_2167] = QCoreApplication::translate("", "Failed to initialize network driver").toStdWString();
|
||||
translatedstrings[IDS_2168] = QCoreApplication::translate("", "The network configuration will be switched to the null driver").toStdWString();
|
||||
|
||||
auto flsynthstr = QCoreApplication::translate("", " is required for FluidSynth MIDI output.");
|
||||
if (flsynthstr.contains("libfluidsynth")) {
|
||||
|
@@ -90,8 +90,7 @@ SettingsNetwork::save()
|
||||
if (net_cards_conf[i].net_type == NET_TYPE_PCAP) {
|
||||
strncpy(net_cards_conf[i].host_dev_name, network_devs[cbox->currentData().toInt()].device, sizeof(net_cards_conf[i].host_dev_name) - 1);
|
||||
} else if (net_cards_conf[i].net_type == NET_TYPE_VDE) {
|
||||
const char *str_socket = socket_line->text().toStdString().c_str();
|
||||
strncpy(net_cards_conf[i].host_dev_name, str_socket, strlen(str_socket));
|
||||
strncpy(net_cards_conf[i].host_dev_name, socket_line->text().toUtf8().constData(), sizeof(net_cards_conf[i].host_dev_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -546,6 +546,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -543,6 +543,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "두번째 비디오카드 ""%hs""는 roms/video 디렉토리에서 ROM이 누락되어 사용할 수 없습니다. 두번째 비디오 카드를 비활성화 합니다."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -545,6 +545,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Відеокарта #2 ""%hs"" недоступна через відсутність файлу її ПЗУ в каталозі roms/video. Відключення другої відеокарти."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -542,6 +542,8 @@ BEGIN
|
||||
IDS_2164 "Old Dynarec"
|
||||
IDS_2165 "New Dynarec"
|
||||
IDS_2166 "Video card #2 ""%hs"" is not available due to missing ROMs in the roms/video directory. Disabling the second video card."
|
||||
IDS_2167 "Failed to initialize network driver"
|
||||
IDS_2168 "The network configuration will be switched to the null driver"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
Reference in New Issue
Block a user