mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-30 21:37:43 +08:00
[Nokia N-Gage] Add define to disable FPS counter by default.
This commit is contained in:
@@ -570,6 +570,7 @@ void CRenderer::Flip()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
|
||||||
iRenderer->Gc()->UseFont(iFont);
|
iRenderer->Gc()->UseFont(iFont);
|
||||||
|
|
||||||
if (iShowFPS && iRenderer->Gc()) {
|
if (iShowFPS && iRenderer->Gc()) {
|
||||||
@@ -594,6 +595,7 @@ void CRenderer::Flip()
|
|||||||
iRenderer->Gc()->DrawText(_L(""), TPoint(0, 0));
|
iRenderer->Gc()->DrawText(_L(""), TPoint(0, 0));
|
||||||
}
|
}
|
||||||
iRenderer->Gc()->DiscardFont();
|
iRenderer->Gc()->DiscardFont();
|
||||||
|
#endif // SDL_VIDEO_RENDER_NGAGE_FPS
|
||||||
iRenderer->Flip(iDirectScreen);
|
iRenderer->Flip(iDirectScreen);
|
||||||
|
|
||||||
// Keep the backlight on.
|
// Keep the backlight on.
|
||||||
@@ -627,6 +629,7 @@ void CRenderer::SetClipRect(TInt aX, TInt aY, TInt aWidth, TInt aHeight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
|
||||||
void CRenderer::UpdateFPS()
|
void CRenderer::UpdateFPS()
|
||||||
{
|
{
|
||||||
static TTime lastTime;
|
static TTime lastTime;
|
||||||
@@ -648,6 +651,7 @@ void CRenderer::UpdateFPS()
|
|||||||
lastTime = currentTime;
|
lastTime = currentTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CRenderer::SuspendScreenSaver(TBool aSuspend)
|
void CRenderer::SuspendScreenSaver(TBool aSuspend)
|
||||||
{
|
{
|
||||||
@@ -742,6 +746,7 @@ void CRenderer::HandleEvent(const TWsEvent &aWsEvent)
|
|||||||
timestamp = SDL_GetPerformanceCounter();
|
timestamp = SDL_GetPerformanceCounter();
|
||||||
SDL_SendKeyboardKey(timestamp, 1, aWsEvent.Key()->iCode, ConvertScancode(aWsEvent.Key()->iScanCode), true);
|
SDL_SendKeyboardKey(timestamp, 1, aWsEvent.Key()->iCode, ConvertScancode(aWsEvent.Key()->iScanCode), true);
|
||||||
|
|
||||||
|
#ifdef SDL_VIDEO_RENDER_NGAGE_FPS
|
||||||
if (aWsEvent.Key()->iScanCode == EStdKeyHash) {
|
if (aWsEvent.Key()->iScanCode == EStdKeyHash) {
|
||||||
if (iShowFPS) {
|
if (iShowFPS) {
|
||||||
iShowFPS = EFalse;
|
iShowFPS = EFalse;
|
||||||
@@ -749,6 +754,7 @@ void CRenderer::HandleEvent(const TWsEvent &aWsEvent)
|
|||||||
iShowFPS = ETrue;
|
iShowFPS = ETrue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case EEventKeyUp: /* Key events */
|
case EEventKeyUp: /* Key events */
|
||||||
|
|||||||
Reference in New Issue
Block a user