From a0f3649c1abe7b831f083366e2fd91206bf23091 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Sat, 10 Dec 2011 16:54:41 +0000 Subject: (svn r23481) -Add: Function to get the CPU core count. --- src/os/windows/win32.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/os/windows/win32.cpp') diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 39203cbca..6c7a3ec68 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -753,3 +753,11 @@ const char *GetCurrentLocale(const char *) static char retbuf[6] = {lang[0], lang[1], '_', country[0], country[1], 0}; return retbuf; } + +uint GetCPUCoreCount() +{ + SYSTEM_INFO info; + + GetSystemInfo(&info); + return info.dwNumberOfProcessors; +} -- cgit v1.2.3-54-g00ecf