mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Report device name on Android.
This commit is contained in:
parent
1cbd6950cf
commit
1ecdb8aa2a
@ -38,6 +38,7 @@
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# include <sys/mman.h>
|
||||
# include <sys/system_properties.h>
|
||||
# include <stdio.h>
|
||||
# include <stdint.h>
|
||||
# include <algorithm>
|
||||
@ -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() );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user