mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Don't try VDPAU on XWayland by default
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include <streaming/session.h>
|
#include <streaming/session.h>
|
||||||
#include "vdpau.h"
|
#include "vdpau.h"
|
||||||
#include <streaming/streamutils.h>
|
#include <streaming/streamutils.h>
|
||||||
|
#include <utils.h>
|
||||||
|
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
|
|
||||||
@@ -113,6 +114,15 @@ bool VDPAURenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
info.subsystem);
|
info.subsystem);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if (qgetenv("VDPAU_XWAYLAND") != "1" && WMUtils::isRunningWayland()) {
|
||||||
|
// VDPAU initialization causes Moonlight to crash when using XWayland in a Flatpak
|
||||||
|
// on a system with the Nvidia 495.44 driver. VDPAU won't work under XWayland anyway,
|
||||||
|
// so let's not risk trying it (unless the user wants to roll the dice).
|
||||||
|
// https://gitlab.freedesktop.org/vdpau/libvdpau/-/issues/2
|
||||||
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"VDPAU is disabled on XWayland. Set VDPAU_XWAYLAND=1 to try your luck.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_VideoWidth = params->width;
|
m_VideoWidth = params->width;
|
||||||
m_VideoHeight = params->height;
|
m_VideoHeight = params->height;
|
||||||
|
|||||||
Reference in New Issue
Block a user