aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-06 11:42:57 -0700
committerMcCabe Maxsted2011-04-06 11:43:33 -0700
commitd3aedf98d023ecc60b791aacbf9c00fd2fbee588 (patch)
tree02a63ec10336725fd324153d6ea258779c2faec8
parentExtended windows detection to include Windows 7, ported from Singularity, pat... (diff)
downloadmeta-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
-rw-r--r--linden/indra/llcommon/llsys.cpp14
-rw-r--r--linden/indra/llcommon/llsys.h4
-rw-r--r--linden/indra/newview/llappviewer.cpp4
-rw-r--r--linden/indra/newview/llfeaturemanager.cpp2
-rw-r--r--linden/indra/newview/llviewerjoystick.cpp2
5 files changed, 13 insertions, 13 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
598F64 LLCPUInfo::getMhz() const 598F64 LLCPUInfo::getMHz() const
599{ 599{
600 return mCPUMhz; 600 return mCPUMHz;
601} 601}
602 602
603std::string LLCPUInfo::getCPUString() const 603std::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};
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 268c4c0..0eaecb1 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -859,7 +859,7 @@ bool LLAppViewer::init()
859 minSpecs += "\n"; 859 minSpecs += "\n";
860 unsupported = true; 860 unsupported = true;
861 } 861 }
862 if(gSysCPU.getMhz() < minCPU) 862 if(gSysCPU.getMHz() < minCPU)
863 { 863 {
864 minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); 864 minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
865 minSpecs += "\n"; 865 minSpecs += "\n";
@@ -2468,7 +2468,7 @@ void LLAppViewer::writeSystemInfo()
2468 2468
2469 gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); 2469 gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
2470 gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); 2470 gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
2471 gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); 2471 gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMHz();
2472 gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); 2472 gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec();
2473 gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); 2473 gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
2474 gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); 2474 gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index bf43fcf..25942e9 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -617,7 +617,7 @@ void LLFeatureManager::applyBaseMasks()
617#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? 617#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here?
618 if (gSysCPU.getMhz() < 800) 618 if (gSysCPU.getMhz() < 800)
619#else 619#else
620 if (gSysCPU.getMhz() < 1100) 620 if (gSysCPU.getMHz() < 1100)
621#endif 621#endif
622 { 622 {
623 maskFeatures("CPUSlow"); 623 maskFeatures("CPUSlow");
diff --git a/linden/indra/newview/llviewerjoystick.cpp b/linden/indra/newview/llviewerjoystick.cpp
index 4e509c7..675feb6 100644
--- a/linden/indra/newview/llviewerjoystick.cpp
+++ b/linden/indra/newview/llviewerjoystick.cpp
@@ -162,7 +162,7 @@ LLViewerJoystick::LLViewerJoystick()
162 memset(mBtn, 0, sizeof(mBtn)); 162 memset(mBtn, 0, sizeof(mBtn));
163 163
164 // factor in bandwidth? bandwidth = gViewerStats->mKBitStat 164 // factor in bandwidth? bandwidth = gViewerStats->mKBitStat
165 mPerfScale = 4000.f / gSysCPU.getMhz(); 165 mPerfScale = 4000.f / gSysCPU.getMHz();
166} 166}
167 167
168// ----------------------------------------------------------------------------- 168// -----------------------------------------------------------------------------