Skip to content

Commit

Permalink
Small refactoring and cleaup in xrCore.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Mar 24, 2018
1 parent f4b6566 commit bf5ed0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
14 changes: 4 additions & 10 deletions src/xrCore/_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,17 @@ u64 __fastcall GetCLK(void)
}
#endif

void Detect()
{
// General CPU identification
if (!query_processor_info(&ID))
{
// Core.Fatal ("Fatal error: can't detect CPU/FPU.");
abort();
}
}

} // namespace CPU

bool g_initialize_cpu_called = false;

//------------------------------------------------------------------------------------
void _initialize_cpu()
{
// General CPU identification
if (!query_processor_info(&CPU::ID))
FATAL("Can't detect CPU/FPU.");

Msg("* Detected CPU: %s [%s], F%d/M%d/S%d, 'rdtsc'", CPU::ID.modelName,
+CPU::ID.vendor, CPU::ID.family, CPU::ID.model, CPU::ID.stepping);

Expand Down
14 changes: 0 additions & 14 deletions src/xrCore/xrCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@

#pragma comment(lib, "winmm.lib")

#ifdef DEBUG
#include <malloc.h>
#endif // DEBUG

XRCORE_API xrCore Core;

namespace CPU
{
extern void Detect();
}

static u32 init_counter = 0;

//. extern xr_vector<shared_str>* LogFile;

void xrCore::Initialize(pcstr _ApplicationName, LogCallback cb, bool init_fs, pcstr fs_fname, bool plugin)
{
CalculateBuildId();
Expand Down Expand Up @@ -66,9 +55,6 @@ void xrCore::Initialize(pcstr _ApplicationName, LogCallback cb, bool init_fs, pc
DWORD sz_comp = sizeof(CompName);
GetComputerName(CompName, &sz_comp);

// Mathematics & PSI detection
CPU::Detect();

Memory._initialize();

InitLog();
Expand Down

0 comments on commit bf5ed0d

Please sign in to comment.