mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
fixed GUI main menu bar crash
This commit is contained in:
parent
dad7565aa0
commit
e69dc0c57b
1 changed files with 9 additions and 1 deletions
|
@ -1903,7 +1903,15 @@ void RE_DrawMainMenuBarInfo()
|
|||
static uint32_t frameCount = 0;
|
||||
static int displayedFPS = 0;
|
||||
|
||||
frameTimes[frameCount++] = rhie.presentToPresentUS;
|
||||
// frame times can be 0 in some cases
|
||||
if(rhie.presentToPresentUS > 0)
|
||||
{
|
||||
frameTimes[frameCount++] = rhie.presentToPresentUS;
|
||||
}
|
||||
else
|
||||
{
|
||||
frameCount = 0;
|
||||
}
|
||||
if(frameCount == ARRAY_LEN(frameTimes))
|
||||
{
|
||||
uint32_t sum = 0;
|
||||
|
|
Loading…
Reference in a new issue