mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-21 18:13:14 +02:00
Compare commits
5 commits
ca9ef19bd9
...
8f8ee658bf
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8f8ee658bf | ||
![]() |
f77fe4a6b2 | ||
![]() |
42518f2304 | ||
![]() |
4e61c3369b | ||
![]() |
13c4aca5ac |
2 changed files with 41 additions and 4 deletions
7
.github/workflows/canary.yml
vendored
7
.github/workflows/canary.yml
vendored
|
@ -36,6 +36,7 @@ jobs:
|
|||
run: |
|
||||
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
||||
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
|
||||
echo "git_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Create release
|
||||
|
@ -56,7 +57,7 @@ jobs:
|
|||
| Linux ARM 64-bit | [Canary Linux ARM Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_arm64.tar.gz) |
|
||||
| macOS | [Canary macOS Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-macos_universal.app.tar.gz) |
|
||||
|
||||
**[Full Changelog](https://git.ryujinx.app/ryubing/ryujinx/-/commit/${{github.sha}})**
|
||||
**[Full Changelog](https://git.ryujinx.app/ryubing/ryujinx/-/commit/${{ steps.version_info.outputs.git_hash }})**
|
||||
omitBodyDuringUpdate: true
|
||||
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
||||
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
||||
|
@ -88,7 +89,7 @@ jobs:
|
|||
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
||||
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
|
||||
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
||||
echo "git_hash=$(git rev-parse "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
||||
echo "git_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Configure for release
|
||||
|
@ -185,7 +186,7 @@ jobs:
|
|||
| Linux ARM 64-bit | [Canary Linux ARM Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_arm64.tar.gz) |
|
||||
| macOS | [Canary macOS Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-macos_universal.app.tar.gz) |
|
||||
|
||||
**[Full Changelog](https://git.ryujinx.app/ryubing/ryujinx/-/commit/${{github.sha}})**
|
||||
**[Full Changelog](https://git.ryujinx.app/ryubing/ryujinx/-/commit/${{ steps.version_info.outputs.git_hash }})**
|
||||
omitBodyDuringUpdate: true
|
||||
allowUpdates: true
|
||||
replacesArtifacts: true
|
||||
|
|
|
@ -20,4 +20,40 @@ if command -v gamemoderun > /dev/null 2>&1; then
|
|||
COMMAND="$COMMAND gamemoderun"
|
||||
fi
|
||||
|
||||
# Check if user already has a manual Avalonia scaling override or session type is x11.
|
||||
if [ -n "${AVALONIA_GLOBAL_SCALE_FACTOR-}" ] || [ "$XDG_SESSION_TYPE" = "x11" ]; then
|
||||
echo "Scaling: Performed by environment, skipping." >&2
|
||||
else
|
||||
# Query monitor config directly (GNOME), default display only.
|
||||
if [[ "$(echo "$XDG_CURRENT_DESKTOP")" == "GNOME" && -f ~/.config/monitors.xml ]] then
|
||||
echo -n 'Scaling: Monitor config located, querying scale...' >&2
|
||||
SCALING="$(grep '<scale' ~/.config/monitors.xml -m 1 | cut -f2 -d">"|cut -f1 -d"<")"
|
||||
SCALING="${SCALING##* }"
|
||||
echo "found! Factor: ${SCALING}" >&2
|
||||
|
||||
# Fallback to X DPI query for others.
|
||||
# Plasma handles this fine, GNOME will always round up e.g. 1.25 -> 2.00.
|
||||
elif command -v xrdb >/dev/null; then
|
||||
echo -n 'Scaling: Attempting to get scaling from X DPI value...' >&2
|
||||
dpi="$(xrdb -get Xft.dpi)"
|
||||
if [[ -n "${dpi}" ]]; then
|
||||
SCALING=$(awk -vdpi="$dpi" 'BEGIN{print dpi/96}')
|
||||
fi
|
||||
echo "found! Factor: ${SCALING}"
|
||||
|
||||
# Query kscreen-doctor for Plasma as a fallback.
|
||||
elif [[ "$(echo "$XDG_CURRENT_DESKTOP")" == "KDE" ]] && command -v kscreen-doctor >/dev/null; then
|
||||
# gsub strips ANSI color codes from ksd output
|
||||
SCALING=$(kscreen-doctor --outputs | awk '/Scale:/{gsub(/\x1b\[[0-9;]*m/,""); print $2; exit}')
|
||||
echo "found! Factor: ${SCALING}"
|
||||
fi
|
||||
|
||||
if [[ -z "${SCALING-}" || "${SCALING-}" == "0" ]]; then
|
||||
echo 'Unset invalid scaling value' >&2
|
||||
SCALING="1"
|
||||
fi
|
||||
|
||||
COMMAND="$COMMAND AVALONIA_GLOBAL_SCALE_FACTOR=$SCALING"
|
||||
fi
|
||||
|
||||
exec $COMMAND "$SCRIPT_DIR/$RYUJINX_BIN" "$@"
|
Loading…
Add table
Reference in a new issue