From 97b90093026953a412c802ee32d80fee2ac38686 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 12 Oct 2000 20:42:23 +0000 Subject: [PATCH] Removed dependency on globals LPT[] and COM{}. --- msdos/int11.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/msdos/int11.c b/msdos/int11.c index f6e9d72f7ea..d8c3cae7309 100644 --- a/msdos/int11.c +++ b/msdos/int11.c @@ -3,10 +3,12 @@ */ #include +#include "windows.h" #include "miscemu.h" #include "msdos.h" #include "drive.h" #include "debugtools.h" +#include "options.h" /********************************************************************** * INT_Int11Handler @@ -52,9 +54,16 @@ void WINAPI INT_Int11Handler( CONTEXT86 *context ) for (x=0; x!=MAX_PORTS; x++) { - if (COM[x].devicename) + char temp[16],name[16]; + + wsprintfA(name,"COM%d",x+1); + PROFILE_GetWineIniString("serialports",name,"*",temp,sizeof temp); + if(strcmp(temp,"*")) serialports++; - if (LPT[x].devicename) + + wsprintfA(name,"LPT%d",x+1); + PROFILE_GetWineIniString("parallelports",name,"*",temp,sizeof temp); + if(strcmp(temp,"*")) parallelports++; } if (serialports > 7) /* 3 bits -- maximum value = 7 */