Skip to content

Commit

Permalink
Fix build on iOS (only iOS 9 and up support thread_local)
Browse files Browse the repository at this point in the history
  • Loading branch information
KentuckyCompass committed Dec 31, 2017
1 parent d565e23 commit 2a3c440
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/native/profiler/profiler.cpp
Expand Up @@ -15,7 +15,12 @@


#define MAX_CATEGORIES 64 // Can be any number, represents max profiled names. #define MAX_CATEGORIES 64 // Can be any number, represents max profiled names.
#define MAX_DEPTH 16 // Can be any number, represents max nesting depth of profiled names. #define MAX_DEPTH 16 // Can be any number, represents max nesting depth of profiled names.
#if PPSSPP_PLATFORM(IOS) && defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0
// iOS did not support C++ thread_local before iOS 9
#define MAX_THREADS 1 // Can be any number, represents concurrent threads calling the profiler.
#else
#define MAX_THREADS 4 // Can be any number, represents concurrent threads calling the profiler. #define MAX_THREADS 4 // Can be any number, represents concurrent threads calling the profiler.
#endif
#define HISTORY_SIZE 128 // Must be power of 2 #define HISTORY_SIZE 128 // Must be power of 2


#ifndef _DEBUG #ifndef _DEBUG
Expand Down

0 comments on commit 2a3c440

Please sign in to comment.