Added gpu info for termux.

This commit is contained in:
TheDarkBug 2021-03-15 00:19:02 +01:00
parent 81532e5571
commit bb15873fba

View file

@ -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) {};