sdl: fix and enable SHOWFPS build option (TODO: make runtime option):

This commit is contained in:
punkrockguy318 2012-08-10 14:37:26 +00:00
parent 3dc703cc3c
commit 0a6dd020d8
3 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,7 @@ opts.AddVariables(
BoolVariable('FRAMESKIP', 'Enable frameskipping', 1),
BoolVariable('OPENGL', 'Enable OpenGL support', 1),
BoolVariable('LSB_FIRST', 'Least signficant byte first (non-PPC)', 1),
BoolVariable('SHOWFPS', 'Show the running frames per second.)', 0), # TODO: move this to runtime configuration option
BoolVariable('DEBUG', 'Build with debugging symbols', 1),
BoolVariable('LUA', 'Enable Lua support', 1),
BoolVariable('NEWPPU', 'Enable new PPU core', 1),
@ -141,6 +142,9 @@ if env['DEBUG']:
else:
env.Append(CCFLAGS = ['-O2'])
if env['SHOWFPS']:
env.Append(CPPDEFINES=["SHOWFPS"])
if env['PLATFORM'] != 'win32' and env['PLATFORM'] != 'cygwin' and env['CREATE_AVI']:
env.Append(CPPDEFINES=["CREATE_AVI"])
else:

View File

@ -1,4 +1,4 @@
10-Aug-2012 - prg - sdl: fix and enable SHOWFPS build option (TODO: make runtime option)
10-Aug-2012 - AnS - Debugger: "Address Bookmark Add" field follows disassembly window scrolling position
08-Aug-2012 - AnS - Taseditor: frame counter display is auto-on when Taseditor launches
08-Aug-2012 - AnS - Debugger: improved stack display

View File

@ -760,7 +760,7 @@ void ShowFPS(void)
boop[boopcount] = FCEUD_GetTime();
sprintf(fpsmsg, "%8.1f",(double)booplimit / ((double)da / FCEUD_GetTimeFreq()));
DrawTextTrans(ClipSidesOffset+XBuf + (256-8-8*8) + (FSettings.FirstSLine+4)*256,256,fpsmsg,4);
DrawTextTrans(ClipSidesOffset+XBuf + (256-8-8*8) + (FSettings.FirstSLine+4)*256,256, (uint8*)fpsmsg ,4);
// It's not averaging FPS over exactly 1 second, but it's close enough.
boopcount = (boopcount + 1) % booplimit;
}