From d3aedf98d023ecc60b791aacbf9c00fd2fbee588 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 6 Apr 2011 11:42:57 -0700 Subject: Fixed Mhz -> MHz, ported from Singularity, patch by Shyotl --- linden/indra/llcommon/llsys.cpp | 14 +++++++------- linden/indra/llcommon/llsys.h | 4 ++-- linden/indra/newview/llappviewer.cpp | 4 ++-- linden/indra/newview/llfeaturemanager.cpp | 2 +- linden/indra/newview/llviewerjoystick.cpp | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'linden') 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() mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; mHasAltivec = info->_Ext.Altivec_Extensions; - mCPUMhz = (F64)(proc.GetCPUFrequency(50)/1000000.0); + mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0); mFamily.assign( info->strFamily ); mCPUString = "Unknown"; #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS out << proc.strCPUName; - if (200 < mCPUMhz && mCPUMhz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check + if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check { - out << " (" << mCPUMhz << " MHz)"; + out << " (" << mCPUMHz << " MHz)"; } mCPUString = out.str(); @@ -572,7 +572,7 @@ LLCPUInfo::LLCPUInfo() if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) && 200.0 < mhz && mhz < 10000.0) { - mCPUMhz = (F64)llrint(mhz); + mCPUMHz = (F64)llrint(mhz); } if (!cpuinfo["model name"].empty()) mCPUString = cpuinfo["model name"]; @@ -595,9 +595,9 @@ bool LLCPUInfo::hasSSE2() const return mHasSSE2; } -F64 LLCPUInfo::getMhz() const +F64 LLCPUInfo::getMHz() const { - return mCPUMhz; + return mCPUMHz; } std::string LLCPUInfo::getCPUString() const @@ -644,7 +644,7 @@ void LLCPUInfo::stream(std::ostream& s) const s << "->mHasSSE: " << (U32)mHasSSE << std::endl; s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; - s << "->mCPUMhz: " << mCPUMhz << std::endl; + s << "->mCPUMHz: " << mCPUMHz << std::endl; s << "->mCPUString: " << mCPUString << std::endl; } 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: bool hasAltivec() const; bool hasSSE() const; bool hasSSE2() const; - F64 getMhz() const; + F64 getMHz() const; // Family is "AMD Duron" or "Intel Pentium Pro" const std::string& getFamily() const { return mFamily; } @@ -90,7 +90,7 @@ private: bool mHasSSE; bool mHasSSE2; bool mHasAltivec; - F64 mCPUMhz; + F64 mCPUMHz; std::string mFamily; std::string mCPUString; }; 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() minSpecs += "\n"; unsupported = true; } - if(gSysCPU.getMhz() < minCPU) + if(gSysCPU.getMHz() < minCPU) { minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); minSpecs += "\n"; @@ -2468,7 +2468,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); - gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); + gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMHz(); gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); 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() #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? if (gSysCPU.getMhz() < 800) #else - if (gSysCPU.getMhz() < 1100) + if (gSysCPU.getMHz() < 1100) #endif { 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() memset(mBtn, 0, sizeof(mBtn)); // factor in bandwidth? bandwidth = gViewerStats->mKBitStat - mPerfScale = 4000.f / gSysCPU.getMhz(); + mPerfScale = 4000.f / gSysCPU.getMHz(); } // ----------------------------------------------------------------------------- -- cgit v1.1