X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=main.cpp;h=6cf1ddec055275855fd30bcd8824cfd4e0bd1aaf;hb=83f684d3bbb19afbc990b3c290fdfc1877d64ff3;hp=f28b859fd842bdc501d238eccc743bf6667b5545;hpb=d62349fd118e89b16adfc5478c73cd8e10136364;p=nageru diff --git a/main.cpp b/main.cpp index f28b859..6cf1dde 100644 --- a/main.cpp +++ b/main.cpp @@ -19,10 +19,16 @@ extern "C" { int main(int argc, char *argv[]) { - setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0); + parse_flags(argc, argv); + + if (global_flags.va_display.empty() || + global_flags.va_display[0] != '/') { + // We normally use EGL for zerocopy, but if we use VA against DRM + // instead of against X11, we turn it off, and then don't need EGL. + setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0); + } setlinebuf(stdout); av_register_all(); - parse_flags(argc, argv); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QApplication app(argc, argv);