From 1ecdb8aa2af8c9e24163f211b005e6f436b5d936 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 26 Oct 2021 18:09:56 +0200 Subject: [PATCH] Report device name on Android. --- client/TracyProfiler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 4e952151..0daf6ab4 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -38,6 +38,7 @@ #ifdef __ANDROID__ # include +# include # include # include # include @@ -618,6 +619,13 @@ static const char* GetHostInfo() #else ptr += sprintf( ptr, "CPU: unknown\n" ); #endif +#ifdef __ANDROID__ + char deviceModel[PROP_VALUE_MAX+1]; + char deviceManufacturer[PROP_VALUE_MAX+1]; + __system_property_get( "ro.product.model", deviceModel ); + __system_property_get( "ro.product.manufacturer", deviceManufacturer ); + ptr += sprintf( ptr, "Device: %s %s\n", deviceManufacturer, deviceModel ); +#endif ptr += sprintf( ptr, "CPU cores: %i\n", std::thread::hardware_concurrency() );