1
0
Fork 0

better use the ratio after it is updated...

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3267
This commit is contained in:
Sebastian Strohhäcker 2009-01-20 20:01:04 +00:00
parent 5ba2b294e7
commit 9f649f01b4

View file

@ -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 <stdlib.h>
#include <stdarg.h>
@ -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