Applied all mainline PCem commits;

Removed SCSI thread waiting (except after executing the READ SUBCHANNEL command, to alleviate the effects of READ SUBCHANNEL spam done by CD players).
This commit is contained in:
OBattler
2017-09-02 23:39:26 +02:00
parent c0d1e5b4b2
commit 4c3532f31e
19 changed files with 846 additions and 292 deletions

View File

@@ -8,7 +8,7 @@
*
* Windows resource script.
*
* Version: @(#)86Box.rc 1.0.7 2017/08/26
* Version: @(#)86Box.rc 1.0.8 2017/09/02
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
@@ -358,7 +358,24 @@ BEGIN
END
#endif
DLG_CFG_PERIPHERALS DIALOG DISCARDABLE 97, 0, 267, 115
DLG_CFG_PORTS DIALOG DISCARDABLE 97, 0, 267, 61
STYLE DS_CONTROL | WS_CHILD
FONT 9, "Segoe UI"
BEGIN
LTEXT "LPT1 Device:",IDT_1716,7,8,61,10
COMBOBOX IDC_COMBO_LPT1,71,7,189,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Serial port 1",IDC_CHECK_SERIAL1,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,26,94,10
CONTROL "Serial port 2",IDC_CHECK_SERIAL2,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,147,26,94,10
CONTROL "Parallel port",IDC_CHECK_PARALLEL,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,44,94,10
END
DLG_CFG_PERIPHERALS DIALOG DISCARDABLE 97, 0, 267, 97
STYLE DS_CONTROL | WS_CHILD
FONT 9, "Segoe UI"
BEGIN
@@ -379,15 +396,8 @@ BEGIN
COMBOBOX IDC_COMBO_IDE_QUA,71,61,189,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Serial port 1",IDC_CHECK_SERIAL1,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10
CONTROL "Serial port 2",IDC_CHECK_SERIAL2,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,147,80,94,10
CONTROL "Parallel port",IDC_CHECK_PARALLEL,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,98,94,10
CONTROL "ISABugger device",IDC_CHECK_BUGGER,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,147,98,94,10
BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10
END
DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 97, 0, 267, 154
@@ -529,13 +539,15 @@ END
259 ICON DISCARDABLE "win/icons/sound.ico"
#ifdef USE_NETWORK
260 ICON DISCARDABLE "win/icons/network.ico"
261 ICON DISCARDABLE "win/icons/ports.ico"
262 ICON DISCARDABLE "win/icons/other_peripherals.ico"
263 ICON DISCARDABLE "win/icons/hard_disk.ico"
264 ICON DISCARDABLE "win/icons/removable_devices.ico"
#else
260 ICON DISCARDABLE "win/icons/ports.ico"
261 ICON DISCARDABLE "win/icons/other_peripherals.ico"
262 ICON DISCARDABLE "win/icons/hard_disk.ico"
263 ICON DISCARDABLE "win/icons/removable_devices.ico"
#else
260 ICON DISCARDABLE "win/icons/other_peripherals.ico"
261 ICON DISCARDABLE "win/icons/hard_disk.ico"
262 ICON DISCARDABLE "win/icons/removable_devices.ico"
#endif
384 ICON DISCARDABLE "win/icons/floppy_525_empty.ico"
385 ICON DISCARDABLE "win/icons/floppy_525_empty_active.ico"
@@ -585,7 +597,7 @@ END
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
CONFIGUREDLG_MAIN, DIALOG
DLG_CFG_MAIN, DIALOG
BEGIN
RIGHTMARGIN, 365
END
@@ -595,7 +607,7 @@ BEGIN
RIGHTMARGIN, 208
END
CONFIGUREDLG_MACHINE, DIALOG
DLG_CFG_MACHINE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -603,7 +615,7 @@ BEGIN
BOTTOMMARGIN, 105
END
CONFIGUREDLG_VIDEO, DIALOG
DLG_CFG_VIDEO, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -611,7 +623,7 @@ BEGIN
BOTTOMMARGIN, 56
END
CONFIGUREDLG_INPUT, DIALOG
DLG_CFG_INPUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -619,7 +631,7 @@ BEGIN
BOTTOMMARGIN, 58
END
CONFIGUREDLG_SOUND, DIALOG
DLG_CFG_SOUND, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -628,7 +640,7 @@ BEGIN
END
#ifdef USE_NETWORK
CONFIGUREDLG_NETWORK, DIALOG
DLG_CFG_NETWORK, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -637,15 +649,23 @@ BEGIN
END
#endif
CONFIGUREDLG_PERIPHERALS, DIALOG
DLG_CFG_PORTS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
TOPMARGIN, 7
BOTTOMMARGIN, 102
BOTTOMMARGIN, 48
END
CONFIGUREDLG_HARD_DISKS, DIALOG
DLG_CFG_PERIPHERALS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
TOPMARGIN, 7
BOTTOMMARGIN, 85
END
DLG_CFG_HARD_DISKS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -653,7 +673,7 @@ BEGIN
BOTTOMMARGIN, 137
END
CONFIGUREDLG_REMOVABLE_DEVICES, DIALOG
DLG_CFG_REMOVABLE_DEVICES, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 260
@@ -698,15 +718,16 @@ BEGIN
IDS_2068 "Sound"
#ifdef USE_NETWORK
IDS_2069 "Network"
IDS_2070 "Ports (COM & LPT)"
IDS_2071 "Other peripherals"
IDS_2072 "Hard disks"
IDS_2073 "Removable devices"
#else
IDS_2069 "Ports (COM & LPT)"
IDS_2070 "Other peripherals"
IDS_2071 "Hard disks"
IDS_2072 "Removable devices"
#else
IDS_2069 "Other peripherals"
IDS_2070 "Hard disks"
IDS_2071 "Removable devices"
#endif
IDS_2073 "Unable to create bitmap file: %s"
IDS_2074 "Use CTRL+ALT+PAGE DOWN to return to windowed mode"
IDS_2075 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2076 "Host CD/DVD Drive (%c:)"
@@ -725,6 +746,7 @@ BEGIN
IDS_2085 "H"
IDS_2086 "S"
IDS_2087 "MB"
IDS_2088 "Unable to create bitmap file: %s"
IDS_2089 "Enabled"
IDS_2090 "Mute"
IDS_2091 "Type"

BIN
src/win/icons/ports.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -32,10 +32,11 @@
#define DLG_CFG_INPUT 113 /* sub-dialog of config */
#define DLG_CFG_SOUND 114 /* sub-dialog of config */
#define DLG_CFG_NETWORK 115 /* sub-dialog of config */
#define DLG_CFG_PERIPHERALS 116 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS 117 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS_ADD 118 /* sub-dialog of config */
#define DLG_CFG_REMOVABLE_DEVICES 119 /* sub-dialog of config */
#define DLG_CFG_PORTS 116 /* sub-dialog of config */
#define DLG_CFG_PERIPHERALS 117 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS 118 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS_ADD 119 /* sub-dialog of config */
#define DLG_CFG_REMOVABLE_DEVICES 120 /* sub-dialog of config */
/* Static text label IDs. */
#define IDT_1700 1700 /* Language: */
@@ -132,16 +133,18 @@
#define IDC_COMBO_PCAP 1091
#define IDC_COMBO_NET 1092
#define IDC_OTHER_PERIPH 1110 /* other periph config */
#define IDC_COMBO_SCSI 1111
#define IDC_CONFIGURE_SCSI 1112
#define IDC_COMBO_HDC 1113
#define IDC_COMBO_IDE_TER 1114
#define IDC_COMBO_IDE_QUA 1115
#define IDC_CHECK_SERIAL1 1116
#define IDC_CHECK_SERIAL2 1117
#define IDC_CHECK_PARALLEL 1118
#define IDC_CHECK_BUGGER 1119
#define IDC_COMBO_LPT1 1110 /* ports config */
#define IDC_CHECK_SERIAL1 1111
#define IDC_CHECK_SERIAL2 1112
#define IDC_CHECK_PARALLEL 1113
#define IDC_OTHER_PERIPH 1120 /* other periph config */
#define IDC_COMBO_SCSI 1121
#define IDC_CONFIGURE_SCSI 1122
#define IDC_COMBO_HDC 1123
#define IDC_COMBO_IDE_TER 1124
#define IDC_COMBO_IDE_QUA 1125
#define IDC_CHECK_BUGGER 1126
#define IDC_HARD_DISKS 1130 /* hard disk config */
#define IDC_LIST_HARD_DISKS 1131
@@ -153,7 +156,8 @@
#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 1140
#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

View File

@@ -118,7 +118,7 @@ void SaveBitmap(wchar_t *szFilename,HBITMAP hBitmap)
if((fp = _wfopen(szFilename,L"wb"))==NULL)
{
_swprintf(szMessage, win_language_get_string_from_id(IDS_2073), szFilename);
_swprintf(szMessage, win_language_get_string_from_id(IDS_2088), szFilename);
msgbox_error_wstr(ghwnd, szMessage);
break;
}

View File

@@ -30,6 +30,7 @@
#include "../cdrom.h"
#include "../disc.h"
#include "../fdd.h"
#include "../lpt.h"
#include "../hdd/hdd.h"
#include "../hdd/hdd_ide_at.h"
#include "../scsi/scsi.h"
@@ -69,9 +70,13 @@ static int temp_net_type, temp_net_card;
static char temp_pcap_dev[520];
#endif
/* Ports category */
static char temp_lpt1_device_name[16];
static int temp_serial[2], temp_lpt;
/* Peripherals category */
static int temp_scsi_card, hdc_ignore, temp_ide_ter, temp_ide_ter_irq, temp_ide_qua, temp_ide_qua_irq;
static int temp_serial[2], temp_lpt, temp_bugger;
static int temp_bugger;
static char temp_hdc_name[16];
@@ -141,11 +146,17 @@ static void win_settings_init(void)
#ifdef USE_NETWORK
/* Network category */
temp_net_type = network_type;
memset(temp_pcap_dev, '\0', sizeof(temp_pcap_dev));
memset(temp_pcap_dev, 0, sizeof(temp_pcap_dev));
strcpy(temp_pcap_dev, network_pcap);
temp_net_card = network_card;
#endif
/* Ports category */
strncpy(temp_lpt1_device_name, lpt1_device_name, sizeof(temp_lpt1_device_name) - 1);
temp_serial[0] = serial_enabled[0];
temp_serial[1] = serial_enabled[1];
temp_lpt = lpt_enabled;
/* Peripherals category */
temp_scsi_card = scsi_card_current;
strncpy(temp_hdc_name, hdd_controller_name, sizeof(temp_hdc_name) - 1);
@@ -153,9 +164,6 @@ static void win_settings_init(void)
temp_ide_ter_irq = ide_irq[2];
temp_ide_qua = ide_enable[3];
temp_ide_qua_irq = ide_irq[3];
temp_serial[0] = serial_enabled[0];
temp_serial[1] = serial_enabled[1];
temp_lpt = lpt_enabled;
temp_bugger = bugger_enabled;
/* Hard disks category */
@@ -215,6 +223,12 @@ static int win_settings_changed(void)
i = i || (network_card != temp_net_card);
#endif
/* Ports category */
i = i || strncmp(temp_lpt1_device_name, lpt1_device_name, sizeof(temp_lpt1_device_name) - 1);
i = i || (temp_serial[0] != serial_enabled[0]);
i = i || (temp_serial[1] != serial_enabled[1]);
i = i || (temp_lpt != lpt_enabled);
/* Peripherals category */
i = i || (scsi_card_current != temp_scsi_card);
i = i || strncmp(temp_hdc_name, hdd_controller_name, sizeof(temp_hdc_name) - 1);
@@ -222,9 +236,6 @@ static int win_settings_changed(void)
i = i || (temp_ide_ter_irq != ide_irq[2]);
i = i || (temp_ide_qua != ide_enable[3]);
i = i || (temp_ide_qua_irq != ide_irq[3]);
i = i || (temp_serial[0] != serial_enabled[0]);
i = i || (temp_serial[1] != serial_enabled[1]);
i = i || (temp_lpt != lpt_enabled);
i = i || (temp_bugger != bugger_enabled);
/* Hard disks category */
@@ -321,6 +332,12 @@ static void win_settings_save(void)
network_card = temp_net_card;
#endif
/* Ports category */
strncpy(lpt1_device_name, temp_lpt1_device_name, sizeof(temp_lpt1_device_name) - 1);
serial_enabled[0] = temp_serial[0];
serial_enabled[1] = temp_serial[1];
lpt_enabled = temp_lpt;
/* Peripherals category */
scsi_card_current = temp_scsi_card;
strncpy(hdd_controller_name, temp_hdc_name, sizeof(temp_hdc_name) - 1);
@@ -328,9 +345,6 @@ static void win_settings_save(void)
ide_irq[2] = temp_ide_ter_irq;
ide_enable[3] = temp_ide_qua;
ide_irq[3] = temp_ide_qua_irq;
serial_enabled[0] = temp_serial[0];
serial_enabled[1] = temp_serial[1];
lpt_enabled = temp_lpt;
bugger_enabled = temp_bugger;
/* Hard disks category */
@@ -1007,133 +1021,6 @@ static BOOL CALLBACK win_settings_input_proc(HWND hdlg, UINT message, WPARAM wPa
}
static void recalc_hdd_list(HWND hdlg, int machine, int use_selected_hdd)
{
HWND h;
char *s;
int valid = 0;
char old_name[16];
int c, d;
LPTSTR lptsTemp;
lptsTemp = (LPTSTR) malloc(512);
h = GetDlgItem(hdlg, IDC_COMBO_HDC);
if (machines[temp_machine].flags & MACHINE_HAS_IDE)
{
hdc_ignore = 1;
SendMessage(h, CB_RESETCONTENT, 0, 0);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_language_get_string_from_id(IDS_2154));
EnableWindow(h, FALSE);
SendMessage(h, CB_SETCURSEL, 0, 0);
}
else
{
hdc_ignore = 0;
valid = 0;
if (use_selected_hdd)
{
c = SendMessage(h, CB_GETCURSEL, 0, 0);
if (c != -1 && hdd_names[c])
{
strncpy(old_name, hdd_names[c], sizeof(old_name) - 1);
}
else
{
strcpy(old_name, "none");
}
}
else
{
strncpy(old_name, temp_hdc_name, sizeof(old_name) - 1);
}
SendMessage(h, CB_RESETCONTENT, 0, 0);
c = d = 0;
while (1)
{
s = hdd_controller_get_name(c);
if (s[0] == 0)
{
break;
}
if ((hdd_controller_get_flags(c) & DEVICE_AT) && !(machines[machine].flags & MACHINE_AT))
{
c++;
continue;
}
if ((hdd_controller_get_flags(c) & DEVICE_PS2) && !(machines[machine].flags & MACHINE_PS2_HDD))
{
c++;
continue;
}
if ((hdd_controller_get_flags(c) & DEVICE_MCA) && !(machines[machine].flags & MACHINE_MCA))
{
c++;
continue;
}
if (!hdd_controller_available(c))
{
c++;
continue;
}
if (c < 2)
{
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_language_get_string_from_id(2152 + c));
}
else
{
mbstowcs(lptsTemp, s, strlen(s) + 1);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
}
hdd_names[d] = hdd_controller_get_internal_name(c);
if (!strcmp(old_name, hdd_names[d]))
{
SendMessage(h, CB_SETCURSEL, d, 0);
valid = 1;
}
c++;
d++;
}
if (!valid)
{
SendMessage(h, CB_SETCURSEL, 0, 0);
}
EnableWindow(h, TRUE);
}
free(lptsTemp);
}
int valid_ide_irqs[11] = { 2, 3, 4, 5, 7, 9, 10, 11, 12, 14, 15 };
int find_irq_in_array(int irq, int def)
{
int i = 0;
for (i = 0; i < 11; i++)
{
if (valid_ide_irqs[i] == irq)
{
return i + 1;
}
}
return 7 + def;
}
int mpu401_present(void)
{
char *n;
@@ -1416,6 +1303,210 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa
}
static BOOL CALLBACK win_settings_ports_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND h;
int c = 0;
int d = 0;
char *s;
LPTSTR lptsTemp;
switch (message)
{
case WM_INITDIALOG:
lptsTemp = (LPTSTR) malloc(512);
h = GetDlgItem(hdlg, IDC_COMBO_LPT1);
c = d = 0;
while (1)
{
s = lpt_device_get_name(c);
if (!s)
{
break;
}
if (c == 0)
{
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_language_get_string_from_id(IDS_2152));
}
else
{
mbstowcs(lptsTemp, s, strlen(s) + 1);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
}
if (!strcmp(temp_lpt1_device_name, lpt_device_get_internal_name(c)))
{
d = c;
}
c++;
}
SendMessage(h, CB_SETCURSEL, d, 0);
h=GetDlgItem(hdlg, IDC_CHECK_SERIAL1);
SendMessage(h, BM_SETCHECK, temp_serial[0], 0);
h=GetDlgItem(hdlg, IDC_CHECK_SERIAL2);
SendMessage(h, BM_SETCHECK, temp_serial[1], 0);
h=GetDlgItem(hdlg, IDC_CHECK_PARALLEL);
SendMessage(h, BM_SETCHECK, temp_lpt, 0);
free(lptsTemp);
return TRUE;
case WM_SAVESETTINGS:
h = GetDlgItem(hdlg, IDC_COMBO_LPT1);
c = SendMessage(h, CB_GETCURSEL, 0, 0);
strcpy(temp_lpt1_device_name, lpt_device_get_internal_name(c));
h = GetDlgItem(hdlg, IDC_CHECK_SERIAL1);
temp_serial[0] = SendMessage(h, BM_GETCHECK, 0, 0);
h = GetDlgItem(hdlg, IDC_CHECK_SERIAL2);
temp_serial[1] = SendMessage(h, BM_GETCHECK, 0, 0);
h = GetDlgItem(hdlg, IDC_CHECK_PARALLEL);
temp_lpt = SendMessage(h, BM_GETCHECK, 0, 0);
default:
return FALSE;
}
return FALSE;
}
static void recalc_hdd_list(HWND hdlg, int machine, int use_selected_hdd)
{
HWND h;
char *s;
int valid = 0;
char old_name[16];
int c, d;
LPTSTR lptsTemp;
lptsTemp = (LPTSTR) malloc(512);
h = GetDlgItem(hdlg, IDC_COMBO_HDC);
if (machines[temp_machine].flags & MACHINE_HAS_IDE)
{
hdc_ignore = 1;
SendMessage(h, CB_RESETCONTENT, 0, 0);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_language_get_string_from_id(IDS_2154));
EnableWindow(h, FALSE);
SendMessage(h, CB_SETCURSEL, 0, 0);
}
else
{
hdc_ignore = 0;
valid = 0;
if (use_selected_hdd)
{
c = SendMessage(h, CB_GETCURSEL, 0, 0);
if (c != -1 && hdd_names[c])
{
strncpy(old_name, hdd_names[c], sizeof(old_name) - 1);
}
else
{
strcpy(old_name, "none");
}
}
else
{
strncpy(old_name, temp_hdc_name, sizeof(old_name) - 1);
}
SendMessage(h, CB_RESETCONTENT, 0, 0);
c = d = 0;
while (1)
{
s = hdd_controller_get_name(c);
if (s[0] == 0)
{
break;
}
if ((hdd_controller_get_flags(c) & DEVICE_AT) && !(machines[machine].flags & MACHINE_AT))
{
c++;
continue;
}
if ((hdd_controller_get_flags(c) & DEVICE_PS2) && !(machines[machine].flags & MACHINE_PS2_HDD))
{
c++;
continue;
}
if ((hdd_controller_get_flags(c) & DEVICE_MCA) && !(machines[machine].flags & MACHINE_MCA))
{
c++;
continue;
}
if (!hdd_controller_available(c))
{
c++;
continue;
}
if (c < 2)
{
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_language_get_string_from_id(2152 + c));
}
else
{
mbstowcs(lptsTemp, s, strlen(s) + 1);
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
}
hdd_names[d] = hdd_controller_get_internal_name(c);
if (!strcmp(old_name, hdd_names[d]))
{
SendMessage(h, CB_SETCURSEL, d, 0);
valid = 1;
}
c++;
d++;
}
if (!valid)
{
SendMessage(h, CB_SETCURSEL, 0, 0);
}
EnableWindow(h, TRUE);
}
free(lptsTemp);
}
int valid_ide_irqs[11] = { 2, 3, 4, 5, 7, 9, 10, 11, 12, 14, 15 };
int find_irq_in_array(int irq, int def)
{
int i = 0;
for (i = 0; i < 11; i++)
{
if (valid_ide_irqs[i] == irq)
{
return i + 1;
}
}
return 7 + def;
}
static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND h;
@@ -1515,15 +1606,6 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR
SendMessage(h, CB_SETCURSEL, 0, 0);
}
h=GetDlgItem(hdlg, IDC_CHECK_SERIAL1);
SendMessage(h, BM_SETCHECK, temp_serial[0], 0);
h=GetDlgItem(hdlg, IDC_CHECK_SERIAL2);
SendMessage(h, BM_SETCHECK, temp_serial[1], 0);
h=GetDlgItem(hdlg, IDC_CHECK_PARALLEL);
SendMessage(h, BM_SETCHECK, temp_lpt, 0);
h=GetDlgItem(hdlg, IDC_CHECK_BUGGER);
SendMessage(h, BM_SETCHECK, temp_bugger, 0);
@@ -1596,15 +1678,6 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR
temp_ide_qua = 1;
}
h = GetDlgItem(hdlg, IDC_CHECK_SERIAL1);
temp_serial[0] = SendMessage(h, BM_GETCHECK, 0, 0);
h = GetDlgItem(hdlg, IDC_CHECK_SERIAL2);
temp_serial[1] = SendMessage(h, BM_GETCHECK, 0, 0);
h = GetDlgItem(hdlg, IDC_CHECK_PARALLEL);
temp_lpt = SendMessage(h, BM_GETCHECK, 0, 0);
h = GetDlgItem(hdlg, IDC_CHECK_BUGGER);
temp_bugger = SendMessage(h, BM_GETCHECK, 0, 0);
@@ -4180,13 +4253,15 @@ cdrom_bus_skip:
#define SETTINGS_PAGE_SOUND 3
#ifdef USE_NETWORK
#define SETTINGS_PAGE_NETWORK 4
#define SETTINGS_PAGE_PORTS 5
#define SETTINGS_PAGE_PERIPHERALS 6
#define SETTINGS_PAGE_HARD_DISKS 7
#define SETTINGS_PAGE_REMOVABLE_DEVICES 8
#else
#define SETTINGS_PAGE_PORTS 4
#define SETTINGS_PAGE_PERIPHERALS 5
#define SETTINGS_PAGE_HARD_DISKS 6
#define SETTINGS_PAGE_REMOVABLE_DEVICES 7
#else
#define SETTINGS_PAGE_PERIPHERALS 4
#define SETTINGS_PAGE_HARD_DISKS 5
#define SETTINGS_PAGE_REMOVABLE_DEVICES 6
#endif
void win_settings_show_child(HWND hwndParent, DWORD child_id)
@@ -4223,6 +4298,9 @@ void win_settings_show_child(HWND hwndParent, DWORD child_id)
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_NETWORK, hwndParent, win_settings_network_proc);
break;
#endif
case SETTINGS_PAGE_PORTS:
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_PORTS, hwndParent, win_settings_ports_proc);
break;
case SETTINGS_PAGE_PERIPHERALS:
hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_PERIPHERALS, hwndParent, win_settings_peripherals_proc);
break;
@@ -4252,9 +4330,9 @@ static BOOL win_settings_main_image_list_init(HWND hwndList)
ILC_MASK | ILC_COLOR32, 1, 1);
#ifdef USE_NETWORK
for (i = 0; i < 8; i++)
for (i = 0; i < 9; i++)
#else
for (i = 0; i < 7; i++)
for (i = 0; i < 8; i++)
#endif
{
hiconItem = LoadIcon(hinstance, (LPCWSTR) (256 + i));
@@ -4276,9 +4354,9 @@ static BOOL win_settings_main_insert_categories(HWND hwndList)
lvI.stateMask = lvI.iSubItem = lvI.state = 0;
#ifdef USE_NETWORK
for (i = 0; i < 8; i++)
for (i = 0; i < 9; i++)
#else
for (i = 0; i < 7; i++)
for (i = 0; i < 8; i++)
#endif
{
lvI.pszText = win_language_get_settings_category(i);
@@ -4326,9 +4404,9 @@ static BOOL CALLBACK win_settings_main_proc(HWND hdlg, UINT message, WPARAM wPar
{
category = -1;
#ifdef USE_NETWORK
for (i = 0; i < 8; i++)
for (i = 0; i < 9; i++)
#else
for (i = 0; i < 7; i++)
for (i = 0; i < 8; i++)
#endif
{
h = GetDlgItem(hdlg, IDC_SETTINGSCATLIST);