ensure that Mackie Control bank left/right commands always hit the same boundary...
[ardour.git] / libs / pbd / cpus.cc
index 0f73d51027012de4f1fd333a860be2399e886bbc..fb94b475de69735c8990f1f85dc50c619b8929d0 100644 (file)
@@ -28,6 +28,8 @@
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
+#elif defined(PLATFORM_WINDOWS)
+#include <windows.h>
 #endif
 
 #include "pbd/cpus.h"
@@ -48,6 +50,10 @@ hardware_concurrency()
 #elif defined(HAVE_UNISTD) && defined(_SC_NPROCESSORS_ONLN)
         int const count=sysconf(_SC_NPROCESSORS_ONLN);
         return (count>0)?count:0;
+#elif defined(PLATFORM_WINDOWS)
+               SYSTEM_INFO sys_info;
+               GetSystemInfo( &sys_info );
+               return sys_info.dwNumberOfProcessors;
 #else
         return 0;
 #endif