GPU (Linux): trim trailing new line

Fix #1303
This commit is contained in:
李通洲
2024-09-29 23:08:41 +08:00
parent 70e8398f05
commit d97999ddc9
+3
View File
@@ -657,7 +657,10 @@ static const char* detectOf(FFlist* gpus, FFstrbuf* buffer, FFstrbuf* drmDir, co
#endif
if (!gpu->name.length)
{
ffStrbufSetS(&gpu->name, name ? name : compatible);
ffStrbufTrimRightSpace(&gpu->name);
}
if (!gpu->vendor.length && name)
{
compatible[0] = (char) toupper(compatible[0]);