fix-win32-scheduler-uwp.patch 1.1 KB

123456789101112131415161718192021222324
  1. diff --git a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
  2. index 922e449cce..5862264a67 100644
  3. --- a/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
  4. +++ b/thirdparty/bullet/LinearMath/TaskScheduler/btThreadSupportWin32.cpp
  5. @@ -82,6 +82,11 @@ typedef BOOL(WINAPI* Pfn_GetLogicalProcessorInformation)(PSYSTEM_LOGICAL_PROCESS
  6. void getProcessorInformation(btProcessorInfo* procInfo)
  7. {
  8. memset(procInfo, 0, sizeof(*procInfo));
  9. +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
  10. + !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  11. + // Can't dlopen libraries on UWP.
  12. + return;
  13. +#else
  14. Pfn_GetLogicalProcessorInformation getLogicalProcInfo =
  15. (Pfn_GetLogicalProcessorInformation)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation");
  16. if (getLogicalProcInfo == NULL)
  17. @@ -160,6 +165,7 @@ void getProcessorInformation(btProcessorInfo* procInfo)
  18. }
  19. }
  20. free(buf);
  21. +#endif
  22. }
  23. ///btThreadSupportWin32 helps to initialize/shutdown libspe2, start/stop SPU tasks and communication