mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-17 18:08:47 +02:00
Fixed if statement formatting in displayStats() and timer() in Application.cpp
This commit is contained in:
parent
53543c26fe
commit
be2e6518a1
1 changed files with 6 additions and 8 deletions
|
@ -849,8 +849,9 @@ void sendPingPackets() {
|
||||||
void Application::timer() {
|
void Application::timer() {
|
||||||
gettimeofday(&_timerEnd, NULL);
|
gettimeofday(&_timerEnd, NULL);
|
||||||
|
|
||||||
if (_testPing->isChecked())
|
if (_testPing->isChecked()) {
|
||||||
sendPingPackets();
|
sendPingPackets();
|
||||||
|
}
|
||||||
|
|
||||||
_fps = (float)_frameCount / ((float)diffclock(&_timerStart, &_timerEnd) / 1000.f);
|
_fps = (float)_frameCount / ((float)diffclock(&_timerStart, &_timerEnd) / 1000.f);
|
||||||
_packetsPerSecond = (float)_packetCount / ((float)diffclock(&_timerStart, &_timerEnd) / 1000.f);
|
_packetsPerSecond = (float)_packetCount / ((float)diffclock(&_timerStart, &_timerEnd) / 1000.f);
|
||||||
|
@ -2306,12 +2307,9 @@ void Application::displayStats() {
|
||||||
Agent *avatarMixerAgent = agentList->soloAgentOfType(AGENT_TYPE_AVATAR_MIXER);
|
Agent *avatarMixerAgent = agentList->soloAgentOfType(AGENT_TYPE_AVATAR_MIXER);
|
||||||
Agent *voxelServerAgent = agentList->soloAgentOfType(AGENT_TYPE_VOXEL_SERVER);
|
Agent *voxelServerAgent = agentList->soloAgentOfType(AGENT_TYPE_VOXEL_SERVER);
|
||||||
|
|
||||||
if (audioMixerAgent != NULL)
|
pingAudio = audioMixerAgent ? audioMixerAgent->getPingMs() : 0;
|
||||||
pingAudio = audioMixerAgent->getPingMs();
|
pingAvatar = avatarMixerAgent ? avatarMixerAgent->getPingMs() : 0;
|
||||||
if (avatarMixerAgent != NULL)
|
pingVoxel = voxelServerAgent ? voxelServerAgent->getPingMs() : 0;
|
||||||
pingAvatar = avatarMixerAgent->getPingMs();
|
|
||||||
if (voxelServerAgent != NULL)
|
|
||||||
pingVoxel = voxelServerAgent->getPingMs();
|
|
||||||
|
|
||||||
char pingStats[200];
|
char pingStats[200];
|
||||||
sprintf(pingStats, "Ping audio/avatar/voxel: %d / %d / %d ", pingAudio, pingAvatar, pingVoxel);
|
sprintf(pingStats, "Ping audio/avatar/voxel: %d / %d / %d ", pingAudio, pingAvatar, pingVoxel);
|
||||||
|
|
Loading…
Reference in a new issue