Fixed a compile-breaking error;
Added the ability to set each floppy drive to turbo speed which will make it opperate at an effective 8000 kbps @ 300 rpm, for those who want faster but less accurate floppy timings.
This commit is contained in:
@@ -440,13 +440,15 @@ BEGIN
|
||||
LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER |
|
||||
WS_TABSTOP,7,18,253,60
|
||||
LTEXT "Floppy drives:",-1,7,7,43,8
|
||||
COMBOBOX IDC_COMBO_FD_TYPE,33,85,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Type:",1803,7,86,24,8
|
||||
CONTROL "Turbo timings (no accuracy)",IDC_CHECKTURBO,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,131,86,129,10
|
||||
CONTROL "List1",IDC_LIST_CDROM_DRIVES,"SysListView32",LVS_REPORT |
|
||||
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER |
|
||||
WS_TABSTOP,7,116,253,60
|
||||
LTEXT "CD-ROM drives:",-1,7,106,50,8
|
||||
COMBOBOX IDC_COMBO_FD_TYPE,33,85,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Type:",1803,7,86,24,8
|
||||
COMBOBOX IDC_COMBO_CD_BUS,33,183,90,12,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Bus:",1798,7,184,24,8
|
||||
@@ -872,9 +874,13 @@ BEGIN
|
||||
IDS_2218 "&Image..."
|
||||
IDS_2219 "PCap failed to set up because it may not be initialized"
|
||||
IDS_2220 "Image (&Write-protected)..."
|
||||
IDS_2221 "English (United States)"
|
||||
IDS_2221 "Turbo"
|
||||
IDS_2222 "On"
|
||||
IDS_2223 "Off"
|
||||
IDS_2224 "<Placeholder string>"
|
||||
IDS_2225 "English (United States)"
|
||||
END
|
||||
#define IDS_LANG_ENUS IDS_2221
|
||||
#define IDS_LANG_ENUS IDS_2225
|
||||
|
||||
|
||||
#ifndef _MAC
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#define IDC_BUTTON_HDD_ADD 1028
|
||||
#define IDC_BUTTON_CDROM_REMOVE 1029
|
||||
#define IDC_BUTTON_HDD_REMOVE 1029
|
||||
#define IDC_CHECKTURBO 1030
|
||||
#define IDC_HDIMAGE_NEW 1035
|
||||
#define IDC_HD_BUS 1036
|
||||
#define IDC_HDIMAGE_EXISTING 1037
|
||||
@@ -285,8 +286,12 @@
|
||||
#define IDS_2219 2219
|
||||
#define IDS_2220 2220
|
||||
#define IDS_2221 2221
|
||||
#define IDS_2222 2222
|
||||
#define IDS_2223 2223
|
||||
#define IDS_2224 2224
|
||||
#define IDS_2225 2225
|
||||
|
||||
#define IDS_LANG_ENUS IDS_2221
|
||||
#define IDS_LANG_ENUS IDS_2225
|
||||
|
||||
|
||||
#define IDM_ABOUT 40001
|
||||
@@ -473,4 +478,4 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define STRINGS_NUM 174
|
||||
#define STRINGS_NUM 178
|
||||
|
||||
@@ -74,6 +74,7 @@ static hard_disk_t temp_hdc[HDC_NUM];
|
||||
|
||||
/* Removable devices category */
|
||||
static int temp_fdd_types[FDD_NUM];
|
||||
static int temp_fdd_turbo[FDD_NUM];
|
||||
static cdrom_drive_t temp_cdrom_drives[CDROM_NUM];
|
||||
|
||||
static HWND hwndParentDialog, hwndChildDialog;
|
||||
@@ -149,6 +150,7 @@ static void win_settings_init(void)
|
||||
for (i = 0; i < FDD_NUM; i++)
|
||||
{
|
||||
temp_fdd_types[i] = fdd_get_type(i);
|
||||
temp_fdd_turbo[i] = fdd_get_turbo(i);
|
||||
}
|
||||
memcpy(temp_cdrom_drives, cdrom_drives, CDROM_NUM * sizeof(cdrom_drive_t));
|
||||
}
|
||||
@@ -212,6 +214,7 @@ static int win_settings_changed(void)
|
||||
for (j = 0; j < FDD_NUM; j++)
|
||||
{
|
||||
i = i || (temp_fdd_types[j] != fdd_get_type(j));
|
||||
i = i || (temp_fdd_turbo[j] != fdd_get_turbo(j));
|
||||
}
|
||||
i = i || memcmp(cdrom_drives, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_drive_t));
|
||||
|
||||
@@ -309,6 +312,7 @@ static void win_settings_save(void)
|
||||
for (i = 0; i < FDD_NUM; i++)
|
||||
{
|
||||
fdd_set_type(i, temp_fdd_types[i]);
|
||||
fdd_set_turbo(i, temp_fdd_turbo[i]);
|
||||
}
|
||||
memcpy(cdrom_drives, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_drive_t));
|
||||
|
||||
@@ -3454,6 +3458,16 @@ static BOOL win_settings_floppy_drives_recalc_list(HWND hwndList)
|
||||
|
||||
if (ListView_InsertItem(hwndList, &lvI) == -1)
|
||||
return FALSE;
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
lvI.pszText = win_language_get_string_from_id(temp_fdd_turbo[i] ? 2222 : 2223);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
if (ListView_SetItem(hwndList, &lvI) == -1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -3515,7 +3529,7 @@ static BOOL win_settings_floppy_drives_init_columns(HWND hwndList)
|
||||
lvc.iSubItem = 0;
|
||||
lvc.pszText = win_language_get_string_from_id(2188);
|
||||
|
||||
lvc.cx = 392;
|
||||
lvc.cx = 292;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
|
||||
if (ListView_InsertColumn(hwndList, 0, &lvc) == -1)
|
||||
@@ -3523,6 +3537,17 @@ static BOOL win_settings_floppy_drives_init_columns(HWND hwndList)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lvc.iSubItem = 1;
|
||||
lvc.pszText = win_language_get_string_from_id(2221);
|
||||
|
||||
lvc.cx = 100;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
|
||||
if (ListView_InsertColumn(hwndList, 1, &lvc) == -1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -3612,6 +3637,16 @@ static void win_settings_floppy_drives_update_item(HWND hwndList, int i)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
lvI.pszText = win_language_get_string_from_id(temp_fdd_turbo[i] ? 2222 : 2223);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
if (ListView_SetItem(hwndList, &lvI) == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void win_settings_cdrom_drives_update_item(HWND hwndList, int i)
|
||||
@@ -3796,6 +3831,9 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
}
|
||||
SendMessage(h, CB_SETCURSEL, temp_fdd_types[fdlv_current_sel], 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_CHECKTURBO);
|
||||
SendMessage(h, BM_SETCHECK, temp_fdd_turbo[fdlv_current_sel], 0);
|
||||
|
||||
cdlv_current_sel = 0;
|
||||
h = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES);
|
||||
win_settings_cdrom_drives_init_columns(h);
|
||||
@@ -3855,6 +3893,8 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
rd_ignore_change = 1;
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_FD_TYPE);
|
||||
SendMessage(h, CB_SETCURSEL, temp_fdd_types[fdlv_current_sel], 0);
|
||||
h = GetDlgItem(hdlg, IDC_CHECKTURBO);
|
||||
SendMessage(h, BM_SETCHECK, temp_fdd_turbo[fdlv_current_sel], 0);
|
||||
rd_ignore_change = 0;
|
||||
}
|
||||
else if ((((LPNMHDR)lParam)->code == LVN_ITEMCHANGED) && (((LPNMHDR)lParam)->idFrom == IDC_LIST_CDROM_DRIVES))
|
||||
@@ -3918,6 +3958,20 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
rd_ignore_change = 0;
|
||||
return FALSE;
|
||||
|
||||
case IDC_CHECKTURBO:
|
||||
if (rd_ignore_change)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rd_ignore_change = 1;
|
||||
h = GetDlgItem(hdlg, IDC_CHECKTURBO);
|
||||
temp_fdd_turbo[fdlv_current_sel] = SendMessage(h, BM_GETCHECK, 0, 0);
|
||||
h = GetDlgItem(hdlg, IDC_LIST_FLOPPY_DRIVES);
|
||||
win_settings_floppy_drives_update_item(h, fdlv_current_sel);
|
||||
rd_ignore_change = 0;
|
||||
return FALSE;
|
||||
|
||||
case IDC_COMBO_CD_BUS:
|
||||
if (rd_ignore_change)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user