mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-12 03:24:00 +00:00
Don't try fallback driver paths with the host libva
This commit is contained in:
@@ -341,14 +341,13 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(APP_IMAGE) || defined(USE_FALLBACK_DRIVER_PATHS)
|
// AppImages may be running with our libva.so which means they don't know about
|
||||||
// AppImages will be running with our libva.so which means they don't know about
|
|
||||||
// distro-specific driver paths. To avoid failing in this scenario, we'll hardcode
|
// distro-specific driver paths. To avoid failing in this scenario, we'll hardcode
|
||||||
// some such paths here for common distros. Non-AppImage packaging mechanisms won't
|
// some such paths here for common distros. Non-AppImage packaging mechanisms won't
|
||||||
// need this fallback because either:
|
// need this fallback because either:
|
||||||
// a) They are using both distro libva.so and distro libva drivers (native packages)
|
// a) They are using both distro libva.so and distro libva drivers (native packages)
|
||||||
// b) They are using both runtime libva.so and runtime libva drivers (Flatpak/Snap)
|
// b) They are using both runtime libva.so and runtime libva drivers (Flatpak/Snap)
|
||||||
if (qEnvironmentVariableIsEmpty("LIBVA_DRIVERS_PATH")) {
|
if (qEnvironmentVariableIsEmpty("LIBVA_DRIVERS_PATH") && qgetenv("VAAPI_USE_FALLBACK_PATHS") == "1") {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Trying fallback VAAPI driver paths");
|
"Trying fallback VAAPI driver paths");
|
||||||
|
|
||||||
@@ -370,7 +369,6 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
setPathVar = true;
|
setPathVar = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (setPathVar) {
|
if (setPathVar) {
|
||||||
// Unset LIBVA_DRIVERS_PATH if we set it ourselves
|
// Unset LIBVA_DRIVERS_PATH if we set it ourselves
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ LIBVA_FALLBACK="$APPDIR/opt/libva-fallback"
|
|||||||
|
|
||||||
if [ -d "$LIBVA_FALLBACK" ] && ! "$LIBVA_FALLBACK/libva-probe" 2>/dev/null; then
|
if [ -d "$LIBVA_FALLBACK" ] && ! "$LIBVA_FALLBACK/libva-probe" 2>/dev/null; then
|
||||||
export LD_LIBRARY_PATH="$LIBVA_FALLBACK${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
export LD_LIBRARY_PATH="$LIBVA_FALLBACK${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||||
|
export VAAPI_USE_FALLBACK_PATHS=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$APPDIR/usr/bin/moonlight" "$@"
|
exec "$APPDIR/usr/bin/moonlight" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user