From 3fd4391289d95c4a0bf61ee943fefc9d746a7fab Mon Sep 17 00:00:00 2001 From: SarahW Date: Tue, 16 May 2017 20:57:01 +0100 Subject: [PATCH] HDD controller type now correctly determined when editing hard disc parameters from configuration manager. --- src/hdd.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/hdd.c b/src/hdd.c index 45ed5ab..41e5a1d 100644 --- a/src/hdd.c +++ b/src/hdd.c @@ -53,7 +53,20 @@ int hdd_controller_available(int hdd) int hdd_controller_current_is_mfm() { - return hdd_controllers[hdd_controller_current].is_mfm; + int c = 0; + + while (hdd_controllers[c].device) + { + if (!strcmp(hdd_controller_name, hdd_controllers[c].internal_name)) + { + hdd_controller_current = c; + if (strcmp(hdd_controller_name, "none")) + return hdd_controllers[c].is_mfm; + } + c++; + } + + return 0; } void hdd_controller_init(char *internal_name)