1
0
Fork 0

Make frameskip an integer.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4273
This commit is contained in:
Peter Veenstra 2019-10-19 19:52:24 +00:00
parent 6ac1bcf9e7
commit 276b187181
3 changed files with 15 additions and 15 deletions

View file

@ -58,8 +58,8 @@ typedef struct {
float fps;
} src;
struct {
Bitu count;
Bitu max;
int count;
int max;
Bitu index;
Bit8u hadSkip[RENDER_SKIP_CACHE];
} frameskip;

View file

@ -376,11 +376,11 @@ forcenormal:
}
switch (render.src.bpp) {
case 8:
render.src.start = ( render.src.width * 1) / sizeof(Bitu);
if (gfx_flags & GFX_CAN_8)
gfx_flags |= GFX_LOVE_8;
else
gfx_flags |= GFX_LOVE_32;
render.src.start = ( render.src.width * 1) / sizeof(Bitu);
if (gfx_flags & GFX_CAN_8)
gfx_flags |= GFX_LOVE_8;
else
gfx_flags |= GFX_LOVE_32;
break;
case 15:
render.src.start = ( render.src.width * 2) / sizeof(Bitu);
@ -534,7 +534,7 @@ void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double ratio,bool
RENDER_Reset( );
}
extern void GFX_SetTitle(Bit32s cycles, Bits frameskip,bool paused);
extern void GFX_SetTitle(Bit32s cycles, int frameskip,bool paused);
static void IncreaseFrameSkip(bool pressed) {
if (!pressed)
return;

View file

@ -286,19 +286,19 @@ extern bool CPU_CycleAutoAdjust;
bool startup_state_numlock=false;
bool startup_state_capslock=false;
void GFX_SetTitle(Bit32s cycles,Bits frameskip,bool paused){
char title[200]={0};
static Bit32s internal_cycles=0;
static Bit32s internal_frameskip=0;
if(cycles != -1) internal_cycles = cycles;
if(frameskip != -1) internal_frameskip = frameskip;
void GFX_SetTitle(Bit32s cycles,int frameskip,bool paused){
char title[200] = { 0 };
static Bit32s internal_cycles = 0;
static int internal_frameskip = 0;
if (cycles != -1) internal_cycles = cycles;
if (frameskip != -1) internal_frameskip = frameskip;
if(CPU_CycleAutoAdjust) {
sprintf(title,"DOSBox %s, CPU speed: max %3d%% cycles, Frameskip %2d, Program: %8s",VERSION,internal_cycles,internal_frameskip,RunningProgram);
} else {
sprintf(title,"DOSBox %s, CPU speed: %8d cycles, Frameskip %2d, Program: %8s",VERSION,internal_cycles,internal_frameskip,RunningProgram);
}
if(paused) strcat(title," PAUSED");
if (paused) strcat(title," PAUSED");
SDL_WM_SetCaption(title,VERSION);
}