Avoid using window systems that SDL wasn't compiled to support

This commit is contained in:
Cameron Gutman 2018-08-11 20:19:20 -07:00
parent bb18519e44
commit f1ee1eeb63
3 changed files with 12 additions and 3 deletions

View file

@ -44,7 +44,6 @@ macx {
unix:!macx {
CONFIG += link_pkgconfig
PKGCONFIG += openssl sdl2 opus
LIBS += -ldl
packagesExist(libavcodec) {
PKGCONFIG += libavcodec libavutil

View file

@ -1,8 +1,6 @@
#include "vaapi.h"
#include <streaming/streamutils.h>
#include <dlfcn.h>
#include <SDL_syswm.h>
VAAPIRenderer::VAAPIRenderer()

View file

@ -2,6 +2,18 @@
#include "renderer.h"
// Avoid X11 if SDL was built without it
#ifndef SDL_VIDEO_DRIVER_X11
#warning Unable to use libva-x11 without SDL support
#undef HAVE_LIBVA_X11
#endif
// Avoid Wayland if SDL was built without it
#ifndef SDL_VIDEO_DRIVER_WAYLAND
#warning Unable to use libva-wayland without SDL support
#undef HAVE_LIBVA_WAYLAND
#endif
extern "C" {
#include <va/va.h>
#ifdef HAVE_LIBVA_X11