Files
gamescope-session-portprotonqt/usr/bin/portproton-gamescope
2025-07-05 12:19:57 +05:00

30 lines
833 B
Bash
Executable File

#!/usr/bin/env bash
# Source user configuration from ~/.config/environment.d
set -a
for i in "${HOME}"/.config/environment.d/*.conf; do
[[ -f "${i}" ]] && . "${i}"
done
set +a
# Fix intel color corruption
# might come with some performance degradation but is better than a corrupted
# color image
export INTEL_DEBUG=norbc
export mesa_glthread=true
# This should be used by default by gamescope. Cannot hurt to force it anyway.
# Reported better framelimiting with this enabled
export ENABLE_GAMESCOPE_WSI=1
# Some environment variables by default (taken from Deck session)
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
# Add custom vulkan adapter if specified
if [ -n "$VULKAN_ADAPTER" ]; then
GAMESCOPECMD= " --prefer-vk-device $VULKAN_ADAPTER"
fi
# Start client application
gamescope $GAMESCOPECMD -- portprotonqt --fullscreen