Cocoa Port: Fix building for Xcode 3. (Regression from commit 03b9481.)

This commit is contained in:
rogerman 2021-08-30 20:34:42 -07:00
parent 4a9c71b988
commit 3f47c4ad7d
7 changed files with 13 additions and 1 deletions

View File

@ -1769,10 +1769,12 @@ CGLPBufferObj OSXOpenGLRendererPBuffer = NULL;
static void* RunFetchThread(void *arg) static void* RunFetchThread(void *arg)
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("Video Fetch"); pthread_setname_np("Video Fetch");
} }
#endif
MacClientSharedObject *sharedData = (MacClientSharedObject *)arg; MacClientSharedObject *sharedData = (MacClientSharedObject *)arg;
[sharedData runFetchLoop]; [sharedData runFetchLoop];

View File

@ -1142,10 +1142,12 @@ volatile bool execute = true;
static void* RunCoreThread(void *arg) static void* RunCoreThread(void *arg)
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("Emulation Core"); pthread_setname_np("Emulation Core");
} }
#endif
CoreThreadParam *param = (CoreThreadParam *)arg; CoreThreadParam *param = (CoreThreadParam *)arg;
CocoaDSCore *cdsCore = (CocoaDSCore *)param->cdsCore; CocoaDSCore *cdsCore = (CocoaDSCore *)param->cdsCore;

View File

@ -1314,10 +1314,12 @@
static void* RunOutputThread(void *arg) static void* RunOutputThread(void *arg)
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("EmulationOutput"); pthread_setname_np("EmulationOutput");
} }
#endif
CocoaDSOutput *cdsDisplayOutput = (CocoaDSOutput *)arg; CocoaDSOutput *cdsDisplayOutput = (CocoaDSOutput *)arg;
[cdsDisplayOutput runMessageLoop]; [cdsDisplayOutput runMessageLoop];

View File

@ -1463,10 +1463,12 @@ ClientAVCaptureError FFmpegFileStream::WriteOneFrame(const AVStreamWriteParam &p
static void* RunAVCaptureCloseThread(void *arg) static void* RunAVCaptureCloseThread(void *arg)
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("AVCapture Close"); pthread_setname_np("AVCapture Close");
} }
#endif
/* /*
ClientAVCaptureObject *captureObject = (ClientAVCaptureObject *)arg; ClientAVCaptureObject *captureObject = (ClientAVCaptureObject *)arg;

View File

@ -131,10 +131,12 @@
static void* RunFileWriteThread(void *arg) static void* RunFileWriteThread(void *arg)
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("Mac File Write"); pthread_setname_np("Mac File Write");
} }
#endif
// Copy the rendering properties from the calling thread. // Copy the rendering properties from the calling thread.
MacCaptureToolParams *inParams = (MacCaptureToolParams *)arg; MacCaptureToolParams *inParams = (MacCaptureToolParams *)arg;

View File

@ -241,10 +241,12 @@
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{ {
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{ {
pthread_setname_np("App Main Thread"); pthread_setname_np("App Main Thread");
} }
#endif
EmuControllerDelegate *emuControl = (EmuControllerDelegate *)[emuControlController content]; EmuControllerDelegate *emuControl = (EmuControllerDelegate *)[emuControlController content];

View File

@ -133,7 +133,7 @@ void Task::Impl::start(bool spinlock, int threadPriority, const char *name)
sthread_setname(this->_thread, name); sthread_setname(this->_thread, name);
#else #else
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) #if defined(DESMUME_COCOA) && defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
// Setting the thread name on macOS uses pthread_setname_np(), but this requires macOS v10.6 or later. // Setting the thread name on macOS uses pthread_setname_np(), but this requires macOS v10.6 or later.
this->needSetThreadName = (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) && (name != NULL); this->needSetThreadName = (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) && (name != NULL);
#else #else