From e15cafc78b80ca281f9460d533af0c94e56cc990 Mon Sep 17 00:00:00 2001 From: 諏訪子 Date: Wed, 19 Jun 2024 16:50:15 +0900 Subject: Linux: サーバでもGPU情報を表示する様に MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gpu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/gpu.c b/src/gpu.c index 76a43e8..df75cdf 100644 --- a/src/gpu.c +++ b/src/gpu.c @@ -49,6 +49,9 @@ const char *display_gpu() { "grep -F \"device\" | sed 's/^.* device//' | " "sed \"s/^.* '//\" | sed \"s/'//\" | tail -1 | " "sed 's/ Core Processor Integrated Graphics Controller//'"); +#elif defined(__linux__) + return run_gpu_command("lspci | grep VGA | sed 's/^.*: //' | " + "sed 's/Corporation //' | sed 's/ (.*$//'"); #else if ( access("/bin/glxinfo", F_OK) == -1 && -- cgit v1.3