From f88a1e17286dbdb23feedd95c047ef22aaf38646 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 4 Feb 2023 02:23:32 -0500 Subject: [PATCH 1/2] Fix a warning due to extranious text --- src/win/languages/pt-BR.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/languages/pt-BR.rc b/src/win/languages/pt-BR.rc index fa47b6aab..97c354c03 100644 --- a/src/win/languages/pt-BR.rc +++ b/src/win/languages/pt-BR.rc @@ -109,7 +109,7 @@ BEGIN MENUITEM "&Preferências...", IDM_PREFERENCES #ifdef DISCORD MENUITEM "Ativar integração com o &Discord", IDM_DISCORD -#endif DISCORD +#endif MENUITEM SEPARATOR MENUITEM "&Ganho de som...", IDM_SND_GAIN #ifdef MTR_ENABLED From 5d752db6a7bdeab04b9f46f2176dd37999cd35ba Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 4 Feb 2023 01:24:11 -0500 Subject: [PATCH 2/2] Underlying plumbing for multi-net in win32 ui --- src/include/86box/resource.h | 334 +++++++++++++++++++---------------- src/win/languages/cs-CZ.rc | 6 +- src/win/languages/de-DE.rc | 6 +- src/win/languages/dialogs.rc | 8 +- src/win/languages/en-GB.rc | 6 +- src/win/languages/en-US.rc | 6 +- src/win/languages/es-ES.rc | 6 +- src/win/languages/fi-FI.rc | 4 + src/win/languages/fr-FR.rc | 6 +- src/win/languages/hr-HR.rc | 6 +- src/win/languages/hu-HU.rc | 6 +- src/win/languages/it-IT.rc | 6 +- src/win/languages/ja-JP.rc | 6 +- src/win/languages/ko-KR.rc | 6 +- src/win/languages/pl-PL.rc | 6 +- src/win/languages/pt-BR.rc | 4 + src/win/languages/pt-PT.rc | 6 +- src/win/languages/ru-RU.rc | 6 +- src/win/languages/sl-SI.rc | 6 +- src/win/languages/tr-TR.rc | 6 +- src/win/languages/uk-UA.rc | 6 +- src/win/languages/zh-CN.rc | 6 +- src/win/languages/zh-TW.rc | 6 +- src/win/win_settings.c | 177 ++++++++++++------- 24 files changed, 394 insertions(+), 247 deletions(-) diff --git a/src/include/86box/resource.h b/src/include/86box/resource.h index edcb1891a..10f3a4224 100644 --- a/src/include/86box/resource.h +++ b/src/include/86box/resource.h @@ -90,74 +90,78 @@ #define IDT_NET_TYPE 1725 /* Network type: */ #define IDT_PCAP 1726 /* PCap device: */ #define IDT_NET 1727 /* Network adapter: */ +#define IDT_NET1 1728 /* Network adapter 1: */ +#define IDT_NET2 1729 /* Network adapter 2: */ +#define IDT_NET3 1730 /* Network adapter 3: */ +#define IDT_NET4 1731 /* Network adapter 4: */ /* DLG_CFG_PORTS */ -#define IDT_COM1 1728 /* COM1 Device: */ -#define IDT_COM2 1729 /* COM1 Device: */ -#define IDT_COM3 1730 /* COM1 Device: */ -#define IDT_COM4 1731 /* COM1 Device: */ +#define IDT_COM1 1732 /* COM1 Device: */ +#define IDT_COM2 1733 /* COM1 Device: */ +#define IDT_COM3 1734 /* COM1 Device: */ +#define IDT_COM4 1735 /* COM1 Device: */ -#define IDT_LPT1 1732 /* LPT1 Device: */ -#define IDT_LPT2 1733 /* LPT2 Device: */ -#define IDT_LPT3 1734 /* LPT3 Device: */ -#define IDT_LPT4 1735 /* LPT4 Device: */ +#define IDT_LPT1 1736 /* LPT1 Device: */ +#define IDT_LPT2 1737 /* LPT2 Device: */ +#define IDT_LPT3 1738 /* LPT3 Device: */ +#define IDT_LPT4 1739 /* LPT4 Device: */ /* DLG_CFG_STORAGE */ -#define IDT_HDC 1736 /* HD Controller: */ -#define IDT_FDC 1737 /* Ext FD Controller: */ -#define IDT_SCSI_1 1738 /* SCSI Board #1: */ -#define IDT_SCSI_2 1739 /* SCSI Board #2: */ -#define IDT_SCSI_3 1740 /* SCSI Board #3: */ -#define IDT_SCSI_4 1742 /* SCSI Board #4: */ +#define IDT_HDC 1740 /* HD Controller: */ +#define IDT_FDC 1741 /* Ext FD Controller: */ +#define IDT_SCSI_1 1742 /* SCSI Board #1: */ +#define IDT_SCSI_2 1743 /* SCSI Board #2: */ +#define IDT_SCSI_3 1744 /* SCSI Board #3: */ +#define IDT_SCSI_4 1745 /* SCSI Board #4: */ /* DLG_CFG_HARD_DISKS */ -#define IDT_HDD 1743 /* Hard disks: */ -#define IDT_BUS 1744 /* Bus: */ -#define IDT_CHANNEL 1745 /* Channel: */ -#define IDT_ID 1746 /* ID: */ -#define IDT_LUN 1747 /* LUN: */ -#define IDT_SPEED 1748 /* Speed: */ +#define IDT_HDD 1746 /* Hard disks: */ +#define IDT_BUS 1747 /* Bus: */ +#define IDT_CHANNEL 1748 /* Channel: */ +#define IDT_ID 1749 /* ID: */ +#define IDT_LUN 1750 /* LUN: */ +#define IDT_SPEED 1751 /* Speed: */ /* DLG_CFG_HARD_DISKS_ADD */ -#define IDT_SECTORS 1749 /* Sectors: */ -#define IDT_HEADS 1750 /* Heads: */ -#define IDT_CYLS 1751 /* Cylinders: */ -#define IDT_SIZE_MB 1752 /* Size (MB): */ -#define IDT_TYPE 1753 /* Type: */ -#define IDT_FILE_NAME 1754 /* File name: */ -#define IDT_IMG_FORMAT 1755 /* Image Format: */ -#define IDT_BLOCK_SIZE 1756 /* Block Size: */ -#define IDT_PROGRESS 1757 /* Progress: */ +#define IDT_SECTORS 1752 /* Sectors: */ +#define IDT_HEADS 1753 /* Heads: */ +#define IDT_CYLS 1754 /* Cylinders: */ +#define IDT_SIZE_MB 1755 /* Size (MB): */ +#define IDT_TYPE 1756 /* Type: */ +#define IDT_FILE_NAME 1757 /* File name: */ +#define IDT_IMG_FORMAT 1758 /* Image Format: */ +#define IDT_BLOCK_SIZE 1759 /* Block Size: */ +#define IDT_PROGRESS 1760 /* Progress: */ /* DLG_CFG_FLOPPY_AND_CDROM_DRIVES */ -#define IDT_FLOPPY_DRIVES 1758 /* Floppy drives: */ -#define IDT_FDD_TYPE 1759 /* Type: */ -#define IDT_CD_DRIVES 1760 /* CD-ROM drives: */ -#define IDT_CD_BUS 1761 /* Bus: */ -#define IDT_CD_ID 1762 /* ID: */ -#define IDT_CD_LUN 1763 /* LUN: */ -#define IDT_CD_CHANNEL 1764 /* Channel: */ -#define IDT_CD_SPEED 1765 /* Speed: */ +#define IDT_FLOPPY_DRIVES 1761 /* Floppy drives: */ +#define IDT_FDD_TYPE 1762 /* Type: */ +#define IDT_CD_DRIVES 1763 /* CD-ROM drives: */ +#define IDT_CD_BUS 1764 /* Bus: */ +#define IDT_CD_ID 1765 /* ID: */ +#define IDT_CD_LUN 1766 /* LUN: */ +#define IDT_CD_CHANNEL 1767 /* Channel: */ +#define IDT_CD_SPEED 1768 /* Speed: */ /* DLG_CFG_OTHER_REMOVABLE_DEVICES */ -#define IDT_MO_DRIVES 1766 /* MO drives: */ -#define IDT_MO_BUS 1767 /* Bus: */ -#define IDT_MO_ID 1768 /* ID: */ -#define IDT_MO_CHANNEL 1769 /* Channel */ -#define IDT_MO_TYPE 1770 /* Type: */ +#define IDT_MO_DRIVES 1769 /* MO drives: */ +#define IDT_MO_BUS 1770 /* Bus: */ +#define IDT_MO_ID 1771 /* ID: */ +#define IDT_MO_CHANNEL 1772 /* Channel */ +#define IDT_MO_TYPE 1773 /* Type: */ -#define IDT_ZIP_DRIVES 1771 /* ZIP drives: */ -#define IDT_ZIP_BUS 1772 /* Bus: */ -#define IDT_ZIP_ID 1773 /* ID: */ -#define IDT_ZIP_LUN 1774 /* LUN: */ -#define IDT_ZIP_CHANNEL 1775 /* Channel: */ +#define IDT_ZIP_DRIVES 1774 /* ZIP drives: */ +#define IDT_ZIP_BUS 1775 /* Bus: */ +#define IDT_ZIP_ID 1776 /* ID: */ +#define IDT_ZIP_LUN 1777 /* LUN: */ +#define IDT_ZIP_CHANNEL 1778 /* Channel: */ /* DLG_CFG_PERIPHERALS */ -#define IDT_ISARTC 1776 /* ISA RTC: */ -#define IDT_ISAMEM_1 1777 /* ISAMEM Board #1: */ -#define IDT_ISAMEM_2 1778 /* ISAMEM Board #2: */ -#define IDT_ISAMEM_3 1779 /* ISAMEM Board #3: */ -#define IDT_ISAMEM_4 1780 /* ISAMEM Board #4: */ +#define IDT_ISARTC 1779 /* ISA RTC: */ +#define IDT_ISAMEM_1 1780 /* ISAMEM Board #1: */ +#define IDT_ISAMEM_2 1781 /* ISAMEM Board #2: */ +#define IDT_ISAMEM_3 1782 /* ISAMEM Board #3: */ +#define IDT_ISAMEM_4 1783 /* ISAMEM Board #4: */ /* * To try to keep these organized, we now group the @@ -218,109 +222,118 @@ #define IDC_RADIO_FM_DRV_NUKED 1054 #define IDC_RADIO_FM_DRV_YMFM 1055 -#define IDC_COMBO_NET_TYPE 1060 /* network config */ -#define IDC_COMBO_PCAP 1061 -#define IDC_COMBO_NET 1062 +#define IDC_COMBO_NET1_TYPE 1060 /* network config */ +#define IDC_COMBO_NET2_TYPE 1061 +#define IDC_COMBO_NET3_TYPE 1062 +#define IDC_COMBO_NET4_TYPE 1063 +#define IDC_COMBO_PCAP1 1064 +#define IDC_COMBO_PCAP2 1065 +#define IDC_COMBO_PCAP3 1066 +#define IDC_COMBO_PCAP4 1067 +#define IDC_COMBO_NET1 1068 +#define IDC_COMBO_NET2 1069 +#define IDC_COMBO_NET3 1070 +#define IDC_COMBO_NET4 1071 -#define IDC_COMBO_LPT1 1070 /* ports config */ -#define IDC_COMBO_LPT2 1071 -#define IDC_COMBO_LPT3 1072 -#define IDC_COMBO_LPT4 1073 -#define IDC_CHECK_SERIAL1 1074 -#define IDC_CHECK_SERIAL2 1075 -#define IDC_CHECK_SERIAL3 1076 -#define IDC_CHECK_SERIAL4 1077 -#define IDC_CHECK_PARALLEL1 1078 -#define IDC_CHECK_PARALLEL2 1079 -#define IDC_CHECK_PARALLEL3 1080 -#define IDC_CHECK_PARALLEL4 1081 +#define IDC_COMBO_LPT1 1080 /* ports config */ +#define IDC_COMBO_LPT2 1081 +#define IDC_COMBO_LPT3 1082 +#define IDC_COMBO_LPT4 1083 +#define IDC_CHECK_SERIAL1 1084 +#define IDC_CHECK_SERIAL2 1085 +#define IDC_CHECK_SERIAL3 1086 +#define IDC_CHECK_SERIAL4 1087 +#define IDC_CHECK_PARALLEL1 1088 +#define IDC_CHECK_PARALLEL2 1089 +#define IDC_CHECK_PARALLEL3 1090 +#define IDC_CHECK_PARALLEL4 1091 -#define IDC_OTHER_PERIPH 1082 /* storage controllers config */ -#define IDC_COMBO_HDC 1083 -#define IDC_CONFIGURE_HDC 1084 -#define IDC_CHECK_IDE_TER 1085 -#define IDC_BUTTON_IDE_TER 1086 -#define IDC_CHECK_IDE_QUA 1087 -#define IDC_BUTTON_IDE_QUA 1088 -#define IDC_GROUP_SCSI 1089 -#define IDC_COMBO_SCSI_1 1090 -#define IDC_COMBO_SCSI_2 1091 -#define IDC_COMBO_SCSI_3 1092 -#define IDC_COMBO_SCSI_4 1093 -#define IDC_CONFIGURE_SCSI_1 1094 -#define IDC_CONFIGURE_SCSI_2 1095 -#define IDC_CONFIGURE_SCSI_3 1096 -#define IDC_CONFIGURE_SCSI_4 1097 -#define IDC_CHECK_CASSETTE 1098 +#define IDC_OTHER_PERIPH 1110 /* storage controllers config */ +#define IDC_COMBO_HDC 1111 +#define IDC_CONFIGURE_HDC 1112 +#define IDC_CHECK_IDE_TER 1113 +#define IDC_BUTTON_IDE_TER 1114 +#define IDC_CHECK_IDE_QUA 1115 +#define IDC_BUTTON_IDE_QUA 1116 +#define IDC_GROUP_SCSI 1117 +#define IDC_COMBO_SCSI_1 1118 +#define IDC_COMBO_SCSI_2 1119 +#define IDC_COMBO_SCSI_3 1120 +#define IDC_COMBO_SCSI_4 1121 +#define IDC_CONFIGURE_SCSI_1 1122 +#define IDC_CONFIGURE_SCSI_2 1123 +#define IDC_CONFIGURE_SCSI_3 1124 +#define IDC_CONFIGURE_SCSI_4 1125 +#define IDC_CHECK_CASSETTE 1126 -#define IDC_HARD_DISKS 1100 /* hard disks config */ -#define IDC_LIST_HARD_DISKS 1101 -#define IDC_BUTTON_HDD_ADD_NEW 1102 -#define IDC_BUTTON_HDD_ADD 1103 -#define IDC_BUTTON_HDD_REMOVE 1104 -#define IDC_COMBO_HD_BUS 1105 -#define IDC_COMBO_HD_CHANNEL 1106 -#define IDC_COMBO_HD_ID 1107 -#define IDC_COMBO_HD_LUN 1108 -#define IDC_COMBO_HD_CHANNEL_IDE 1109 +#define IDC_HARD_DISKS 1130 /* hard disks config */ +#define IDC_LIST_HARD_DISKS 1131 +#define IDC_BUTTON_HDD_ADD_NEW 1132 +#define IDC_BUTTON_HDD_ADD 1133 +#define IDC_BUTTON_HDD_REMOVE 1134 +#define IDC_COMBO_HD_BUS 1135 +#define IDC_COMBO_HD_CHANNEL 1136 +#define IDC_COMBO_HD_ID 1137 +#define IDC_COMBO_HD_LUN 1138 +#define IDC_COMBO_HD_CHANNEL_IDE 1139 -#define IDC_EDIT_HD_FILE_NAME 1110 /* add hard disk dialog */ -#define IDC_EDIT_HD_SPT 1111 -#define IDC_EDIT_HD_HPC 1112 -#define IDC_EDIT_HD_CYL 1113 -#define IDC_EDIT_HD_SIZE 1114 -#define IDC_COMBO_HD_TYPE 1115 -#define IDC_PBAR_IMG_CREATE 1116 -#define IDC_COMBO_HD_IMG_FORMAT 1117 -#define IDC_COMBO_HD_BLOCK_SIZE 1118 +#define IDC_EDIT_HD_FILE_NAME 1140 /* add hard disk dialog */ +#define IDC_EDIT_HD_SPT 1141 +#define IDC_EDIT_HD_HPC 1142 +#define IDC_EDIT_HD_CYL 1143 +#define IDC_EDIT_HD_SIZE 1144 +#define IDC_COMBO_HD_TYPE 1145 +#define IDC_PBAR_IMG_CREATE 1146 +#define IDC_COMBO_HD_IMG_FORMAT 1147 +#define IDC_COMBO_HD_BLOCK_SIZE 1148 -#define IDC_REMOV_DEVICES 1120 /* floppy and cd-rom drives config */ -#define IDC_LIST_FLOPPY_DRIVES 1121 -#define IDC_COMBO_FD_TYPE 1122 -#define IDC_CHECKTURBO 1123 -#define IDC_CHECKBPB 1124 -#define IDC_LIST_CDROM_DRIVES 1125 -#define IDC_COMBO_CD_BUS 1126 -#define IDC_COMBO_CD_ID 1127 -#define IDC_COMBO_CD_LUN 1128 -#define IDC_COMBO_CD_CHANNEL_IDE 1129 -#define IDC_CHECKEARLY 1130 +#define IDC_REMOV_DEVICES 1150 /* floppy and cd-rom drives config */ +#define IDC_LIST_FLOPPY_DRIVES 1151 +#define IDC_COMBO_FD_TYPE 1152 +#define IDC_CHECKTURBO 1153 +#define IDC_CHECKBPB 1154 +#define IDC_LIST_CDROM_DRIVES 1155 +#define IDC_COMBO_CD_BUS 1156 +#define IDC_COMBO_CD_ID 1157 +#define IDC_COMBO_CD_LUN 1158 +#define IDC_COMBO_CD_CHANNEL_IDE 1159 +#define IDC_CHECKEARLY 1160 -#define IDC_LIST_ZIP_DRIVES 1140 /* other removable devices config */ -#define IDC_COMBO_ZIP_BUS 1141 -#define IDC_COMBO_ZIP_ID 1142 -#define IDC_COMBO_ZIP_LUN 1143 -#define IDC_COMBO_ZIP_CHANNEL_IDE 1144 -#define IDC_CHECK250 1145 -#define IDC_COMBO_CD_SPEED 1146 -#define IDC_LIST_MO_DRIVES 1147 -#define IDC_COMBO_MO_BUS 1148 -#define IDC_COMBO_MO_ID 1149 -#define IDC_COMBO_MO_LUN 1150 -#define IDC_COMBO_MO_CHANNEL_IDE 1151 -#define IDC_COMBO_MO_TYPE 1152 +#define IDC_LIST_ZIP_DRIVES 1170 /* other removable devices config */ +#define IDC_COMBO_ZIP_BUS 1171 +#define IDC_COMBO_ZIP_ID 1172 +#define IDC_COMBO_ZIP_LUN 1173 +#define IDC_COMBO_ZIP_CHANNEL_IDE 1174 +#define IDC_CHECK250 1175 +#define IDC_COMBO_CD_SPEED 1176 +#define IDC_LIST_MO_DRIVES 1177 +#define IDC_COMBO_MO_BUS 1178 +#define IDC_COMBO_MO_ID 1179 +#define IDC_COMBO_MO_LUN 1170 +#define IDC_COMBO_MO_CHANNEL_IDE 1181 +#define IDC_COMBO_MO_TYPE 1182 -#define IDC_CHECK_BUGGER 1160 /* other periph config */ -#define IDC_CHECK_POSTCARD 1161 -#define IDC_COMBO_ISARTC 1162 -#define IDC_CONFIGURE_ISARTC 1163 -#define IDC_COMBO_FDC 1164 -#define IDC_CONFIGURE_FDC 1165 -#define IDC_GROUP_ISAMEM 1166 -#define IDC_COMBO_ISAMEM_1 1167 -#define IDC_COMBO_ISAMEM_2 1168 -#define IDC_COMBO_ISAMEM_3 1169 -#define IDC_COMBO_ISAMEM_4 1170 -#define IDC_CONFIGURE_ISAMEM_1 1171 -#define IDC_CONFIGURE_ISAMEM_2 1172 -#define IDC_CONFIGURE_ISAMEM_3 1173 -#define IDC_CONFIGURE_ISAMEM_4 1174 +#define IDC_CHECK_BUGGER 1190 /* other periph config */ +#define IDC_CHECK_POSTCARD 1191 +#define IDC_COMBO_ISARTC 1192 +#define IDC_CONFIGURE_ISARTC 1193 +#define IDC_COMBO_FDC 1194 +#define IDC_CONFIGURE_FDC 1195 +#define IDC_GROUP_ISAMEM 1196 +#define IDC_COMBO_ISAMEM_1 1197 +#define IDC_COMBO_ISAMEM_2 1198 +#define IDC_COMBO_ISAMEM_3 1199 +#define IDC_COMBO_ISAMEM_4 1200 +#define IDC_CONFIGURE_ISAMEM_1 1201 +#define IDC_CONFIGURE_ISAMEM_2 1202 +#define IDC_CONFIGURE_ISAMEM_3 1203 +#define IDC_CONFIGURE_ISAMEM_4 1204 -#define IDC_SLIDER_GAIN 1180 /* sound gain dialog */ +#define IDC_SLIDER_GAIN 1210 /* sound gain dialog */ -#define IDC_EDIT_FILE_NAME 1200 /* new floppy image dialog */ -#define IDC_COMBO_DISK_SIZE 1201 -#define IDC_COMBO_RPM_MODE 1202 +#define IDC_EDIT_FILE_NAME 1220 /* new floppy image dialog */ +#define IDC_COMBO_DISK_SIZE 1221 +#define IDC_COMBO_RPM_MODE 1222 #define IDC_COMBO_LANG 1009 /* change language dialog */ #define IDC_COMBO_ICON 1010 @@ -337,17 +350,24 @@ #define IDC_CONFIGURE_SND3 1304 #define IDC_CONFIGURE_SND4 1305 #define IDC_CONFIGURE_VOODOO 1306 -#define IDC_CONFIGURE_MOD 1307 -#define IDC_CONFIGURE_NET_TYPE 1308 -#define IDC_CONFIGURE_BUSLOGIC 1309 -#define IDC_CONFIGURE_PCAP 1310 -#define IDC_CONFIGURE_NET 1311 -#define IDC_CONFIGURE_MIDI_OUT 1312 -#define IDC_CONFIGURE_MIDI_IN 1313 -#define IDC_JOY1 1314 -#define IDC_JOY2 1315 -#define IDC_JOY3 1316 -#define IDC_JOY4 1317 +#define IDC_CONFIGURE_NET1_TYPE 1310 +#define IDC_CONFIGURE_NET2_TYPE 1311 +#define IDC_CONFIGURE_NET3_TYPE 1312 +#define IDC_CONFIGURE_NET4_TYPE 1313 +#define IDC_CONFIGURE_PCAP1 1314 +#define IDC_CONFIGURE_PCAP2 1315 +#define IDC_CONFIGURE_PCAP3 1316 +#define IDC_CONFIGURE_PCAP4 1317 +#define IDC_CONFIGURE_NET1 1318 +#define IDC_CONFIGURE_NET2 1319 +#define IDC_CONFIGURE_NET3 1320 +#define IDC_CONFIGURE_NET4 1321 +#define IDC_CONFIGURE_MIDI_OUT 1322 +#define IDC_CONFIGURE_MIDI_IN 1323 +#define IDC_JOY1 1330 +#define IDC_JOY2 1331 +#define IDC_JOY3 1332 +#define IDC_JOY4 1333 #define IDC_HDTYPE 1380 #define IDC_RENDER 1381 #define IDC_STATUS 1382 diff --git a/src/win/languages/cs-CZ.rc b/src/win/languages/cs-CZ.rc index 6ce8c4438..2c50e5316 100644 --- a/src/win/languages/cs-CZ.rc +++ b/src/win/languages/cs-CZ.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (přesnější)" #define STR_FM_DRV_YMFM "YMFM (rychlejší)" -#define STR_NET_TYPE "Druh sítě:" +#define STR_NET_TYPE "Druh sítě:" #define STR_PCAP "PCap zařízení:" #define STR_NET "Síťový adaptér:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Zařízení na COM1:" #define STR_COM2 "Zařízení na COM2:" diff --git a/src/win/languages/de-DE.rc b/src/win/languages/de-DE.rc index fe79c2e21..0f9517038 100644 --- a/src/win/languages/de-DE.rc +++ b/src/win/languages/de-DE.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (genauer)" #define STR_FM_DRV_YMFM "YMFM (schneller)" -#define STR_NET_TYPE "Netzwerktyp:" +#define STR_NET_TYPE "Netzwerktyp:" #define STR_PCAP "PCap-Gerät:" #define STR_NET "Netzwerkadapter:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1-Gerät:" #define STR_COM2 "COM2-Gerät:" diff --git a/src/win/languages/dialogs.rc b/src/win/languages/dialogs.rc index 30c3e4e50..5a150324c 100644 --- a/src/win/languages/dialogs.rc +++ b/src/win/languages/dialogs.rc @@ -397,22 +397,22 @@ FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_NET_TYPE, IDT_NET_TYPE, CFG_HMARGIN, CFG_VMARGIN, CFG_PANE_LTEXT_PRI_WIDTH, CFG_PANE_LTEXT_HEIGHT - COMBOBOX IDC_COMBO_NET_TYPE, + COMBOBOX IDC_COMBO_NET1_TYPE, CFG_COMBO_BOX_LEFT, 7, CFG_COMBO_NOBTN_WIDTH, CFG_COMBO_HEIGHT, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT STR_PCAP, IDT_PCAP, CFG_HMARGIN, 28, CFG_PANE_LTEXT_PRI_WIDTH, CFG_PANE_LTEXT_HEIGHT - COMBOBOX IDC_COMBO_PCAP, + COMBOBOX IDC_COMBO_PCAP1, CFG_COMBO_BOX_LEFT, 26, CFG_COMBO_NOBTN_WIDTH, CFG_COMBO_HEIGHT, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT STR_NET, IDT_NET, CFG_HMARGIN, 47, CFG_PANE_LTEXT_PRI_WIDTH, CFG_PANE_LTEXT_HEIGHT - COMBOBOX IDC_COMBO_NET, + COMBOBOX IDC_COMBO_NET1, CFG_COMBO_BOX_LEFT, 45, CFG_COMBO_BTN_WIDTH, CFG_COMBO_HEIGHT, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON STR_CONFIGURE, IDC_CONFIGURE_NET, + PUSHBUTTON STR_CONFIGURE, IDC_CONFIGURE_NET1, CFG_COMBO_BTN_LEFT, 44, CFG_BTN_WIDTH, CFG_BTN_HEIGHT END diff --git a/src/win/languages/en-GB.rc b/src/win/languages/en-GB.rc index aaec696ba..7b849bef2 100644 --- a/src/win/languages/en-GB.rc +++ b/src/win/languages/en-GB.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (more accurate)" #define STR_FM_DRV_YMFM "YMFM (faster)" -#define STR_NET_TYPE "Network type:" +#define STR_NET_TYPE "Network type:" #define STR_PCAP "PCap device:" #define STR_NET "Network adapter:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 Device:" #define STR_COM2 "COM2 Device:" diff --git a/src/win/languages/en-US.rc b/src/win/languages/en-US.rc index ef639d934..8f279e355 100644 --- a/src/win/languages/en-US.rc +++ b/src/win/languages/en-US.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (more accurate)" #define STR_FM_DRV_YMFM "YMFM (faster)" -#define STR_NET_TYPE "Network type:" +#define STR_NET_TYPE "Network type:" #define STR_PCAP "PCap device:" #define STR_NET "Network adapter:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 Device:" #define STR_COM2 "COM2 Device:" diff --git a/src/win/languages/es-ES.rc b/src/win/languages/es-ES.rc index 4a1c098f6..3e1f746ba 100644 --- a/src/win/languages/es-ES.rc +++ b/src/win/languages/es-ES.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (más preciso)" #define STR_FM_DRV_YMFM "YMFM (más rápido)" -#define STR_NET_TYPE "Tipo de red:" +#define STR_NET_TYPE "Tipo de red:" #define STR_PCAP "Dispositivo PCap:" #define STR_NET "Adaptador de red:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Dispositivo COM1:" #define STR_COM2 "Dispositivo COM2:" diff --git a/src/win/languages/fi-FI.rc b/src/win/languages/fi-FI.rc index 8927f2f0b..1eee0df45 100644 --- a/src/win/languages/fi-FI.rc +++ b/src/win/languages/fi-FI.rc @@ -301,6 +301,10 @@ END #define STR_NET_TYPE "Verkon tyyppi:" #define STR_PCAP "PCap-laite:" #define STR_NET "Verkkokortti:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1-laite:" #define STR_COM2 "COM2-laite:" diff --git a/src/win/languages/fr-FR.rc b/src/win/languages/fr-FR.rc index 57e14d5e5..29ccb911d 100644 --- a/src/win/languages/fr-FR.rc +++ b/src/win/languages/fr-FR.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (plus précis)" #define STR_FM_DRV_YMFM "YMFM (plus rapide)" -#define STR_NET_TYPE "Type de réseau:" +#define STR_NET_TYPE "Type de réseau:" #define STR_PCAP "Dispositif PCap:" #define STR_NET "Adaptateur de réseau:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Dispositif COM1:" #define STR_COM2 "Dispositif COM2:" diff --git a/src/win/languages/hr-HR.rc b/src/win/languages/hr-HR.rc index 7753e89e0..317ceccef 100644 --- a/src/win/languages/hr-HR.rc +++ b/src/win/languages/hr-HR.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (precizniji)" #define STR_FM_DRV_YMFM "YMFM (brži)" -#define STR_NET_TYPE "Tip mreže:" +#define STR_NET_TYPE "Tip mreže:" #define STR_PCAP "Uređaj PCap:" #define STR_NET "Mrežna kartica:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Uređaj COM1:" #define STR_COM2 "Uređaj COM2:" diff --git a/src/win/languages/hu-HU.rc b/src/win/languages/hu-HU.rc index 007118fbe..8a90cdfe6 100644 --- a/src/win/languages/hu-HU.rc +++ b/src/win/languages/hu-HU.rc @@ -303,9 +303,13 @@ END #define STR_FM_DRV_NUKED "Nuked (pontosabb)" #define STR_FM_DRV_YMFM "YMFM (gyorsabb)" -#define STR_NET_TYPE "Hálózati típusa:" +#define STR_NET_TYPE "Hálózati típusa:" #define STR_PCAP "PCap eszköz:" #define STR_NET "Hálózati kártya:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 eszköz:" #define STR_COM2 "COM2 eszköz:" diff --git a/src/win/languages/it-IT.rc b/src/win/languages/it-IT.rc index 2151bcd2b..38189f706 100644 --- a/src/win/languages/it-IT.rc +++ b/src/win/languages/it-IT.rc @@ -299,9 +299,13 @@ END #define STR_FM_DRV_NUKED "Nuked (più accurato)" #define STR_FM_DRV_YMFM "YMFM (più veloce)" -#define STR_NET_TYPE "Tipo di rete:" +#define STR_NET_TYPE "Tipo di rete:" #define STR_PCAP "Dispositivo PCap:" #define STR_NET "Scheda di rete:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Dispositivo COM1:" #define STR_COM2 "Dispositivo COM2:" diff --git a/src/win/languages/ja-JP.rc b/src/win/languages/ja-JP.rc index c5f1545a3..daf28f011 100644 --- a/src/win/languages/ja-JP.rc +++ b/src/win/languages/ja-JP.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (高精度化)" #define STR_FM_DRV_YMFM "YMFM (より速く)" -#define STR_NET_TYPE "ネットワークタイプ:" +#define STR_NET_TYPE "ネットワークタイプ:" #define STR_PCAP "PCapデバイス:" #define STR_NET "ネットワークアダプター:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1デバイス:" #define STR_COM2 "COM2デバイス:" diff --git a/src/win/languages/ko-KR.rc b/src/win/languages/ko-KR.rc index e35cbe313..f967286dd 100644 --- a/src/win/languages/ko-KR.rc +++ b/src/win/languages/ko-KR.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (더 정확한)" #define STR_FM_DRV_YMFM "YMFM (더 빠르게)" -#define STR_NET_TYPE "네트워크 종류:" +#define STR_NET_TYPE "네트워크 종류:" #define STR_PCAP "PCap 장치:" #define STR_NET "네트워크 어댑터:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 장치:" #define STR_COM2 "COM2 장치:" diff --git a/src/win/languages/pl-PL.rc b/src/win/languages/pl-PL.rc index 2932306bd..412076305 100644 --- a/src/win/languages/pl-PL.rc +++ b/src/win/languages/pl-PL.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (dokładniejszy)" #define STR_FM_DRV_YMFM "YMFM (szybszy)" -#define STR_NET_TYPE "Rodzaj sieci:" +#define STR_NET_TYPE "Rodzaj sieci:" #define STR_PCAP "Urządzenie PCap:" #define STR_NET "Karta sieciowa:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Urządzenie COM1:" #define STR_COM2 "Urządzenie COM2:" diff --git a/src/win/languages/pt-BR.rc b/src/win/languages/pt-BR.rc index fa47b6aab..4c8c57cea 100644 --- a/src/win/languages/pt-BR.rc +++ b/src/win/languages/pt-BR.rc @@ -304,6 +304,10 @@ END #define STR_NET_TYPE "Tipo de rede:" #define STR_PCAP "Dispositivo PCap:" #define STR_NET "Adaptador de rede:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Dispositivo COM1:" #define STR_COM2 "Dispositivo COM2:" diff --git a/src/win/languages/pt-PT.rc b/src/win/languages/pt-PT.rc index d771628b8..188b0a930 100644 --- a/src/win/languages/pt-PT.rc +++ b/src/win/languages/pt-PT.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (mais exacto)" #define STR_FM_DRV_YMFM "YMFM (mais rápido)" -#define STR_NET_TYPE "Tipo de rede:" +#define STR_NET_TYPE "Tipo de rede:" #define STR_PCAP "Dispositivo PCap:" #define STR_NET "Placa de rede:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Dispositivo COM1:" #define STR_COM2 "Dispositivo COM2:" diff --git a/src/win/languages/ru-RU.rc b/src/win/languages/ru-RU.rc index 13b802be5..32e6ed32d 100644 --- a/src/win/languages/ru-RU.rc +++ b/src/win/languages/ru-RU.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (более точный)" #define STR_FM_DRV_YMFM "YMFM (быстрей)" -#define STR_NET_TYPE "Тип сети:" +#define STR_NET_TYPE "Тип сети:" #define STR_PCAP "Устройство PCap:" #define STR_NET "Сетевая карта:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Устройство COM1:" #define STR_COM2 "Устройство COM2:" diff --git a/src/win/languages/sl-SI.rc b/src/win/languages/sl-SI.rc index 493ed4c8a..93f2c4d98 100644 --- a/src/win/languages/sl-SI.rc +++ b/src/win/languages/sl-SI.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (točnejši)" #define STR_FM_DRV_YMFM "YMFM (hitrejši)" -#define STR_NET_TYPE "Vrsta omrežja:" +#define STR_NET_TYPE "Vrsta omrežja:" #define STR_PCAP "Naprava PCap:" #define STR_NET "Omrežna kartica:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Naprava COM1:" #define STR_COM2 "Naprava COM2:" diff --git a/src/win/languages/tr-TR.rc b/src/win/languages/tr-TR.rc index 7ea555647..2c72f2bdf 100644 --- a/src/win/languages/tr-TR.rc +++ b/src/win/languages/tr-TR.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (daha doğru)" #define STR_FM_DRV_YMFM "YMFM (daha hızlı)" -#define STR_NET_TYPE "Ağ tipi:" +#define STR_NET_TYPE "Ağ tipi:" #define STR_PCAP "PCap cihazı:" #define STR_NET "Ağ cihazı:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 Cihazı:" #define STR_COM2 "COM2 Cihazı:" diff --git a/src/win/languages/uk-UA.rc b/src/win/languages/uk-UA.rc index 5b278c833..0dc2a544d 100644 --- a/src/win/languages/uk-UA.rc +++ b/src/win/languages/uk-UA.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (більш точний)" #define STR_FM_DRV_YMFM "YMFM (швидший)" -#define STR_NET_TYPE "Тип мережі:" +#define STR_NET_TYPE "Тип мережі:" #define STR_PCAP "Пристрій PCap:" #define STR_NET "Мережева карта:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "Пристрій COM1:" #define STR_COM2 "Пристрій COM2:" diff --git a/src/win/languages/zh-CN.rc b/src/win/languages/zh-CN.rc index 0e4d2d538..945194968 100644 --- a/src/win/languages/zh-CN.rc +++ b/src/win/languages/zh-CN.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (更准确)" #define STR_FM_DRV_YMFM "YMFM (更快)" -#define STR_NET_TYPE "网络类型:" +#define STR_NET_TYPE "网络类型:" #define STR_PCAP "PCap 设备:" #define STR_NET "网络适配器:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 设备:" #define STR_COM2 "COM2 设备:" diff --git a/src/win/languages/zh-TW.rc b/src/win/languages/zh-TW.rc index 88b49f492..6e5ed0321 100644 --- a/src/win/languages/zh-TW.rc +++ b/src/win/languages/zh-TW.rc @@ -298,9 +298,13 @@ END #define STR_FM_DRV_NUKED "Nuked (更準確)" #define STR_FM_DRV_YMFM "YMFM (更快)" -#define STR_NET_TYPE "網路類型:" +#define STR_NET_TYPE "網路類型:" #define STR_PCAP "PCap 裝置:" #define STR_NET "網路配接器:" +#define STR_NET1 "Network card 1:" +#define STR_NET2 "Network card 2:" +#define STR_NET3 "Network card 3:" +#define STR_NET4 "Network card 4:" #define STR_COM1 "COM1 裝置:" #define STR_COM2 "COM2 裝置:" diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 475ab69fd..ea8d356b9 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -104,8 +104,9 @@ static int temp_midi_output_device, temp_midi_input_device, temp_mpu401; static int temp_float, temp_fm_driver; /* Network category */ -static int temp_net_type, temp_net_card; -static char temp_pcap_dev[128]; +static int temp_net_type[NET_CARD_MAX]; +static int temp_net_card[NET_CARD_MAX]; +static char temp_pcap_dev[NET_CARD_MAX][128]; /* Ports category */ static int temp_lpt_devices[PARALLEL_MAX]; @@ -345,13 +346,15 @@ win_settings_init(void) temp_fm_driver = fm_driver; /* Network category */ - temp_net_type = net_cards_conf[0].net_type; - memset(temp_pcap_dev, 0, sizeof(temp_pcap_dev)); -#ifdef ENABLE_SETTINGS_LOG - assert(sizeof(temp_pcap_dev) == sizeof(net_cards_conf[0].host_dev_name)); -#endif - memcpy(temp_pcap_dev, net_cards_conf[0].host_dev_name, sizeof(net_cards_conf[0].host_dev_name)); - temp_net_card = net_cards_conf[0].device_num; + for (i = 0; i < NET_CARD_MAX; i++) { + temp_net_type[i] = net_cards_conf[i].net_type; + memset(temp_pcap_dev[i], 0, sizeof(temp_pcap_dev[i])); +# ifdef ENABLE_SETTINGS_LOG + assert(sizeof(temp_pcap_dev[i]) == sizeof(net_cards_conf[i].host_dev_name)); +# endif + memcpy(temp_pcap_dev[i], net_cards_conf[i].host_dev_name, sizeof(net_cards_conf[i].host_dev_name)); + temp_net_card[i] = net_cards_conf[i].device_num; + } /* Ports category */ for (i = 0; i < PARALLEL_MAX; i++) { @@ -470,9 +473,11 @@ win_settings_changed(void) i = i || (fm_driver != temp_fm_driver); /* Network category */ - i = i || (net_cards_conf[0].net_type != temp_net_type); - i = i || strcmp(temp_pcap_dev, net_cards_conf[0].host_dev_name); - i = i || (net_cards_conf[0].device_num != temp_net_card); + for (j = 0; j < NET_CARD_MAX; j++) { + i = i || (net_cards_conf[j].net_type != temp_net_type[j]); + i = i || strcmp(temp_pcap_dev[j], net_cards_conf[j].host_dev_name); + i = i || (net_cards_conf[j].device_num != temp_net_card[j]); + } /* Ports category */ for (j = 0; j < PARALLEL_MAX; j++) { @@ -561,10 +566,12 @@ win_settings_save(void) fm_driver = temp_fm_driver; /* Network category */ - net_cards_conf[0].net_type = temp_net_type; - memset(net_cards_conf[0].host_dev_name, '\0', sizeof(net_cards_conf[0].host_dev_name)); - strcpy(net_cards_conf[0].host_dev_name, temp_pcap_dev); - net_cards_conf[0].device_num = temp_net_card; + for (i = 0; i < NET_CARD_MAX; i++) { + net_cards_conf[i].net_type = temp_net_type[i]; + memset(net_cards_conf[i].host_dev_name, '\0', sizeof(net_cards_conf[i].host_dev_name)); + strcpy(net_cards_conf[i].host_dev_name, temp_pcap_dev[i]); + net_cards_conf[i].device_num = temp_net_card[i]; + } /* Ports category */ for (i = 0; i < PARALLEL_MAX; i++) { @@ -2003,10 +2010,16 @@ network_recalc_combos(HWND hdlg) { ignore_change = 1; - settings_enable_window(hdlg, IDC_COMBO_PCAP, temp_net_type == NET_TYPE_PCAP); - settings_enable_window(hdlg, IDC_COMBO_NET, - (temp_net_type == NET_TYPE_SLIRP) || ((temp_net_type == NET_TYPE_PCAP) && (network_dev_to_id(temp_pcap_dev) > 0))); - settings_enable_window(hdlg, IDC_CONFIGURE_NET, network_card_has_config(temp_net_card) && ((temp_net_type == NET_TYPE_SLIRP) || ((temp_net_type == NET_TYPE_PCAP) && (network_dev_to_id(temp_pcap_dev) > 0)))); +#if 0 + for (uint8_t i = 0; i < NET_CARD_MAX; i++) { +#endif + settings_enable_window(hdlg, IDC_COMBO_PCAP1, temp_net_type[0] == NET_TYPE_PCAP); + settings_enable_window(hdlg, IDC_COMBO_NET1, + (temp_net_type[0] == NET_TYPE_SLIRP) || ((temp_net_type[0] == NET_TYPE_PCAP) && (network_dev_to_id(temp_pcap_dev[0]) > 0))); + settings_enable_window(hdlg, IDC_CONFIGURE_NET1, network_card_has_config(temp_net_card[0]) && ((temp_net_type[0] == NET_TYPE_SLIRP) || ((temp_net_type[0] == NET_TYPE_PCAP) && (network_dev_to_id(temp_pcap_dev[0]) > 0)))); +#if 0 + } +#endif ignore_change = 0; } @@ -2025,90 +2038,120 @@ win_settings_network_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_INITDIALOG: lptsTemp = (LPTSTR) malloc(512 * sizeof(WCHAR)); - settings_add_string(hdlg, IDC_COMBO_NET_TYPE, (LPARAM) L"None"); - settings_add_string(hdlg, IDC_COMBO_NET_TYPE, (LPARAM) L"SLiRP"); - settings_add_string(hdlg, IDC_COMBO_NET_TYPE, (LPARAM) L"PCap"); - settings_set_cur_sel(hdlg, IDC_COMBO_NET_TYPE, temp_net_type); - settings_enable_window(hdlg, IDC_COMBO_PCAP, temp_net_type == NET_TYPE_PCAP); +#if 0 + for (uint8_t i = 0; i < NET_CARD_MAX; i++) { +#endif + settings_add_string(hdlg, IDC_COMBO_NET1_TYPE, (LPARAM) L"None"); + settings_add_string(hdlg, IDC_COMBO_NET1_TYPE, (LPARAM) L"SLiRP"); + settings_add_string(hdlg, IDC_COMBO_NET1_TYPE, (LPARAM) L"PCap"); + settings_set_cur_sel(hdlg, IDC_COMBO_NET1_TYPE, temp_net_type[0]); + settings_enable_window(hdlg, IDC_COMBO_PCAP1, temp_net_type[0] == NET_TYPE_PCAP); - for (c = 0; c < network_ndev; c++) { - mbstowcs(lptsTemp, network_devs[c].description, strlen(network_devs[c].description) + 1); - settings_add_string(hdlg, IDC_COMBO_PCAP, (LPARAM) lptsTemp); - } - settings_set_cur_sel(hdlg, IDC_COMBO_PCAP, network_dev_to_id(temp_pcap_dev)); + for (c = 0; c < network_ndev; c++) { + mbstowcs(lptsTemp, network_devs[c].description, strlen(network_devs[c].description) + 1); + settings_add_string(hdlg, IDC_COMBO_PCAP1, (LPARAM) lptsTemp); + } + settings_set_cur_sel(hdlg, IDC_COMBO_PCAP1, network_dev_to_id(temp_pcap_dev[0])); - /* NIC config */ - c = d = 0; - settings_reset_content(hdlg, IDC_COMBO_NET); - while (1) { - generate_device_name(network_card_getdevice(c), network_card_get_internal_name(c), 1); + /* NIC config */ + c = d = 0; + settings_reset_content(hdlg, IDC_COMBO_NET1); + while (1) { + generate_device_name(network_card_getdevice(c), network_card_get_internal_name(c), 1); - if (device_name[0] == L'\0') - break; + if (device_name[0] == L'\0') + break; - if (network_card_available(c) && device_is_valid(network_card_getdevice(c), temp_machine)) { - if (c == 0) - settings_add_string(hdlg, IDC_COMBO_NET, win_get_string(IDS_2104)); - else - settings_add_string(hdlg, IDC_COMBO_NET, (LPARAM) device_name); - settings_list_to_device[0][d] = c; - if ((c == 0) || (c == temp_net_card)) - settings_set_cur_sel(hdlg, IDC_COMBO_NET, d); - d++; + if (network_card_available(c) && device_is_valid(network_card_getdevice(c), temp_machine)) { + if (c == 0) + settings_add_string(hdlg, IDC_COMBO_NET1, win_get_string(IDS_2104)); + else + settings_add_string(hdlg, IDC_COMBO_NET1, (LPARAM) device_name); + settings_list_to_device[0][d] = c; + if ((c == 0) || (c == temp_net_card[0])) + settings_set_cur_sel(hdlg, IDC_COMBO_NET1, d); + d++; + } + + c++; } - c++; + settings_enable_window(hdlg, IDC_COMBO_NET1, d); + network_recalc_combos(hdlg); + free(lptsTemp); +#if 0 } - - settings_enable_window(hdlg, IDC_COMBO_NET, d); - network_recalc_combos(hdlg); - free(lptsTemp); - +#endif return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { - case IDC_COMBO_NET_TYPE: + case IDC_COMBO_NET1_TYPE: +#if 0 + case IDC_COMBO_NET2_TYPE: + case IDC_COMBO_NET3_TYPE: + case IDC_COMBO_NET4_TYPE: +#endif if (ignore_change) return FALSE; - temp_net_type = settings_get_cur_sel(hdlg, IDC_COMBO_NET_TYPE); + temp_net_type[0] = settings_get_cur_sel(hdlg, IDC_COMBO_NET1_TYPE); network_recalc_combos(hdlg); break; - case IDC_COMBO_PCAP: + case IDC_COMBO_PCAP1: +#if 0 + case IDC_COMBO_PCAP2: + case IDC_COMBO_PCAP3: + case IDC_COMBO_PCAP4: +#endif if (ignore_change) return FALSE; - memset(temp_pcap_dev, '\0', sizeof(temp_pcap_dev)); - strcpy(temp_pcap_dev, network_devs[settings_get_cur_sel(hdlg, IDC_COMBO_PCAP)].device); + memset(temp_pcap_dev[0], '\0', sizeof(temp_pcap_dev[0])); + strcpy(temp_pcap_dev[0], network_devs[settings_get_cur_sel(hdlg, IDC_COMBO_PCAP1)].device); network_recalc_combos(hdlg); break; - case IDC_COMBO_NET: + case IDC_COMBO_NET1: +#if 0 + case IDC_COMBO_NET2: + case IDC_COMBO_NET3: + case IDC_COMBO_NET4: +#endif if (ignore_change) return FALSE; - temp_net_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET)]; + temp_net_card[0] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET1)]; network_recalc_combos(hdlg); break; - case IDC_CONFIGURE_NET: + case IDC_CONFIGURE_NET1: +#if 0 + case IDC_CONFIGURE_NET2: + case IDC_CONFIGURE_NET3: + case IDC_CONFIGURE_NET4: +#endif if (ignore_change) return FALSE; - temp_net_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET)]; - temp_deviceconfig |= deviceconfig_open(hdlg, (void *) network_card_getdevice(temp_net_card)); + temp_net_card[0] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET1)]; + temp_deviceconfig |= deviceconfig_open(hdlg, (void *) network_card_getdevice(temp_net_card[0])); break; } return FALSE; case WM_SAVESETTINGS: - temp_net_type = settings_get_cur_sel(hdlg, IDC_COMBO_NET_TYPE); - memset(temp_pcap_dev, '\0', sizeof(temp_pcap_dev)); - strcpy(temp_pcap_dev, network_devs[settings_get_cur_sel(hdlg, IDC_COMBO_PCAP)].device); - temp_net_card = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET)]; - +#if 0 + for (uint8_t i = 0; i < NET_CARD_MAX; i++) { +#endif + temp_net_type[0] = settings_get_cur_sel(hdlg, IDC_COMBO_NET1_TYPE); + memset(temp_pcap_dev[0], '\0', sizeof(temp_pcap_dev[0])); + strcpy(temp_pcap_dev[0], network_devs[settings_get_cur_sel(hdlg, IDC_COMBO_PCAP1)].device); + temp_net_card[0] = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_NET1)]; +#if 0 + } +#endif default: return FALSE; }