mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix automatic VA DRM driver selection with libva 2.20
This commit is contained in:
@@ -4,16 +4,34 @@
|
||||
|
||||
// Avoid X11 if SDL was built without it
|
||||
#if !defined(SDL_VIDEO_DRIVER_X11) && defined(HAVE_LIBVA_X11)
|
||||
#warning Unable to use libva-x11 without SDL support
|
||||
#warning Unable to use libva-x11 without SDL X11 backend
|
||||
#undef HAVE_LIBVA_X11
|
||||
#endif
|
||||
|
||||
// Avoid Wayland if SDL was built without it
|
||||
#if !defined(SDL_VIDEO_DRIVER_WAYLAND) && defined(HAVE_LIBVA_WAYLAND)
|
||||
#warning Unable to use libva-wayland without SDL support
|
||||
#warning Unable to use libva-wayland without SDL Wayland backend
|
||||
#undef HAVE_LIBVA_WAYLAND
|
||||
#endif
|
||||
|
||||
// Avoid KMSDRM if SDL was built without it
|
||||
#if !defined(SDL_VIDEO_DRIVER_KMSDRM) && defined(HAVE_LIBVA_DRM)
|
||||
#warning Unable to use libva-drm without SDL KMSDRM backend
|
||||
#undef HAVE_LIBVA_DRM
|
||||
#endif
|
||||
|
||||
// Avoid KMSDRM if SDL is too old for FD sharing
|
||||
#if defined(HAVE_LIBVA_DRM) && defined(SDL_VIDEO_DRIVER_KMSDRM) && !SDL_VERSION_ATLEAST(2, 0, 15)
|
||||
#warning Unable to use libva-drm because SDL is not version 2.0.16 or later
|
||||
#undef HAVE_LIBVA_DRM
|
||||
#endif
|
||||
|
||||
// Avoid KMSDRM if built without libdrm
|
||||
#if defined(HAVE_LIBVA_DRM) && !defined(HAVE_DRM)
|
||||
#warning Unable to use libva-drm without libdrm available
|
||||
#undef HAVE_LIBVA_DRM
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
#include "eglimagefactory.h"
|
||||
#endif
|
||||
@@ -89,6 +107,10 @@ private:
|
||||
Window m_XWindow;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBVA_DRM
|
||||
int m_DrmFd;
|
||||
#endif
|
||||
|
||||
int m_VideoWidth;
|
||||
int m_VideoHeight;
|
||||
int m_VideoFormat;
|
||||
|
||||
Reference in New Issue
Block a user