Skip to content

Commit cbc9d66

Browse files
committed
[Nokia N-Gage] Add define to disable FPS counter by default.
1 parent d9af41b commit cbc9d66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/render/ngage/SDL_render_ngage.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ void CRenderer::Flip()
570570
return;
571571
}
572572

573+
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
573574
iRenderer->Gc()->UseFont(iFont);
574575

575576
if (iShowFPS && iRenderer->Gc()) {
@@ -594,6 +595,7 @@ void CRenderer::Flip()
594595
iRenderer->Gc()->DrawText(_L(""), TPoint(0, 0));
595596
}
596597
iRenderer->Gc()->DiscardFont();
598+
#endif // SDL_VIDEO_RENDER_NGAGE_FPS
597599
iRenderer->Flip(iDirectScreen);
598600

599601
// Keep the backlight on.
@@ -627,6 +629,7 @@ void CRenderer::SetClipRect(TInt aX, TInt aY, TInt aWidth, TInt aHeight)
627629
}
628630
}
629631

632+
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
630633
void CRenderer::UpdateFPS()
631634
{
632635
static TTime lastTime;
@@ -648,6 +651,7 @@ void CRenderer::UpdateFPS()
648651
lastTime = currentTime;
649652
}
650653
}
654+
#endif
651655

652656
void CRenderer::SuspendScreenSaver(TBool aSuspend)
653657
{
@@ -742,13 +746,15 @@ void CRenderer::HandleEvent(const TWsEvent &aWsEvent)
742746
timestamp = SDL_GetPerformanceCounter();
743747
SDL_SendKeyboardKey(timestamp, 1, aWsEvent.Key()->iCode, ConvertScancode(aWsEvent.Key()->iScanCode), true);
744748

749+
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
745750
if (aWsEvent.Key()->iScanCode == EStdKeyHash) {
746751
if (iShowFPS) {
747752
iShowFPS = EFalse;
748753
} else {
749754
iShowFPS = ETrue;
750755
}
751756
}
757+
#endif
752758

753759
break;
754760
case EEventKeyUp: /* Key events */

0 commit comments

Comments
 (0)