Merge pull request #499 from Azaezel/alpha40/macwork

mac compilation and standarization fixes
This commit is contained in:
Brian Roberts 2021-07-05 17:56:22 -05:00 committed by GitHub
commit 18a7e31991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 12 deletions

View file

@ -129,17 +129,15 @@ void tc_sleep(NxU32 ms)
void tc_spinloop() void tc_spinloop()
{ {
#ifdef __linux__ #if defined( _XBOX )
asm ( "pause" ); // Pause would do nothing on the Xbox. Threads are not scheduled.
#elif defined( _XBOX ) #elif defined( _WIN64 )
// Pause would do nothing on the Xbox. Threads are not scheduled. YieldProcessor( );
#elif defined( _WIN64 ) #elif defined( __APPLE__ )||(__linux__)
YieldProcessor( ); pthread_yield_np();
#elif (defined( __arm64__ ) && defined( __APPLE__ )) || defined( __arch64__ ) #else
pthread_yield_np(); __asm { pause };
#else #endif
__asm { pause };
#endif
} }
void tc_interlockedExchange(void *dest, const int64_t exchange) void tc_interlockedExchange(void *dest, const int64_t exchange)

View file

@ -97,7 +97,7 @@ const char* Platform::getUserDataDirectory()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
const char* Platform::getUserHomeDirectory() const char* Platform::getUserHomeDirectory()
{ {
return StringTable->insert([[@"~/" stringByStandardizingPath] UTF8String]); return StringTable->insert([[@"~/Documents" stringByStandardizingPath] UTF8String]);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------