winedos / Fix ioport regression

Jukka Heinonen jhei at iki.fi
Fri May 9 12:04:02 CDT 2003


Another fix for winevdm regressions. Since DOS executables
are no longer loaded via "Dosvm" callbacks, "Dosvm" is not
initialized when ioport instructions need to be emulated from DOS 
applications. 

This patch makes sure winedos callbacks are always called when 
ioport instructions are emulated, which makes it look like
ioport stuff could be moved into winedos, too.




Changelog:
    Make ioport instruction emulation call winedos handlers.




Index: msdos/ioports.c
===================================================================
RCS file: /home/wine/wine/msdos/ioports.c,v
retrieving revision 1.36
diff -u -r1.36 ioports.c
--- msdos/ioports.c	28 Aug 2002 23:42:36 -0000	1.36
+++ msdos/ioports.c	9 May 2003 16:55:35 -0000
@@ -314,7 +314,9 @@
 #endif
 
     /* first give the DOS VM a chance to handle it */
-    if (Dosvm.inport && Dosvm.inport( port, size, &res )) return res;
+    if (Dosvm.inport || DPMI_LoadDosSystem())
+        if (Dosvm.inport( port, size, &res )) 
+            return res;
 
     switch (port)
     {
@@ -436,7 +438,9 @@
 #endif
 
     /* first give the DOS VM a chance to handle it */
-    if (Dosvm.outport && Dosvm.outport( port, size, value )) return;
+    if (Dosvm.outport || DPMI_LoadDosSystem())
+        if (Dosvm.outport( port, size, value )) 
+            return;
 
     switch (port)
     {




-- 
Jukka Heinonen <http://www.iki.fi/jhei/>



More information about the wine-patches mailing list