Frame counter can now display when no movie is loaded. (If no movie, reset and power reset the counter to 0).
This commit is contained in:
parent
3a8eb3ea3a
commit
0a5f20c034
|
@ -590,7 +590,6 @@ int main(int argc,char *argv[])
|
|||
fullscreen = !!fullscreen;
|
||||
soundo = !!soundo;
|
||||
frame_display = !!frame_display;
|
||||
//input_display = !!input_display; adelikat - input_display has 4 states, not 2, this shouldn't be done
|
||||
allowUDLR = !!allowUDLR;
|
||||
pauseAfterPlayback = !!pauseAfterPlayback;
|
||||
EnableBackgroundInput = !!EnableBackgroundInput;
|
||||
|
|
|
@ -541,12 +541,21 @@ void FCEUI_VSUniCoin(void)
|
|||
FCEU_QSimpleCommand(FCEUNPCMD_VSUNICOIN);
|
||||
}
|
||||
|
||||
//Resets the frame counter if movie inactive and rom is reset or power-cycle
|
||||
void ResetFrameCounter()
|
||||
{
|
||||
extern EMOVIEMODE movieMode;
|
||||
if(movieMode == MOVIEMODE_INACTIVE)
|
||||
currFrameCounter = 0;
|
||||
}
|
||||
|
||||
//Resets the NES
|
||||
void FCEUI_ResetNES(void)
|
||||
{
|
||||
if(!FCEU_IsValidUI(FCEUI_RESET))
|
||||
return;
|
||||
FCEU_QSimpleCommand(FCEUNPCMD_RESET);
|
||||
ResetFrameCounter();
|
||||
}
|
||||
|
||||
//Powers off the NES
|
||||
|
@ -555,6 +564,7 @@ void FCEUI_PowerNES(void)
|
|||
if(!FCEU_IsValidUI(FCEUI_POWER))
|
||||
return;
|
||||
FCEU_QSimpleCommand(FCEUNPCMD_POWER);
|
||||
ResetFrameCounter();
|
||||
}
|
||||
|
||||
const char* FCEUI_CommandTypeNames[]=
|
||||
|
|
|
@ -947,6 +947,13 @@ void FCEU_DrawMovies(uint8 *XBuf)
|
|||
if(counterbuf[0])
|
||||
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
char counterbuf[32] = {0};
|
||||
sprintf(counterbuf,"%d (no movie)",currFrameCounter);
|
||||
if(counterbuf[0])
|
||||
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
}
|
||||
}
|
||||
|
||||
void FCEU_DrawLagCounter(uint8 *XBuf)
|
||||
|
|
Loading…
Reference in New Issue