1
0
Fork 0

enhance cycles config variable a bit

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2780
This commit is contained in:
Sebastian Strohhäcker 2007-01-21 18:14:52 +00:00
parent 103cd7f6c9
commit 667c756775
3 changed files with 69 additions and 9 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dosbox.cpp,v 1.112 2007-01-21 16:21:22 c2woody Exp $ */
/* $Id: dosbox.cpp,v 1.113 2007-01-21 18:14:40 c2woody Exp $ */
#include <stdlib.h>
#include <stdarg.h>
@ -170,6 +170,9 @@ increaseticks:
CPU_CycleMax = (CPU_CycleMax * ratio) / 1024;
else
CPU_CycleMax = 1 + (CPU_CycleMax >> 1) + (CPU_CycleMax * ratio) / 2048;
if (CPU_CycleLimit>0) {
if (CPU_CycleMax>CPU_CycleLimit) CPU_CycleMax=CPU_CycleLimit;
}
ticksDone = 0;
ticksScheduled = 0;
}