Compare commits

...

2 Commits

Author SHA1 Message Date
WilliamWsyHK
a9e4991727 Merge branch 'features/ava-dpi' into 'master'
Enabling screen scaling in Linux DE with AVALONIA_GLOBAL_SCALE_FACTOR

See merge request [ryubing/ryujinx!131](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/131)
2025-08-30 20:45:50 -05:00
WilliamWsyHK
5645381211 Enabling screen scaling in Linux DE with AVALONIA_GLOBAL_SCALE_FACTOR 2025-08-31 08:45:21 +08:00

View File

@ -16,6 +16,18 @@ fi
COMMAND="env LANG=C.UTF-8 DOTNET_EnableAlternateStackCheck=1"
XFT_DPI=$(xrdb -get Xft.dpi 2> /dev/null)
if [ -z "$XFT_DPI" ]; then
XFT_DPI=96
fi
AVALONIA_GLOBAL_SCALE_FACTOR=$(echo "scale=2; $XFT_DPI/96" | bc)
if [ -n "$AVALONIA_GLOBAL_SCALE_FACTOR" ]; then
COMMAND="$COMMAND AVALONIA_GLOBAL_SCALE_FACTOR=$AVALONIA_GLOBAL_SCALE_FACTOR"
fi
if command -v gamemoderun > /dev/null 2>&1; then
COMMAND="$COMMAND gamemoderun"
fi