mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-13 23:17:09 +00:00
Add VAAPI_FORCE_DIRECT and VAAPI_FORCE_INDIRECT env vars to control rendering technique
This commit is contained in:
parent
283f31a734
commit
01f6188824
1 changed files with 11 additions and 0 deletions
|
@ -323,6 +323,17 @@ VAAPIRenderer::needsTestFrame()
|
|||
bool
|
||||
VAAPIRenderer::isDirectRenderingSupported()
|
||||
{
|
||||
if (qgetenv("VAAPI_FORCE_DIRECT") == "1") {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Using direct rendering due to environment variable");
|
||||
return true;
|
||||
}
|
||||
else if (qgetenv("VAAPI_FORCE_INDIRECT") == "1") {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Using indirect rendering due to environment variable");
|
||||
return false;
|
||||
}
|
||||
|
||||
// We only support direct rendering on X11 with VAEntrypointVideoProc support
|
||||
if (m_WindowSystem != SDL_SYSWM_X11 || m_BlacklistedForDirectRendering) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
|
|
Loading…
Reference in a new issue