Fix EOL
parent
7f1557e1d3
commit
7816fd238f
|
|
@ -1721,7 +1721,7 @@ bool LLAppViewer::doFrame()
|
|||
// }
|
||||
//}
|
||||
//last_call = LLTimer::getTotalTime();
|
||||
// </FS:Ansariel>
|
||||
// </FS:Ansariel>
|
||||
|
||||
display();
|
||||
|
||||
|
|
@ -1831,21 +1831,21 @@ bool LLAppViewer::doFrame()
|
|||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-22297: FPS limiter not working properly on Mac/Linux
|
||||
static LLCachedControl<U32> max_fps(gSavedSettings, "FramePerSecondLimit");
|
||||
static LLCachedControl<bool> fsLimitFramerate(gSavedSettings, "FSLimitFramerate");
|
||||
static LLCachedControl<U32> max_fps(gSavedSettings, "FramePerSecondLimit");
|
||||
static LLCachedControl<bool> fsLimitFramerate(gSavedSettings, "FSLimitFramerate");
|
||||
if (fsLimitFramerate && LLStartUp::getStartupState() == STATE_STARTED && !gTeleportDisplay && !logoutRequestSent() && max_fps > F_APPROXIMATELY_ZERO)
|
||||
{
|
||||
// Sleep a while to limit frame rate.
|
||||
F32 min_frame_time = 1.f / (F32)max_fps;
|
||||
S32 milliseconds_to_sleep = llclamp((S32)((min_frame_time - frameTimer.getElapsedTimeF64()) * 1000.f), 0, 1000);
|
||||
if (milliseconds_to_sleep > 0)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SLEEP);
|
||||
ms_sleep(milliseconds_to_sleep);
|
||||
}
|
||||
}
|
||||
{
|
||||
// Sleep a while to limit frame rate.
|
||||
F32 min_frame_time = 1.f / (F32)max_fps;
|
||||
S32 milliseconds_to_sleep = llclamp((S32)((min_frame_time - frameTimer.getElapsedTimeF64()) * 1000.f), 0, 1000);
|
||||
if (milliseconds_to_sleep > 0)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_SLEEP);
|
||||
ms_sleep(milliseconds_to_sleep);
|
||||
}
|
||||
}
|
||||
frameTimer.reset();
|
||||
// </FS:Ansariel>
|
||||
// </FS:Ansariel>
|
||||
|
||||
resumeMainloopTimeout();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue