File tree Expand file tree Collapse file tree
src/detection/displayserver/linux Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ static const char* drmConnectLibdrm(FFDisplayServerResult* result) {
231231 return "drmGetDevices() failed" ;
232232 }
233233
234+ int nSuccess = 0 ;
234235 FF_STRBUF_AUTO_DESTROY name = ffStrbufCreate ();
235236
236237 for (int iDev = 0 ; iDev < nDevices ; ++ iDev ) {
@@ -261,6 +262,8 @@ static const char* drmConnectLibdrm(FFDisplayServerResult* result) {
261262 continue ;
262263 }
263264
265+ ++ nSuccess ;
266+
264267 for (int iConn = 0 ; iConn < res -> count_connectors ; ++ iConn ) {
265268 drmModeConnector * conn = ffdrmModeGetConnectorCurrent (primaryFd , res -> connectors [iConn ]);
266269 if (!conn ) {
@@ -415,7 +418,7 @@ static const char* drmConnectLibdrm(FFDisplayServerResult* result) {
415418
416419 ffdrmFreeDevices (devices , nDevices );
417420
418- return NULL ;
421+ return nSuccess > 0 ? NULL : "No DRM devices succeeded to connect" ;
419422}
420423
421424#endif
You can’t perform that action at this time.
0 commit comments