Display (Linux): reads EDID from the correct sysfs path
This commit is contained in:
1 parent
dc5e708b47
commit
de5fb51ba7
1 file changed
+3
-3
@@ -48,9 +48,6 @@ static const char* drmParseSysfs(FFDisplayServerResult* result) {
|
||||
double preferredRefreshRate = 0;
|
||||
FF_STRBUF_AUTO_DESTROY name = ffStrbufCreate();
|
||||
|
||||
ffStrbufSubstrBefore(&drmDir, drmDirWithDnameLength);
|
||||
ffStrbufAppendS(&drmDir, "/edid");
|
||||
|
||||
const char* plainName = entry->d_name;
|
||||
if (ffStrStartsWith(plainName, "card")) {
|
||||
const char* tmp = strchr(plainName + strlen("card"), '-');
|
||||
@@ -69,6 +66,9 @@ static const char* drmParseSysfs(FFDisplayServerResult* result) {
|
||||
ffStrbufAppendS(&name, plainName);
|
||||
}
|
||||
|
||||
ffStrbufSubstrBefore(&drmDir, drmDirWithDnameLength);
|
||||
ffStrbufAppendS(&drmDir, "/edid");
|
||||
|
||||
uint8_t edidData[1024];
|
||||
ssize_t edidLength = ffReadFileData(drmDir.chars, ARRAY_SIZE(edidData), edidData);
|
||||
if (edidLength > 0 && ffEdidIsValid(edidData, (uint32_t) edidLength)) {
|
||||
|
||||
Reference in new issue
Block a user