Added gpu info for termux.
This commit is contained in:
parent
81532e5571
commit
bb15873fba
1 changed files with 3 additions and 1 deletions
|
@ -199,7 +199,9 @@ void get_info() { // get all necessary info
|
|||
fclose(meminfo);
|
||||
|
||||
// gpu
|
||||
FILE *gpu = popen("lspci -mm | grep \"VGA\\|00:02\" | cut --fields=4,6 -d '\"' --output-delimiter=\" \" | sed \"s/ Controller.*//\"", "r");
|
||||
FILE *gpu;
|
||||
if (strcmp(version_name, "android") != 0) gpu = popen("lspci -mm | grep \"VGA\\|00:02\" | cut --fields=4,6 -d '\"' --output-delimiter=\" \" | sed \"s/ Controller.*//\"", "r");
|
||||
else gpu = popen("getprop ro.hardware.vulkan", "r");
|
||||
if (gpu) {
|
||||
// Ignore error
|
||||
if(fscanf(gpu, "%[^\n]", gpu_model) == 3) {};
|
||||
|
|
Loading…
Reference in a new issue