浏览代码

added comments

XXTH 2 年之前
父节点
当前提交
4a0c4a69f0
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      Engine/source/platformSDL/sdlCPUInfo.cpp

+ 6 - 4
Engine/source/platformSDL/sdlCPUInfo.cpp

@@ -19,7 +19,10 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
-// XXTH used for FreeBSD, SDL_cpuinfo dont tell me the cpu name
+// XXTH used for FreeBSD
+// Note: SDL_cpuinfo have not all information, but better than using
+//       "sysctl hw"
+//
 //-----------------------------------------------------------------------------
 #if defined( __FreeBSD__ )
 #include "SDL.h"
@@ -35,13 +38,12 @@ Platform::SystemInfo_struct Platform::SystemInfo;
 void Processor::init()
 {
 
-   //sdl dont have logical/physical CPU count so ... time to guess
-   //modern CPU usually should have isHyperThreaded
    S32 lCpuCount = SDL_GetCPUCount();
    Platform::SystemInfo.processor.numLogicalProcessors    = lCpuCount;
+   //sdl dont have logical/physical CPU count so ... time to guess
    Platform::SystemInfo.processor.numPhysicalProcessors   = 1; // :/ lCpuCount;
    Platform::SystemInfo.processor.isMultiCore = lCpuCount > 1;
-   //since logical and physical is equal set to false mhh better true
+   //modern CPU should have isHyperThreaded
    Platform::SystemInfo.processor.isHyperThreaded = true;
 
    //hackfest