Use the same X display name for VDPAU that SDL is using

This commit is contained in:
Cameron Gutman
2025-11-23 13:20:36 -06:00
parent f57257cbfd
commit 01288be937

View File

@@ -135,9 +135,15 @@ bool VDPAURenderer::initialize(PDECODER_PARAMETERS params)
m_VideoWidth = params->width;
m_VideoHeight = params->height;
char* displayName = nullptr;
#ifdef HAS_X11
SDL_assert(info.subsystem == SDL_SYSWM_X11);
displayName = XDisplayString(info.info.x11.display);
#endif
err = av_hwdevice_ctx_create(&m_HwContext,
AV_HWDEVICE_TYPE_VDPAU,
nullptr, nullptr, 0);
displayName, nullptr, 0);
#if defined(APP_IMAGE) || defined(USE_FALLBACK_DRIVER_PATHS)
// AppImages will be running with our libvdpau.so which means they don't know about