1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

iOS device name decoding.

This commit is contained in:
Bartosz Taudul
2019-06-19 09:59:46 +02:00
parent 59b4f84ce5
commit 5bfc62f1bf
2 changed files with 117 additions and 0 deletions
+9
View File
@@ -466,6 +466,15 @@ static const char* GetHostInfo()
{
ptr += sprintf( ptr, "CPU: unknown\n" );
}
#elif defined __APPLE__ && TARGET_OS_IPHONE == 1
{
size_t sz;
sysctlbyname( "hw.machine", nullptr, &sz, nullptr, 0 );
auto str = (char*)tracy_malloc( sz );
sysctlbyname( "hw.machine", str, &sz, nullptr, 0 );
ptr += sprintf( ptr, "Device: %s\n", DecodeIosDevice( str ) );
tracy_free( str );
}
#else
ptr += sprintf( ptr, "CPU: unknown\n" );
#endif