mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Fix minor issue with usage of STL thread::hardware_concurrency()
This commit is contained in:
parent
11ba6e45ab
commit
d3bc96a201
9 changed files with 24 additions and 13 deletions
|
@ -409,13 +409,18 @@ u64 utils::get_total_memory()
|
|||
|
||||
u32 utils::get_thread_count()
|
||||
{
|
||||
static const u32 g_count = []()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
::SYSTEM_INFO sysInfo;
|
||||
::GetNativeSystemInfo(&sysInfo);
|
||||
return sysInfo.dwNumberOfProcessors;
|
||||
::SYSTEM_INFO sysInfo;
|
||||
::GetNativeSystemInfo(&sysInfo);
|
||||
return sysInfo.dwNumberOfProcessors;
|
||||
#else
|
||||
return ::sysconf(_SC_NPROCESSORS_ONLN);
|
||||
return ::sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
}();
|
||||
|
||||
return g_count;
|
||||
}
|
||||
|
||||
u32 utils::get_cpu_family()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue