From bb15873fbaebab47c02814b359a4dd8f06938f97 Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Mon, 15 Mar 2021 00:19:02 +0100 Subject: [PATCH] Added gpu info for termux. --- uwufetch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uwufetch.c b/uwufetch.c index 0d0480f..2bf4d0d 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -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) {};