Skip to content

Commit bf5ed0d

Browse files
committed
Small refactoring and cleaup in xrCore.
1 parent f4b6566 commit bf5ed0d

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

src/xrCore/_math.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,17 @@ u64 __fastcall GetCLK(void)
108108
}
109109
#endif
110110

111-
void Detect()
112-
{
113-
// General CPU identification
114-
if (!query_processor_info(&ID))
115-
{
116-
// Core.Fatal ("Fatal error: can't detect CPU/FPU.");
117-
abort();
118-
}
119-
}
120-
121111
} // namespace CPU
122112

123113
bool g_initialize_cpu_called = false;
124114

125115
//------------------------------------------------------------------------------------
126116
void _initialize_cpu()
127117
{
118+
// General CPU identification
119+
if (!query_processor_info(&CPU::ID))
120+
FATAL("Can't detect CPU/FPU.");
121+
128122
Msg("* Detected CPU: %s [%s], F%d/M%d/S%d, 'rdtsc'", CPU::ID.modelName,
129123
+CPU::ID.vendor, CPU::ID.family, CPU::ID.model, CPU::ID.stepping);
130124

src/xrCore/xrCore.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,10 @@
1212

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

15-
#ifdef DEBUG
16-
#include <malloc.h>
17-
#endif // DEBUG
18-
1915
XRCORE_API xrCore Core;
2016

21-
namespace CPU
22-
{
23-
extern void Detect();
24-
}
25-
2617
static u32 init_counter = 0;
2718

28-
//. extern xr_vector<shared_str>* LogFile;
29-
3019
void xrCore::Initialize(pcstr _ApplicationName, LogCallback cb, bool init_fs, pcstr fs_fname, bool plugin)
3120
{
3221
CalculateBuildId();
@@ -66,9 +55,6 @@ void xrCore::Initialize(pcstr _ApplicationName, LogCallback cb, bool init_fs, pc
6655
DWORD sz_comp = sizeof(CompName);
6756
GetComputerName(CompName, &sz_comp);
6857

69-
// Mathematics & PSI detection
70-
CPU::Detect();
71-
7258
Memory._initialize();
7359

7460
InitLog();

0 commit comments

Comments
 (0)