diff options
author | McCabe Maxsted | 2011-04-06 11:42:57 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-04-06 11:43:33 -0700 |
commit | d3aedf98d023ecc60b791aacbf9c00fd2fbee588 (patch) | |
tree | 02a63ec10336725fd324153d6ea258779c2faec8 /linden/indra/llcommon | |
parent | Extended windows detection to include Windows 7, ported from Singularity, pat... (diff) | |
download | meta-impy-d3aedf98d023ecc60b791aacbf9c00fd2fbee588.zip meta-impy-d3aedf98d023ecc60b791aacbf9c00fd2fbee588.tar.gz meta-impy-d3aedf98d023ecc60b791aacbf9c00fd2fbee588.tar.bz2 meta-impy-d3aedf98d023ecc60b791aacbf9c00fd2fbee588.tar.xz |
Fixed Mhz -> MHz, ported from Singularity, patch by Shyotl
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/llsys.cpp | 14 | ||||
-rw-r--r-- | linden/indra/llcommon/llsys.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp index ee27a49..d729d98 100644 --- a/linden/indra/llcommon/llsys.cpp +++ b/linden/indra/llcommon/llsys.cpp | |||
@@ -519,15 +519,15 @@ LLCPUInfo::LLCPUInfo() | |||
519 | mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; | 519 | mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; |
520 | mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; | 520 | mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; |
521 | mHasAltivec = info->_Ext.Altivec_Extensions; | 521 | mHasAltivec = info->_Ext.Altivec_Extensions; |
522 | mCPUMhz = (F64)(proc.GetCPUFrequency(50)/1000000.0); | 522 | mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0); |
523 | mFamily.assign( info->strFamily ); | 523 | mFamily.assign( info->strFamily ); |
524 | mCPUString = "Unknown"; | 524 | mCPUString = "Unknown"; |
525 | 525 | ||
526 | #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS | 526 | #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS |
527 | out << proc.strCPUName; | 527 | out << proc.strCPUName; |
528 | if (200 < mCPUMhz && mCPUMhz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check | 528 | if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check |
529 | { | 529 | { |
530 | out << " (" << mCPUMhz << " MHz)"; | 530 | out << " (" << mCPUMHz << " MHz)"; |
531 | } | 531 | } |
532 | mCPUString = out.str(); | 532 | mCPUString = out.str(); |
533 | 533 | ||
@@ -572,7 +572,7 @@ LLCPUInfo::LLCPUInfo() | |||
572 | if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) | 572 | if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) |
573 | && 200.0 < mhz && mhz < 10000.0) | 573 | && 200.0 < mhz && mhz < 10000.0) |
574 | { | 574 | { |
575 | mCPUMhz = (F64)llrint(mhz); | 575 | mCPUMHz = (F64)llrint(mhz); |
576 | } | 576 | } |
577 | if (!cpuinfo["model name"].empty()) | 577 | if (!cpuinfo["model name"].empty()) |
578 | mCPUString = cpuinfo["model name"]; | 578 | mCPUString = cpuinfo["model name"]; |
@@ -595,9 +595,9 @@ bool LLCPUInfo::hasSSE2() const | |||
595 | return mHasSSE2; | 595 | return mHasSSE2; |
596 | } | 596 | } |
597 | 597 | ||
598 | F64 LLCPUInfo::getMhz() const | 598 | F64 LLCPUInfo::getMHz() const |
599 | { | 599 | { |
600 | return mCPUMhz; | 600 | return mCPUMHz; |
601 | } | 601 | } |
602 | 602 | ||
603 | std::string LLCPUInfo::getCPUString() const | 603 | std::string LLCPUInfo::getCPUString() const |
@@ -644,7 +644,7 @@ void LLCPUInfo::stream(std::ostream& s) const | |||
644 | s << "->mHasSSE: " << (U32)mHasSSE << std::endl; | 644 | s << "->mHasSSE: " << (U32)mHasSSE << std::endl; |
645 | s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; | 645 | s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; |
646 | s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; | 646 | s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; |
647 | s << "->mCPUMhz: " << mCPUMhz << std::endl; | 647 | s << "->mCPUMHz: " << mCPUMHz << std::endl; |
648 | s << "->mCPUString: " << mCPUString << std::endl; | 648 | s << "->mCPUString: " << mCPUString << std::endl; |
649 | } | 649 | } |
650 | 650 | ||
diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h index d680e1a..e481c88 100644 --- a/linden/indra/llcommon/llsys.h +++ b/linden/indra/llcommon/llsys.h | |||
@@ -81,7 +81,7 @@ public: | |||
81 | bool hasAltivec() const; | 81 | bool hasAltivec() const; |
82 | bool hasSSE() const; | 82 | bool hasSSE() const; |
83 | bool hasSSE2() const; | 83 | bool hasSSE2() const; |
84 | F64 getMhz() const; | 84 | F64 getMHz() const; |
85 | 85 | ||
86 | // Family is "AMD Duron" or "Intel Pentium Pro" | 86 | // Family is "AMD Duron" or "Intel Pentium Pro" |
87 | const std::string& getFamily() const { return mFamily; } | 87 | const std::string& getFamily() const { return mFamily; } |
@@ -90,7 +90,7 @@ private: | |||
90 | bool mHasSSE; | 90 | bool mHasSSE; |
91 | bool mHasSSE2; | 91 | bool mHasSSE2; |
92 | bool mHasAltivec; | 92 | bool mHasAltivec; |
93 | F64 mCPUMhz; | 93 | F64 mCPUMHz; |
94 | std::string mFamily; | 94 | std::string mFamily; |
95 | std::string mCPUString; | 95 | std::string mCPUString; |
96 | }; | 96 | }; |