Lag Counter on its own line (instead of added in with general messages)

This commit is contained in:
adelikat 2008-07-10 02:17:42 +00:00
parent 46a4a65eb9
commit 3bff3154c7
4 changed files with 16 additions and 1 deletions

View File

@ -587,7 +587,6 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
currMovieData.TryDumpIncremental();
if (lagFlag) LagCounter++;
if (lagCounterDisplay)FCEU_DispMessage("%d",LagCounter) ;
}
void FCEUI_CloseGame(void)

View File

@ -904,6 +904,20 @@ void FCEU_DrawMovies(uint8 *XBuf)
}
}
void FCEU_DrawLagCounter(uint8 *XBuf)
{
extern bool lagCounterDisplay;
extern unsigned int LagCounter;
if(lagCounterDisplay)
{
char counterbuf[32] = {0};
sprintf(counterbuf,"%d",LagCounter);
if(counterbuf[0])
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(32), 256, (uint8*)counterbuf, 0x20+0x80);
}
}
int FCEUMOV_WriteState(std::ostream* os)
{
//we are supposed to dump the movie data into the savestate

View File

@ -46,6 +46,7 @@ typedef struct
void FCEUMOV_AddInputState();
void FCEUMOV_AddCommand(int cmd);
void FCEU_DrawMovies(uint8 *);
void FCEU_DrawLagCounter(uint8 *);
enum EMOVIEMODE
{

View File

@ -219,6 +219,7 @@ void FCEU_PutImage(void)
FCEU_DrawSaveStates(XBuf);
FCEU_DrawMovies(XBuf);
FCEU_DrawLagCounter(XBuf);
FCEU_DrawNTSCControlBars(XBuf);
FCEU_DrawRecordingStatus(XBuf);
}