Standardize hdc_current into an array

This commit is contained in:
Jasmine Iwanek
2024-07-20 03:08:04 -04:00
parent 539dccdcd1
commit 680f65cf19
13 changed files with 28 additions and 28 deletions

View File

@@ -30,7 +30,7 @@
#include <86box/hdc_ide.h>
#include <86box/hdd.h>
int hdc_current;
int hdc_current[2];
#ifdef ENABLE_HDC_LOG
int hdc_do_log = ENABLE_HDC_LOG;
@@ -101,11 +101,11 @@ void
hdc_reset(void)
{
hdc_log("HDC: reset(current=%d, internal=%d)\n",
hdc_current, (machines[machine].flags & MACHINE_HDC) ? 1 : 0);
hdc_current[0], (machines[machine].flags & MACHINE_HDC) ? 1 : 0);
/* If we have a valid controller, add its device. */
if (hdc_current > HDC_INTERNAL)
device_add(controllers[hdc_current].device);
if (hdc_current[0] > HDC_INTERNAL)
device_add(controllers[hdc_current[0]].device);
/* Now, add the tertiary and/or quaternary IDE controllers. */
if (ide_ter_enabled)