fix build problems with libmpvwidget
This commit is contained in:
parent
ab4861a64f
commit
683fa898eb
@ -110,15 +110,19 @@ void LibMpvWidget::initializeGL() {
|
||||
mpv_render_param display{MPV_RENDER_PARAM_INVALID, nullptr};
|
||||
|
||||
#if QT_VERSION_MAJOR == 6 && defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID)
|
||||
#if defined(QT_FEATURE_xcb)
|
||||
if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||
display.type = MPV_RENDER_PARAM_X11_DISPLAY;
|
||||
display.data = qApp->nativeInterface<QNativeInterface::QX11Application>()->display();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(QT_FEATURE_wayland)
|
||||
if (QGuiApplication::platformName() == QStringLiteral("wayland")) {
|
||||
display.type = MPV_RENDER_PARAM_WL_DISPLAY;
|
||||
display.data = qApp->nativeInterface<QNativeInterface::QWaylandApplication>()->display();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, const_cast<char*>(MPV_RENDER_API_TYPE_OPENGL)},
|
||||
|
Loading…
x
Reference in New Issue
Block a user