aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerstats.cpp')
-rw-r--r--linden/indra/newview/llviewerstats.cpp46
1 files changed, 25 insertions, 21 deletions
diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp
index fd56c21..32d7f63 100644
--- a/linden/indra/newview/llviewerstats.cpp
+++ b/linden/indra/newview/llviewerstats.cpp
@@ -57,15 +57,15 @@
57#include "llviewerwindow.h" // *TODO: remove, only used for width/height 57#include "llviewerwindow.h" // *TODO: remove, only used for width/height
58#include "llworld.h" 58#include "llworld.h"
59#include "llfeaturemanager.h" 59#include "llfeaturemanager.h"
60#if LL_WINDOWS && LL_LCD_COMPILE 60#if LL_LCD_COMPILE
61 #include "lllcd.h" 61#include "lllcd.h"
62#endif 62#endif
63 63
64 64
65class StatAttributes 65class StatAttributes
66{ 66{
67public: 67public:
68 StatAttributes(const char *name, 68 StatAttributes(const char* name,
69 const BOOL enabled, 69 const BOOL enabled,
70 const BOOL is_timer) 70 const BOOL is_timer)
71 : mName(name), 71 : mName(name),
@@ -74,9 +74,9 @@ public:
74 { 74 {
75 } 75 }
76 76
77 const char *mName; 77 std::string mName;
78 const BOOL mEnabled; 78 BOOL mEnabled;
79 const BOOL mIsTimer; 79 BOOL mIsTimer;
80}; 80};
81 81
82const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = 82const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
@@ -332,17 +332,17 @@ void LLViewerStats::addToMessage(LLSD &body) const
332} 332}
333 333
334// static 334// static
335const char *LLViewerStats::statTypeToText(EStatType type) 335// const std::string LLViewerStats::statTypeToText(EStatType type)
336{ 336// {
337 if (type >= 0 && type < ST_COUNT) 337// if (type >= 0 && type < ST_COUNT)
338 { 338// {
339 return STAT_INFO[type].mName; 339// return STAT_INFO[type].mName;
340 } 340// }
341 else 341// else
342 { 342// {
343 return "Unknown statistic"; 343// return "Unknown statistic";
344 } 344// }
345} 345// }
346 346
347// *NOTE:Mani The following methods used to exist in viewer.cpp 347// *NOTE:Mani The following methods used to exist in viewer.cpp
348// Moving them here, but not merging them into LLViewerStats yet. 348// Moving them here, but not merging them into LLViewerStats yet.
@@ -598,7 +598,7 @@ void update_statistics(U32 frame_count)
598 LLViewerImageList::sTextureBits = 0; 598 LLViewerImageList::sTextureBits = 0;
599 LLViewerImageList::sTexturePackets = 0; 599 LLViewerImageList::sTexturePackets = 0;
600 600
601#if LL_WINDOWS && LL_LCD_COMPILE 601#if LL_LCD_COMPILE
602 bool LCDenabled = gLcdScreen->Enabled(); 602 bool LCDenabled = gLcdScreen->Enabled();
603 LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, LCDenabled); 603 LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, LCDenabled);
604#else 604#else
@@ -680,7 +680,7 @@ void send_stats()
680 // send fps only for time app spends in foreground 680 // send fps only for time app spends in foreground
681 agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); 681 agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32();
682 agent["version"] = gCurrentVersion; 682 agent["version"] = gCurrentVersion;
683 LLString language(gSavedSettings.getString("Language")); 683 std::string language(gSavedSettings.getString("Language"));
684 if(language == "default") language = gSavedSettings.getString("SystemLanguage"); 684 if(language == "default") language = gSavedSettings.getString("SystemLanguage");
685 agent["language"] = language; 685 agent["language"] = language;
686 686
@@ -755,10 +755,14 @@ void send_stats()
755 755
756 S32 window_width = gViewerWindow->getWindowDisplayWidth(); 756 S32 window_width = gViewerWindow->getWindowDisplayWidth();
757 S32 window_height = gViewerWindow->getWindowDisplayHeight(); 757 S32 window_height = gViewerWindow->getWindowDisplayHeight();
758 S32 window_size = (window_width * window_height) / 1024;
759 misc["string_1"] = llformat("%d", window_size);
758 misc["string_1"] = llformat("%.dx%d", window_width, window_height); 760 misc["string_1"] = llformat("%.dx%d", window_width, window_height);
759 // misc["string_2"] = 761 // misc["string_2"] =
760 misc["int_1"] = LLFloaterDirectory::sOldSearchCount; // Steve: 1.18.6 762// misc["int_1"] = LLFloaterDirectory::sOldSearchCount; // Steve: 1.18.6
761 misc["int_2"] = LLFloaterDirectory::sNewSearchCount; // Steve: 1.18.6 763// misc["int_2"] = LLFloaterDirectory::sNewSearchCount; // Steve: 1.18.6
764 misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
765 misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
762 766
763 LLViewerStats::getInstance()->addToMessage(body); 767 LLViewerStats::getInstance()->addToMessage(body);
764 768