From db239d64e526bc6864659821c393a3e7d3dfd83d Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Fri, 19 Nov 2021 05:12:51 +0500 Subject: [PATCH] Allow use of ATAPI devices with XTIDE --- src/win/win_media_menu.c | 12 +++++++++--- src/win/win_stbar.c | 12 ++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/win/win_media_menu.c b/src/win/win_media_menu.c index cd2a5f33c..cf7974dd4 100644 --- a/src/win/win_media_menu.c +++ b/src/win/win_media_menu.c @@ -417,7 +417,9 @@ is_valid_fdd(int i) static inline int is_valid_cdrom(int i) { - if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) + if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && !MACHINE_HAS_IDE && + memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) && + memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) return 0; if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && @@ -430,7 +432,9 @@ is_valid_cdrom(int i) static inline int is_valid_zip(int i) { - if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) + if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !MACHINE_HAS_IDE && + memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) && + memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) return 0; if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && @@ -443,7 +447,9 @@ is_valid_zip(int i) static inline int is_valid_mo(int i) { - if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) + if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && !MACHINE_HAS_IDE && + memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) && + memcmp(hdc_get_internal_name(hdc_current), "ide", 3)) return 0; if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !MACHINE_HAS_SCSI && (scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) && diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index f8107adb2..afc906215 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -573,7 +573,7 @@ ui_sb_update_panes(void) for (i=0; i