1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-08 01:51:34 +08:00
This commit is contained in:
源文雨
2026-03-27 00:10:13 +08:00
parent 3655795413
commit 07f4270ed8
4 changed files with 8 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"fmt"
"strings"
"github.com/fumiama/gozel/ze"
)
@@ -17,7 +18,8 @@ func main() {
devs, _ := gpus[0].DeviceGet()
for _, d := range devs {
prop, _ := d.DeviceGetProperties()
fmt.Printf(" Device: %s\n", string(prop.Name[:]))
name, _, _ := strings.Cut(string(prop.Name[:]), "\x00")
fmt.Printf(" Device: %s\n", name)
}
// Found 1 GPU driver(s)