diff --git a/src/ui/lang/VARCem-BY.str b/src/ui/lang/VARCem-BY.str index df07949..afa69d7 100644 Binary files a/src/ui/lang/VARCem-BY.str and b/src/ui/lang/VARCem-BY.str differ diff --git a/src/ui/lang/VARCem-CZ.str b/src/ui/lang/VARCem-CZ.str index ff36bf9..5a7f76c 100644 Binary files a/src/ui/lang/VARCem-CZ.str and b/src/ui/lang/VARCem-CZ.str differ diff --git a/src/ui/lang/VARCem-DE.str b/src/ui/lang/VARCem-DE.str index e64ef37..d66b875 100644 Binary files a/src/ui/lang/VARCem-DE.str and b/src/ui/lang/VARCem-DE.str differ diff --git a/src/ui/lang/VARCem-DK.str b/src/ui/lang/VARCem-DK.str index 76311bc..85f7278 100644 Binary files a/src/ui/lang/VARCem-DK.str and b/src/ui/lang/VARCem-DK.str differ diff --git a/src/ui/lang/VARCem-DU.str b/src/ui/lang/VARCem-DU.str index bfed415..e4fd89b 100644 Binary files a/src/ui/lang/VARCem-DU.str and b/src/ui/lang/VARCem-DU.str differ diff --git a/src/ui/lang/VARCem-ES.str b/src/ui/lang/VARCem-ES.str index 1ddad35..ca3eaf0 100644 Binary files a/src/ui/lang/VARCem-ES.str and b/src/ui/lang/VARCem-ES.str differ diff --git a/src/ui/lang/VARCem-FI.str b/src/ui/lang/VARCem-FI.str index 1f11416..03bfb8c 100644 Binary files a/src/ui/lang/VARCem-FI.str and b/src/ui/lang/VARCem-FI.str differ diff --git a/src/ui/lang/VARCem-FR.str b/src/ui/lang/VARCem-FR.str index bbc2f39..95a9a07 100644 Binary files a/src/ui/lang/VARCem-FR.str and b/src/ui/lang/VARCem-FR.str differ diff --git a/src/ui/lang/VARCem-IT.str b/src/ui/lang/VARCem-IT.str index 159acd6..643e541 100644 Binary files a/src/ui/lang/VARCem-IT.str and b/src/ui/lang/VARCem-IT.str differ diff --git a/src/ui/lang/VARCem-JP.str b/src/ui/lang/VARCem-JP.str index ece0e96..bb4da10 100644 Binary files a/src/ui/lang/VARCem-JP.str and b/src/ui/lang/VARCem-JP.str differ diff --git a/src/ui/lang/VARCem-KR.str b/src/ui/lang/VARCem-KR.str index b2f19f8..31529fb 100644 Binary files a/src/ui/lang/VARCem-KR.str and b/src/ui/lang/VARCem-KR.str differ diff --git a/src/ui/lang/VARCem-KZ.str b/src/ui/lang/VARCem-KZ.str index f9d935e..e633ef0 100644 Binary files a/src/ui/lang/VARCem-KZ.str and b/src/ui/lang/VARCem-KZ.str differ diff --git a/src/ui/lang/VARCem-LT.str b/src/ui/lang/VARCem-LT.str index 39e338b..3b66745 100644 Binary files a/src/ui/lang/VARCem-LT.str and b/src/ui/lang/VARCem-LT.str differ diff --git a/src/ui/lang/VARCem-NO.str b/src/ui/lang/VARCem-NO.str index 469885b..75476c0 100644 Binary files a/src/ui/lang/VARCem-NO.str and b/src/ui/lang/VARCem-NO.str differ diff --git a/src/ui/lang/VARCem-PL.str b/src/ui/lang/VARCem-PL.str index 8d3bb1e..b9263d1 100644 Binary files a/src/ui/lang/VARCem-PL.str and b/src/ui/lang/VARCem-PL.str differ diff --git a/src/ui/lang/VARCem-PT.str b/src/ui/lang/VARCem-PT.str index bd43c06..b8f7110 100644 Binary files a/src/ui/lang/VARCem-PT.str and b/src/ui/lang/VARCem-PT.str differ diff --git a/src/ui/lang/VARCem-RU.str b/src/ui/lang/VARCem-RU.str index 09f08b5..81f4703 100644 Binary files a/src/ui/lang/VARCem-RU.str and b/src/ui/lang/VARCem-RU.str differ diff --git a/src/ui/lang/VARCem-SL.str b/src/ui/lang/VARCem-SL.str index 1d6bee3..be8f281 100644 Binary files a/src/ui/lang/VARCem-SL.str and b/src/ui/lang/VARCem-SL.str differ diff --git a/src/ui/lang/VARCem-UA.str b/src/ui/lang/VARCem-UA.str index ebb6f8d..0c06e50 100644 Binary files a/src/ui/lang/VARCem-UA.str and b/src/ui/lang/VARCem-UA.str differ diff --git a/src/ui/lang/VARCem.str b/src/ui/lang/VARCem.str index 17b3d26..f2af57e 100644 --- a/src/ui/lang/VARCem.str +++ b/src/ui/lang/VARCem.str @@ -295,6 +295,7 @@ #define STR_3580 "ATAPI" #define STR_3581 "SCSI" #define STR_3582 "USB" +#define STR_3583 "Magneto-optical drives:" /* UI: Status Bar (3900.) */ diff --git a/src/ui/ui_resource.h b/src/ui/ui_resource.h index bbbbcf0..41717f1 100644 --- a/src/ui/ui_resource.h +++ b/src/ui/ui_resource.h @@ -249,6 +249,7 @@ #define ICON_FLOPPY_D 248 /* "floppy_disabled.ico" */ #define ICON_CDROM_D 249 /* "cdrom_disabled.ico" */ #define ICON_ZIP_D 250 /* "zip_disabled.ico" */ +#define ICON_MO_D 255 /* "mo_disabled.ico" */ /* String IDs. */ diff --git a/src/win/VARCem-common.rc b/src/win/VARCem-common.rc index 74329e5..bc9bd9b 100644 --- a/src/win/VARCem-common.rc +++ b/src/win/VARCem-common.rc @@ -622,6 +622,32 @@ BEGIN CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END +DLG_CFG_MO_DEVICES DIALOG 97, 0, 267, 221 +STYLE DS_CONTROL | WS_CHILD +FONT 9, FONT_NAME +BEGIN + LTEXT STR_3583,IDT_1768,7,7,80,8 + CONTROL "List2",IDC_LIST_MO_DRIVES,"SysListView32", + LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL | + WS_BORDER | WS_TABSTOP,7,18,253,60 + + LTEXT STR_BUS,IDT_1753,50,87,25,8 + COMBOBOX IDC_COMBO_MO_BUS,80,85,70,120, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + LTEXT STR_CHANNEL,IDT_1756,170,87,30,8 + COMBOBOX IDC_COMBO_MO_CHANNEL_IDE,210,85,50,120, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + LTEXT STR_ID,IDT_1754,165,87,20,8 + COMBOBOX IDC_COMBO_MO_ID,185,85,20,120, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + LTEXT STR_LUN,IDT_1755,210,87,20,8 + COMBOBOX IDC_COMBO_MO_LUN,235,85,20,120, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + /* The string table. */ #define STRTBL(num,str) num str diff --git a/src/win/resource.h b/src/win/resource.h index 986da88..92955b1 100644 --- a/src/win/resource.h +++ b/src/win/resource.h @@ -58,6 +58,7 @@ #define DLG_CFG_FLOPPY 1040 /* sub-dialog of config */ #define DLG_CFG_MMC_DEVICES 1041 /* sub-dialog of config */ #define DLG_CFG_IOMEGA_DEVICES 1042 /* sub-dialog of config */ +#define DLG_CFG_MO_DEVICES 1043 /* sub-dialog of config */ /* Static text label IDs. */ #define IDT_1700 1700 /* Language: */ @@ -117,6 +118,7 @@ #define IDT_1765 1765 /* ISAMEM #3: */ #define IDT_1766 1766 /* ISAMEM #4: */ #define IDT_1767 1767 /* ISARTC: */ +#define IDT_1768 1768 /* Magneto-optical drives: */ #define IDT_TITLE 1790 /* "VARCem for Plaform" */ #define IDT_VERSION 1791 /* "version.." */ @@ -248,6 +250,11 @@ #define IDC_COMBO_ZIP_CHANNEL_IDE 1184 #define IDC_CHECK250 1185 #define IDC_COMBO_CD_SPEED 1186 +#define IDC_LIST_MO_DRIVES 1300 +#define IDC_COMBO_MO_BUS 1301 +#define IDC_COMBO_MO_ID 1302 +#define IDC_COMBO_MO_LUN 1304 +#define IDC_COMBO_MO_CHANNEL_IDE 1305 #define IDC_SLIDER_GAIN 1190 /* sound gain dialog */ diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 8cb5534..4ac44ed 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -71,6 +71,7 @@ #include "../devices/scsi/scsi_device.h" #include "../devices/cdrom/cdrom.h" #include "../devices/disk/zip.h" +#include "../devices/disk/mo.h" #include "../devices/network/network.h" #include "../devices/sound/sound.h" #include "../devices/sound/midi.h" @@ -92,6 +93,7 @@ static int temp_fdd_types[FDD_NUM], static hard_disk_t temp_hdd[HDD_NUM]; static cdrom_t temp_cdrom_drives[CDROM_NUM]; static zip_drive_t temp_zip_drives[ZIP_NUM]; +static mo_drive_t temp_mo_drives[MO_NUM]; static HWND hwndParentDialog, @@ -346,8 +348,8 @@ show_child(HWND hwndParent, DWORD child_id) case PAGE_MAGNETO_OPTICAL_DEVICES: hwndChildDialog = CreateDialog(plat_lang_dll(), - (LPCWSTR)DLG_CFG_IOMEGA_DEVICES, - hwndParent, iomega_devices_proc); + (LPCWSTR)DLG_CFG_MO_DEVICES, + hwndParent, mo_devices_proc); break; default: diff --git a/src/win/win_settings_remov.h b/src/win/win_settings_remov.h index 819362d..18756a1 100644 --- a/src/win/win_settings_remov.h +++ b/src/win/win_settings_remov.h @@ -46,6 +46,7 @@ static int rd_ignore_change = 0; static int cdlv_current_sel; static int zdlv_current_sel; +static int modlv_current_sel; static void @@ -1010,3 +1011,415 @@ iomega_devices_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) return FALSE; } + +static void +mo_track_init(void) +{ + int i; + + for (i = 0; i < MO_NUM; i++) { + if (mo_drives[i].bus_type == MO_BUS_ATAPI) + ide_tracking |= (4 << (mo_drives[i].bus_id.ide_channel << 3)); + else if (mo_drives[i].bus_type == MO_BUS_SCSI) + scsi_tracking[mo_drives[i].bus_id.scsi.id] |= (4 << (mo_drives[i].bus_id.scsi.lun << 3)); + } +} + + +static void +mo_image_list_init(HWND hwndList) +{ + HICON hiconItem; + HIMAGELIST hSmall; + + hSmall = ImageList_Create(GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), + ILC_MASK | ILC_COLOR32, 1, 1); + + hiconItem = LoadIcon(hInstance, (LPCWSTR)ICON_MO_D); + ImageList_AddIcon(hSmall, hiconItem); + DestroyIcon(hiconItem); + + hiconItem = LoadIcon(hInstance, (LPCWSTR)ICON_MO); + ImageList_AddIcon(hSmall, hiconItem); + DestroyIcon(hiconItem); + + ListView_SetImageList(hwndList, hSmall, LVSIL_SMALL); +} + + +static BOOL +mo_recalc_list(HWND hwndList) +{ + WCHAR temp[256]; + LVITEM lvI; + int fsid, i; + + lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE; + lvI.stateMask = lvI.iSubItem = lvI.state = 0; + + for (i = 0; i < MO_NUM; i++) { + fsid = temp_mo_drives[i].bus_type; + + lvI.iSubItem = 0; + switch (fsid) { + case MO_BUS_DISABLED: + default: + lvI.pszText = (LPTSTR)get_string(IDS_DISABLED); + lvI.iImage = 0; + break; + + case MO_BUS_ATAPI: + swprintf(temp, sizeof_w(temp), L"%ls (%01i:%01i)", + get_string(combo_to_string(fsid)), + temp_mo_drives[i].bus_id.ide_channel >> 1, + temp_mo_drives[i].bus_id.ide_channel & 1); + lvI.pszText = temp; + lvI.iImage = 1; + break; + + case MO_BUS_SCSI: + swprintf(temp, sizeof_w(temp), L"%ls (%02i:%02i)", + get_string(combo_to_string(fsid)), + temp_mo_drives[i].bus_id.scsi.id, + temp_mo_drives[i].bus_id.scsi.lun); + lvI.pszText = temp; + lvI.iImage = 1; + break; + } + lvI.iItem = i; + if (ListView_InsertItem(hwndList, &lvI) == -1) + return FALSE; + } + + return TRUE; +} + + +static BOOL +mo_init_columns(HWND hwndList) +{ + LVCOLUMN lvc; + + lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + + lvc.iSubItem = 0; + lvc.pszText = (LPTSTR)get_string(IDS_BUS); + lvc.cx = 342; + lvc.fmt = LVCFMT_LEFT; + if (ListView_InsertColumn(hwndList, 0, &lvc) == -1) + return FALSE; + + lvc.iSubItem = 1; + lvc.pszText = (LPTSTR)get_string(IDS_TYPE); + lvc.cx = 50; + lvc.fmt = LVCFMT_LEFT; + if (ListView_InsertColumn(hwndList, 1, &lvc) == -1) + return FALSE; + + return TRUE; +} + + +static int +mo_get_selected(HWND hdlg) +{ + int drive = -1; + int i, j = 0; + HWND h; + + for (i = 0; i < 6; i++) { // FIXME: MO_NUM ? + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + j = ListView_GetItemState(h, i, LVIS_SELECTED); + if (j) + drive = i; + } + + return drive; +} + + +static void +mo_update_item(HWND hwndList, int i) +{ + WCHAR temp[128]; + LVITEM lvI; + int fsid; + + lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE; + lvI.stateMask = lvI.iSubItem = lvI.state = 0; + + lvI.iSubItem = 0; + lvI.iItem = i; + + fsid = temp_mo_drives[i].bus_type; + + switch (fsid) { + case MO_BUS_DISABLED: + default: + lvI.pszText = (LPTSTR)get_string(IDS_DISABLED); + lvI.iImage = 0; + break; + + case MO_BUS_ATAPI: + swprintf(temp, sizeof_w(temp), L"%ls (%01i:%01i)", + get_string(combo_to_string(fsid)), + temp_mo_drives[i].bus_id.ide_channel >> 1, + temp_mo_drives[i].bus_id.ide_channel & 1); + lvI.pszText = temp; + lvI.iImage = 1; + break; + + case MO_BUS_SCSI: + swprintf(temp, sizeof_w(temp), L"%ls (%02i:%02i)", + get_string(combo_to_string(fsid)), + temp_mo_drives[i].bus_id.scsi.id, + temp_mo_drives[i].bus_id.scsi.lun); + lvI.pszText = temp; + lvI.iImage = 1; + break; + } + if (ListView_SetItem(hwndList, &lvI) == -1) + return; +} + + +static void +mo_add_locations(HWND hdlg) +{ + WCHAR temp[128]; + HWND h; + int i; + + h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS); + for (i = MO_BUS_DISABLED; i < MO_BUS_MAX; i++) + SendMessage(h, CB_ADDSTRING, 0, win_string(combo_to_string(i))); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_ID); + id_to_combo(h, 16); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_LUN); + id_to_combo(h, 8); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_CHANNEL_IDE); + for (i = 0; i < 8; i++) { + swprintf(temp, sizeof_w(temp), L"%01i:%01i", i >> 1, i & 1); + SendMessage(h, CB_ADDSTRING, 0, (LPARAM)temp); + } +} + + +static void +mo_recalc_location_controls(HWND hdlg, int assign_id) +{ + HWND h; + int i; + int bus = temp_mo_drives[modlv_current_sel].bus_type; + + for (i = IDT_1754; i < (IDT_1756 + 1); i++) { + h = GetDlgItem(hdlg, i); + EnableWindow(h, FALSE); + ShowWindow(h, SW_HIDE); + } + + h = GetDlgItem(hdlg, IDC_COMBO_MO_ID); + EnableWindow(h, FALSE); + ShowWindow(h, SW_HIDE); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_LUN); + EnableWindow(h, FALSE); + ShowWindow(h, SW_HIDE); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_CHANNEL_IDE); + EnableWindow(h, FALSE); + ShowWindow(h, SW_HIDE); + + switch (bus) { + case MO_BUS_ATAPI: + h = GetDlgItem(hdlg, IDT_1756); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + + if (assign_id) + temp_mo_drives[modlv_current_sel].bus_id.ide_channel = next_free_ide_channel(); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_CHANNEL_IDE); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + SendMessage(h, CB_SETCURSEL, + temp_mo_drives[modlv_current_sel].bus_id.ide_channel, 0); + break; + + case MO_BUS_SCSI: + h = GetDlgItem(hdlg, IDT_1754); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + h = GetDlgItem(hdlg, IDT_1755); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + if (assign_id) + next_free_scsi_id_and_lun((uint8_t*)&temp_mo_drives[modlv_current_sel].bus_id.scsi.id, (uint8_t*)&temp_mo_drives[modlv_current_sel].bus_id.scsi.lun); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_ID); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + SendMessage(h, CB_SETCURSEL, + temp_mo_drives[modlv_current_sel].bus_id.scsi.id, 0); + + h = GetDlgItem(hdlg, IDC_COMBO_MO_LUN); + ShowWindow(h, SW_SHOW); + EnableWindow(h, TRUE); + SendMessage(h, CB_SETCURSEL, + temp_mo_drives[modlv_current_sel].bus_id.scsi.lun, 0); + break; + } +} + + +static void +mo_track(uint8_t id) +{ + if (temp_mo_drives[id].bus_type == MO_BUS_ATAPI) + ide_tracking |= (1ULL << temp_mo_drives[id].bus_id.ide_channel); + else if (temp_mo_drives[id].bus_type == MO_BUS_SCSI) + scsi_tracking[temp_mo_drives[id].bus_id.scsi.id] |= (1ULL << temp_mo_drives[id].bus_id.scsi.lun); +} + + +static void +mo_untrack(uint8_t id) +{ + if (temp_mo_drives[id].bus_type == MO_BUS_ATAPI) + ide_tracking &= ~(1ULL << temp_mo_drives[id].bus_id.ide_channel); + else if (temp_mo_drives[id].bus_type == MO_BUS_SCSI) + scsi_tracking[temp_mo_drives[id].bus_id.scsi.id] &= ~(1ULL << temp_mo_drives[id].bus_id.scsi.lun); +} + +static WIN_RESULT CALLBACK +mo_devices_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + HWND h = NULL; + int old_sel = 0; + int assign = 0; + int b; + + switch (message) { + case WM_INITDIALOG: + rd_ignore_change = 1; + + zdlv_current_sel = 0; + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + mo_init_columns(h); + mo_image_list_init(h); + mo_recalc_list(h); + mo_add_locations(hdlg); + h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS); + b = temp_mo_drives[modlv_current_sel].bus_type; + SendMessage(h, CB_SETCURSEL, b, 0); + mo_recalc_location_controls(hdlg, 0); + rd_ignore_change = 0; + return TRUE; + + case WM_NOTIFY: + if (rd_ignore_change) + return FALSE; + + if ((((LPNMHDR)lParam)->code == LVN_ITEMCHANGED) && (((LPNMHDR)lParam)->idFrom == IDC_LIST_MO_DRIVES)) { + old_sel = modlv_current_sel; + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + modlv_current_sel = mo_get_selected(hdlg); + if (modlv_current_sel == old_sel) + return FALSE; + + if (modlv_current_sel == -1) { + rd_ignore_change = 1; + modlv_current_sel = old_sel; + ListView_SetItemState(h, modlv_current_sel, LVIS_FOCUSED | LVIS_SELECTED, 0x000F); + rd_ignore_change = 0; + return FALSE; + } + rd_ignore_change = 1; + + h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS); + b = temp_mo_drives[modlv_current_sel].bus_type; + SendMessage(h, CB_SETCURSEL, b, 0); + mo_recalc_location_controls(hdlg, 0); + } + rd_ignore_change = 0; + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDC_COMBO_MO_BUS: + if (rd_ignore_change) + return FALSE; + + rd_ignore_change = 1; + h = GetDlgItem(hdlg, IDC_COMBO_MO_BUS); + b = (int)SendMessage(h, CB_GETCURSEL, 0, 0); + if (temp_mo_drives[modlv_current_sel].bus_type == b) + goto mo_bus_skip; + mo_untrack(modlv_current_sel); + assign = (temp_mo_drives[modlv_current_sel].bus_type == b) ? 0 : 1; + temp_mo_drives[modlv_current_sel].bus_type = b; + mo_recalc_location_controls(hdlg, assign); + mo_track(modlv_current_sel); + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + mo_update_item(h, modlv_current_sel); + mo_bus_skip: + rd_ignore_change = 0; + return FALSE; + + case IDC_COMBO_MO_ID: + if (rd_ignore_change) + return FALSE; + + rd_ignore_change = 1; + h = GetDlgItem(hdlg, IDC_COMBO_MO_ID); + zip_untrack(zdlv_current_sel); + b = (int)SendMessage(h, CB_GETCURSEL, 0, 0); + temp_mo_drives[modlv_current_sel].bus_id.scsi.id = (uint8_t)b; + mo_track(modlv_current_sel); + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + mo_update_item(h, modlv_current_sel); + rd_ignore_change = 0; + return FALSE; + + case IDC_COMBO_MO_LUN: + if (rd_ignore_change) + return FALSE; + + rd_ignore_change = 1; + h = GetDlgItem(hdlg, IDC_COMBO_MO_LUN); + mo_untrack(modlv_current_sel); + b = (int)SendMessage(h, CB_GETCURSEL, 0, 0); + temp_mo_drives[modlv_current_sel].bus_id.scsi.lun = (uint8_t)b; + mo_track(modlv_current_sel); + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + mo_update_item(h, modlv_current_sel); + rd_ignore_change = 0; + return FALSE; + + case IDC_COMBO_ZIP_CHANNEL_IDE: + if (rd_ignore_change) + return FALSE; + + rd_ignore_change = 1; + h = GetDlgItem(hdlg, IDC_COMBO_MO_CHANNEL_IDE); + mo_untrack(modlv_current_sel); + b = (int)SendMessage(h, CB_GETCURSEL, 0, 0); + temp_mo_drives[modlv_current_sel].bus_id.ide_channel = (uint8_t)b; + mo_track(modlv_current_sel); + h = GetDlgItem(hdlg, IDC_LIST_MO_DRIVES); + mo_update_item(h, modlv_current_sel); + rd_ignore_change = 0; + return FALSE; + } + return FALSE; + + default: + break; + } + + return FALSE; +}