From e431d38a76405c6544f922ac4b039b884d73013a Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 15 Feb 2016 09:35:20 -0800 Subject: [PATCH] Update Specter Print CPU info --- Editor/main.cpp | 19 +++++++++++++++++-- libSpecter | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Editor/main.cpp b/Editor/main.cpp index f1d39fef1..8e43da9cd 100644 --- a/Editor/main.cpp +++ b/Editor/main.cpp @@ -9,6 +9,8 @@ namespace URDE { +LogVisor::LogModule Log{"URDE"}; + struct Application : boo::IApplicationCallback { HECL::Runtime::FileStoreManager m_fileMgr; @@ -24,8 +26,7 @@ struct Application : boo::IApplicationCallback int appMain(boo::IApplication* app) { - Zeus::detectCPU(); - pshag::CElementGen::Initialize(); + initialize(app); m_viewManager.init(app); while (m_running) { @@ -44,6 +45,20 @@ struct Application : boo::IApplicationCallback { } + + void initialize(boo::IApplication* app) + { + Zeus::detectCPU(); + pshag::CElementGen::Initialize(); + + const Zeus::CPUInfo& cpuInf = Zeus::cpuFeatures(); + HECL::SystemString cpuName{reinterpret_cast(cpuInf.cpuBrand)}; + HECL::SystemStringView cpuNameView{cpuName}; + HECL::SystemString cpuVendor{reinterpret_cast(cpuInf.cpuVendor)}; + HECL::SystemStringView cpuVendorView{cpuVendor}; + Log.report(LogVisor::Info, _S("CPU Name: %s"), cpuNameView.sys_str().c_str()); + Log.report(LogVisor::Info, _S("CPU Vendor: %s"), cpuVendorView.sys_str().c_str()); + } }; } diff --git a/libSpecter b/libSpecter index ca6d7ff93..7d9924370 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit ca6d7ff93bb8cf951d47752c0892258330bf5caa +Subproject commit 7d99243703f8a841a97b006d2bd8b28974865649