From 01b413110abc263678d5e36c5788d2cf267b1072 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 26 Nov 2020 18:59:25 +0100 Subject: [PATCH] The Settings dialog now once again omits the "Internal" option for hard disk controller for machines without one. --- src/include/86box/machine.h | 2 +- src/win/win_settings.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 9cb155f81..055ed5363 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -65,7 +65,7 @@ /* Combined flags. */ #define MACHINE_VIDEO_FIXED 0x00003000 /* sys has fixed int video */ /* Feature flags for internal storage controllers. */ -#define MACHINE_HDC 0x0FFC0000 /* sys has int HDC */ +#define MACHINE_HDC 0x07FC0000 /* sys has int HDC */ #define MACHINE_MFM 0x00100000 /* sys has int MFM/RLL */ #define MACHINE_XTA 0x00200000 /* sys has int XTA */ #define MACHINE_ESDI 0x00400000 /* sys has int ESDI */ diff --git a/src/win/win_settings.c b/src/win/win_settings.c index ea102e36b..a898001f0 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -1523,6 +1523,12 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) c = d = 0; settings_reset_content(hdlg, IDC_COMBO_HDC); while (1) { + /* Skip "internal" if machine doesn't have it. */ + if ((c == 1) && !(machines[temp_machine].flags & MACHINE_HDC)) { + c++; + continue; + } + generate_device_name(hdc_get_device(c), hdc_get_internal_name(c), 1); if (!device_name[0])