From 8126b4002c170702d8bded4d6b6c2054cc34a040 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Thu, 8 Jul 2004 07:09:30 +0000 Subject: [PATCH] Change the way the callback_idle call wastes cpu power Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1878 --- src/cpu/callback.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cpu/callback.cpp b/src/cpu/callback.cpp index ed9ffdfc..d12eb49e 100644 --- a/src/cpu/callback.cpp +++ b/src/cpu/callback.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: callback.cpp,v 1.19 2004-01-07 20:23:48 qbix79 Exp $ */ +/* $Id: callback.cpp,v 1.20 2004-07-08 07:09:30 harekiet Exp $ */ #include #include @@ -67,8 +67,7 @@ void CALLBACK_Idle(void) { reg_eip=oldeip; SegSet16(cs,oldcs); SETFLAGBIT(IF,oldIF); - if (CPU_CycleLeft<300) CPU_CycleLeft=1; - else CPU_CycleLeft-=300; + if (CPU_Cycles>0) CPU_Cycles=0; } static Bitu default_handler(void) {