From 9f649f01b4dae094f442c36539cb7334075c5cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Tue, 20 Jan 2009 20:01:04 +0000 Subject: [PATCH] better use the ratio after it is updated... Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3267 --- src/dosbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dosbox.cpp b/src/dosbox.cpp index 9601f0fc..c75fb8a8 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dosbox.cpp,v 1.140 2009-01-14 20:50:22 c2woody Exp $ */ +/* $Id: dosbox.cpp,v 1.141 2009-01-20 20:01:04 c2woody Exp $ */ #include #include @@ -176,8 +176,8 @@ increaseticks: to have smoother auto cycle adjustments */ double ratioremoved = (double) CPU_IODelayRemoved / (double) cproc; if (ratioremoved < 1.0) { - Bit64s cmax_scaled = (Bit64s)CPU_CycleMax * (Bit64s)ratio; ratio = (Bit32s)((double)ratio * (1 - ratioremoved)); + Bit64s cmax_scaled = (Bit64s)CPU_CycleMax * (Bit64s)ratio; if (ratio <= 1024) new_cmax = (Bit32s)(cmax_scaled / (Bit64s)1024); else