another idle call patch

Andreas Mohr andi at rhlx01.fht-esslingen.de
Mon Jul 1 17:25:12 CDT 2002


Hi all,

Turbo Pascal 6 queries the key state in a tight loop, causing 100% CPU
usage.
I'm using a 5ms Sleep here only, because using more might have adverse
effects on program usability in some cases eventually.

This patch makes TP6 much more responsive, too.

- make sure we wait some time during int16 keyboard query call

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/winedos/int16.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int16.c,v
retrieving revision 1.3
diff -u -r1.3 int16.c
--- dlls/winedos/int16.c	31 May 2002 23:40:54 -0000	1.3
+++ dlls/winedos/int16.c	1 Jul 2002 22:24:19 -0000
@@ -71,6 +71,9 @@
       {
           RESET_ZFLAG(context);
       }
+      /* don't miss the opportunity to break some tight timing loop in DOS
+       * programs causing 100% CPU usage (by doing a Sleep here) */
+      Sleep(5);
       break;
 
    case 0x02: /* Get Shift Flags */


More information about the wine-patches mailing list