another idle call patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
Determining best CVS host...
Using CVSROOT :pserver:cvs@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 */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux