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)
{
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{
pthread_setname_np("Video Fetch");
}
#endif
MacClientSharedObject *sharedData = (MacClientSharedObject *)arg;
[sharedData runFetchLoop];

View File

@ -1142,10 +1142,12 @@ volatile bool execute = true;
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)
{
pthread_setname_np("Emulation Core");
}
#endif
CoreThreadParam *param = (CoreThreadParam *)arg;
CocoaDSCore *cdsCore = (CocoaDSCore *)param->cdsCore;

View File

@ -1314,10 +1314,12 @@
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)
{
pthread_setname_np("EmulationOutput");
}
#endif
CocoaDSOutput *cdsDisplayOutput = (CocoaDSOutput *)arg;
[cdsDisplayOutput runMessageLoop];

View File

@ -1463,10 +1463,12 @@ ClientAVCaptureError FFmpegFileStream::WriteOneFrame(const AVStreamWriteParam &p
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)
{
pthread_setname_np("AVCapture Close");
}
#endif
/*
ClientAVCaptureObject *captureObject = (ClientAVCaptureObject *)arg;

View File

@ -131,10 +131,12 @@
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)
{
pthread_setname_np("Mac File Write");
}
#endif
// Copy the rendering properties from the calling thread.
MacCaptureToolParams *inParams = (MacCaptureToolParams *)arg;

View File

@ -241,10 +241,12 @@
- (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)
{
pthread_setname_np("App Main Thread");
}
#endif
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);
#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.
this->needSetThreadName = (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6) && (name != NULL);
#else