mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-23 16:15:02 +00:00
Handle EGL driver returning no supported formats or modifiers for DMA-BUF import
This commit is contained in:
parent
39465f6d8a
commit
517b684f85
1 changed files with 10 additions and 0 deletions
|
@ -443,6 +443,11 @@ bool EglImageFactory::supportsImportingFormat(EGLDisplay dpy, EGLint format)
|
|||
"eglQueryDmaBufFormatsEXT() #1 failed: %d", eglGetError());
|
||||
return false;
|
||||
}
|
||||
else if (numFormats == 0) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"eglQueryDmaBufFormatsEXT() returned no supported formats!");
|
||||
return false;
|
||||
}
|
||||
|
||||
EGLint formats[numFormats];
|
||||
if (!m_eglQueryDmaBufFormatsEXT(dpy, numFormats, formats, &numFormats)) {
|
||||
|
@ -480,6 +485,11 @@ bool EglImageFactory::supportsImportingModifier(EGLDisplay dpy, EGLint format, E
|
|||
"eglQueryDmaBufModifiersEXT() #1 failed: %d", eglGetError());
|
||||
return false;
|
||||
}
|
||||
else if (numModifiers == 0) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"eglQueryDmaBufModifiersEXT() returned no supported modifiers!");
|
||||
return false;
|
||||
}
|
||||
|
||||
EGLuint64KHR modifiers[numModifiers];
|
||||
if (!m_eglQueryDmaBufModifiersEXT(dpy, format, numModifiers, modifiers, nullptr, &numModifiers)) {
|
||||
|
|
Loading…
Reference in a new issue