mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Don't render with vaPutSurface() on XWayland
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include "vaapi.h"
|
#include "vaapi.h"
|
||||||
|
#include "utils.h"
|
||||||
#include <streaming/streamutils.h>
|
#include <streaming/streamutils.h>
|
||||||
|
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
@@ -286,8 +287,10 @@ bool
|
|||||||
VAAPIRenderer::isDirectRenderingSupported()
|
VAAPIRenderer::isDirectRenderingSupported()
|
||||||
{
|
{
|
||||||
// Many Wayland renderers don't support YUV surfaces, so use
|
// Many Wayland renderers don't support YUV surfaces, so use
|
||||||
// another frontend renderer to draw our frames.
|
// another frontend renderer to draw our frames. The iHD VAAPI
|
||||||
return m_WindowSystem == SDL_SYSWM_X11;
|
// driver can initialize on XWayland but it crashes in vaPutSurface()
|
||||||
|
// so we must also not directly render on XWayland either.
|
||||||
|
return m_WindowSystem == SDL_SYSWM_X11 && !WMUtils::isRunningWayland();
|
||||||
}
|
}
|
||||||
|
|
||||||
int VAAPIRenderer::getDecoderColorspace()
|
int VAAPIRenderer::getDecoderColorspace()
|
||||||
|
|||||||
Reference in New Issue
Block a user