it is now possible to disable the FPS display

This commit is contained in:
Zeno Rogue 2018-01-25 17:22:50 +01:00
parent 3a52193426
commit 9027a7d6d2
2 changed files with 8 additions and 1 deletions

View File

@ -98,6 +98,9 @@ int arg::readCommon() {
else if(argis("-nogui")) {
noGUI = true;
}
else if(argis("-nofps")) {
nofps = true;
}
else if(argis("-back")) {
shift(); backcolor = strtol(args(), NULL, 16);
}

View File

@ -327,6 +327,8 @@ void drawMobileArrow(cell *c, transmatrix V) {
queuepolyat(atscreenpos(dx, dy, scale) * spin(-alpha), shArrow, col, PPR_MOBILE_ARROW);
}
bool nofps = false;
void drawStats() {
callhandlers(false, hooks_prestats);
#if CAP_ROGUEVIZ
@ -524,7 +526,9 @@ void drawStats() {
"but are not counted in the total kill count.");
}
}
if(displayButtonS(4, vid.yres - 4 - vid.fsize/2, s0+VER+ XLAT(" fps: ") + its(calcfps()), 0x202020, 0, vid.fsize/2)) {
string vers = VER;
if(!nofps) vers += XLAT(" fps: ") + its(calcfps());
if(displayButtonS(4, vid.yres - 4 - vid.fsize/2, vers, 0x202020, 0, vid.fsize/2)) {
mouseovers = XLAT("frames per second"),
getcstat = SDLK_F1,
instat = true,