pcsx2/debian_unofficial/patches/44_cpu_count.patch

26 lines
962 B
Diff

Index: pcsx2.snapshot-3208/common/src/x86emitter/LnxCpuDetect.cpp
===================================================================
--- pcsx2.snapshot-3208.orig/common/src/x86emitter/LnxCpuDetect.cpp 2010-06-15 13:10:41.000000000 +0200
+++ pcsx2.snapshot-3208/common/src/x86emitter/LnxCpuDetect.cpp 2010-06-15 13:13:01.552197718 +0200
@@ -16,17 +16,18 @@
#include "PrecompiledHeader.h"
#include "cpudetect_internal.h"
+#include <wx/thread.h>
// Note: Apparently this solution is Linux/Solaris only.
// FreeBSD/OsX need something far more complicated (apparently)
void x86capabilities::CountLogicalCores()
{
- const uint numCPU = sysconf( _SC_NPROCESSORS_ONLN );
+ const uint numCPU = wxThread::GetCPUCount();
if( numCPU > 0 )
{
//isMultiCore = numCPU > 1;
LogicalCores = numCPU;
- PhysicalCores = ( numCPU / LogicalCoresPerPhysicalCPU ) * PhysicalCoresPerPhysicalCPU;
+ PhysicalCores = numCPU / LogicalCoresPerPhysicalCPU;
}
else
{