mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
Compare commits
161
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4de28717f1 | ||
|
|
de104f64a2 | ||
|
|
74a6a88df8 | ||
|
|
c9493993af | ||
|
|
dc08385411 | ||
|
|
49b6a0739d | ||
|
|
8471682b1c | ||
|
|
4dda1c1e52 | ||
|
|
8156a9649d | ||
|
|
7b518d7e6a | ||
|
|
8d66570d33 | ||
|
|
5a56d9f785 | ||
|
|
77e23cb397 | ||
|
|
1883a8c7cf | ||
|
|
aefd8a3b60 | ||
|
|
fee8ce91f3 | ||
|
|
bcb18e3fb7 | ||
|
|
6855dd4467 | ||
|
|
a66d7d74a4 | ||
|
|
2bd279a0f3 | ||
|
|
0790cb4390 | ||
|
|
ad6d8d824a | ||
|
|
0b671b2144 | ||
|
|
31cead9b32 | ||
|
|
26c3dcc885 | ||
|
|
dc57f367e1 | ||
|
|
5838587639 | ||
|
|
7e87cdacb5 | ||
|
|
dbcbf0b6fa | ||
|
|
476642be71 | ||
|
|
8c86b718a0 | ||
|
|
473ac666b3 | ||
|
|
cc0a4f5aa9 | ||
|
|
f89dc04072 | ||
|
|
dd79f44b3a | ||
|
|
b0e405ebf3 | ||
|
|
42026b382f | ||
|
|
8209a707f4 | ||
|
|
46cd8e1777 | ||
|
|
6e1621fe53 | ||
|
|
546574e982 | ||
|
|
b1ab55856e | ||
|
|
4a0eb14d1f | ||
|
|
2c8ae3753c | ||
|
|
fcfbb74068 | ||
|
|
0340be5a7d | ||
|
|
132f40ac97 | ||
|
|
5981bbb1e2 | ||
|
|
7419ba114f | ||
|
|
96e2bf992d | ||
|
|
ad9eb8eb29 | ||
|
|
116d0e4f1a | ||
|
|
4a57c6f6f1 | ||
|
|
2d9d4dbeb0 | ||
|
|
866551e797 | ||
|
|
a0c6545e77 | ||
|
|
c7bcd82782 | ||
|
|
caaf6b3a01 | ||
|
|
8123d5b361 | ||
|
|
2b4bba63c5 | ||
|
|
69b2b8fcdf | ||
|
|
0d8b5a7cf2 | ||
|
|
7261b26264 | ||
|
|
db9aae7b87 | ||
|
|
70b8ec5de4 | ||
|
|
94b530ecb2 | ||
|
|
906e0d1f7d | ||
|
|
992912fdf8 | ||
|
|
4ff4be2371 | ||
|
|
61482ffee7 | ||
|
|
1deae2fa5b | ||
|
|
c95e114766 | ||
|
|
7eb4717d4c | ||
|
|
0c26a829ec | ||
|
|
9010d275ab | ||
|
|
92ef850999 | ||
|
|
64b94f7cdb | ||
|
|
06946fe8ae | ||
|
|
36dc4014b7 | ||
|
|
3e85e4a614 | ||
|
|
a4abb797a7 | ||
|
|
b6ca673d6e | ||
|
|
6378c3f3d2 | ||
|
|
f909c7a69c | ||
|
|
2d59f03e7b | ||
|
|
9835c4e3e1 | ||
|
|
a7d6279ee3 | ||
|
|
5a806b35f1 | ||
|
|
8f0bd51fd8 | ||
|
|
6cc289f7d3 | ||
|
|
9c66a1ac0a | ||
|
|
556bd96d5a | ||
|
|
4d86839910 | ||
|
|
3d9d90d832 | ||
|
|
9438aac0db | ||
|
|
5d1e70cd20 | ||
|
|
d32b1a13fd | ||
|
|
d7bf0b274f | ||
|
|
d111b2b3dd | ||
|
|
293e84a64c | ||
|
|
16bedf3635 | ||
|
|
e06b942e67 | ||
|
|
2e1156038e | ||
|
|
dccd5a7c69 | ||
|
|
fc768a3c45 | ||
|
|
a4447039b9 | ||
|
|
8355c1495b | ||
|
|
fcf4c09c50 | ||
|
|
74d5daaa5d | ||
|
|
7c51e6e904 | ||
|
|
b76f13f7ac | ||
|
|
f88227ed74 | ||
|
|
f683ca1dea | ||
|
|
6b6d7d2ac7 | ||
|
|
77dd04ec8c | ||
|
|
70eec3cc32 | ||
|
|
2eb18f5540 | ||
|
|
7aeb7779bb | ||
|
|
53c63b6dc2 | ||
|
|
b88eebe09b | ||
|
|
5f341dda16 | ||
|
|
5a1819a713 | ||
|
|
6b010baa9e | ||
|
|
c7961bdacf | ||
|
|
f7acb7fcd7 | ||
|
|
bf4aa58c68 | ||
|
|
747c6eca87 | ||
|
|
4bcd4e3cca | ||
|
|
a25081df7c | ||
|
|
8ebba02688 | ||
|
|
4cbda4e51b | ||
|
|
b7bf189166 | ||
|
|
f3b5cadb7b | ||
|
|
ac0909eaa3 | ||
|
|
789209ec37 | ||
|
|
ffa40a15d5 | ||
|
|
0127fa24aa | ||
|
|
449dc301bd | ||
|
|
663da2948c | ||
|
|
22eac0831d | ||
|
|
d9c03369a2 | ||
|
|
39b5b3cdcd | ||
|
|
958446ab7c | ||
|
|
bde9ca733f | ||
|
|
848f13d6a4 | ||
|
|
495ff952d2 | ||
|
|
0819aa725d | ||
|
|
430e77178e | ||
|
|
9c1cacd8f4 | ||
|
|
3b1dfadcf9 | ||
|
|
c8cc17bf3a | ||
|
|
cb153ece87 | ||
|
|
7432a4f1a3 | ||
|
|
0247831c7e | ||
|
|
1eb1e154ab | ||
|
|
3f2aea4d08 | ||
|
|
6d105c1649 | ||
|
|
11bd604dfd | ||
|
|
b834a92244 | ||
|
|
0cd7f07725 | ||
|
|
342d2e7f20 |
No files matched your search
@@ -23,7 +23,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Build APK
|
||||
name: Validate source and build result
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
|
||||
+312
-459
@@ -16,26 +16,29 @@ on:
|
||||
- 'LICENSE'
|
||||
- '.gitignore'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
rebuild_preloads:
|
||||
description: Rebuild preloads instead of reusing the approved binary snapshot
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
PRELOAD_CACHE_VERSION: v6
|
||||
|
||||
jobs:
|
||||
xbox:
|
||||
name: Xbox ARM64 backend
|
||||
source:
|
||||
name: Pin source tree
|
||||
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
base-sha: ${{ steps.merge.outputs.base-sha }}
|
||||
base-sha: ${{ steps.merge.outputs.base-sha || steps.trusted.outputs.base-sha }}
|
||||
tree-sha: ${{ steps.source.outputs.tree-sha }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -53,9 +56,46 @@ jobs:
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@users.noreply.github.com"
|
||||
git merge --no-ff --no-edit origin/main
|
||||
- name: Record backend source tree
|
||||
- name: Resolve trusted manifest base
|
||||
id: trusted
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --no-tags origin main
|
||||
echo "base-sha=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
|
||||
- name: Record pinned source tree
|
||||
id: source
|
||||
run: echo "tree-sha=$(git rev-parse 'HEAD^{tree}')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
xbox:
|
||||
name: Xbox ARM64 backend
|
||||
needs: source
|
||||
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Merge the pinned APK base
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
BUILD_BASE_SHA: ${{ needs.source.outputs.base-sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --no-tags origin "$BUILD_BASE_SHA"
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@users.noreply.github.com"
|
||||
git merge --no-ff --no-edit FETCH_HEAD
|
||||
- name: Verify pinned source tree
|
||||
env:
|
||||
SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
|
||||
run: test "$(git rev-parse 'HEAD^{tree}')" = "$SOURCE_TREE"
|
||||
- name: Plan component identities
|
||||
id: plan
|
||||
run: python3 tools/components/prepare.py plan
|
||||
- uses: actions/cache@v4
|
||||
id: xbox-cache
|
||||
with:
|
||||
@@ -63,14 +103,10 @@ jobs:
|
||||
app/src/main/assets/linuxfs/usr/local/lib/droiddeck-xbox
|
||||
app/build/xbox/xodus-droiddeck-source.tar.xz
|
||||
app/build/xbox/runtime/*-source.tar.xz
|
||||
key: xbox-arm64-${{ hashFiles('tools/xbox/**') }}
|
||||
key: xbox-v2-${{ steps.plan.outputs.xbox }}
|
||||
- name: Build Xbox backend
|
||||
if: steps.xbox-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
rustup toolchain install 1.99.0 --profile minimal
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y build-essential pkg-config libssl-dev protobuf-compiler cmake xz-utils
|
||||
bash tools/xbox/build.sh
|
||||
run: python3 tools/components/prepare.py xbox
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: xbox-arm64
|
||||
@@ -85,9 +121,158 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
components:
|
||||
name: Prepare verified components
|
||||
needs: source
|
||||
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Merge the pinned APK base
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
BUILD_BASE_SHA: ${{ needs.source.outputs.base-sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --no-tags origin "$BUILD_BASE_SHA"
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@users.noreply.github.com"
|
||||
git merge --no-ff --no-edit FETCH_HEAD
|
||||
- name: Verify pinned source tree
|
||||
env:
|
||||
SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
|
||||
run: test "$(git rev-parse 'HEAD^{tree}')" = "$SOURCE_TREE"
|
||||
- name: Resolve the pinned Android NDK
|
||||
run: bash tools/ci/resolve-ndk.sh
|
||||
|
||||
- name: Plan component identities
|
||||
id: plan
|
||||
run: python3 tools/components/prepare.py plan
|
||||
- name: Cache remaining Linux runtime assets
|
||||
id: preloads
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
app/src/main/assets/linuxfs
|
||||
!app/src/main/assets/linuxfs/usr/local/lib/droiddeck-comet
|
||||
!app/src/main/assets/linuxfs/usr/local/lib/droiddeck-xbox
|
||||
!app/src/main/assets/linuxfs/i386/libblsession.so
|
||||
!app/src/main/assets/linuxfs/i386/libfakeinput.so
|
||||
!app/src/main/assets/linuxfs/i386/libfaultreport.so
|
||||
!app/src/main/assets/linuxfs/libblaudit.so
|
||||
!app/src/main/assets/linuxfs/libblfastpath.so
|
||||
!app/src/main/assets/linuxfs/libblsession.so
|
||||
!app/src/main/assets/linuxfs/libfakeinput.so
|
||||
!app/src/main/assets/linuxfs/libssbs.so
|
||||
!app/src/main/assets/linuxfs/usr/local/bin/droiddeck-clipboard
|
||||
!app/src/main/assets/linuxfs/x86_64/libblsession.so
|
||||
!app/src/main/assets/linuxfs/x86_64/libfakeinput.so
|
||||
!app/src/main/assets/linuxfs/x86_64/libfaultreport.so
|
||||
!app/src/main/assets/linuxfs/x86_64/libvulkan-thunk.so
|
||||
!app/src/main/assets/linuxfs/x86_64/libwebkitinput.so
|
||||
key: runtime-v9-${{ steps.plan.outputs.runtime }}
|
||||
|
||||
- name: Cache PulseAudio 13.0 source
|
||||
id: pa-src
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: pa13
|
||||
key: pulseaudio-src-${{ steps.plan.outputs.pulseaudio-source }}
|
||||
- name: Cache proot
|
||||
id: proot
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
app/src/main/jniLibs/arm64-v8a/libproot.so
|
||||
app/src/main/jniLibs/arm64-v8a/libproot-loader.so
|
||||
key: proot-v2-${{ steps.plan.outputs.proot }}
|
||||
- name: Cache GOG Galaxy companion
|
||||
id: comet
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-comet
|
||||
key: comet-v2-${{ steps.plan.outputs.comet }}
|
||||
|
||||
- name: Restore verified preload snapshots
|
||||
id: component-preloads
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
FORCE_PRELOAD_REBUILD: ${{ inputs.rebuild_preloads || 'false' }}
|
||||
COMPONENT_TRUSTED_BASE: ${{ needs.source.outputs.base-sha }}
|
||||
run: python3 tools/components/prepare.py preload-snapshot
|
||||
|
||||
- name: Prepare required Linux build tools once
|
||||
env:
|
||||
COMPONENTS_TO_BUILD: >-
|
||||
${{ steps.preloads.outputs.cache-hit != 'true' && 'runtime' || '' }}
|
||||
${{ steps.component-preloads.outputs.arm64 != 'true' && 'arm64-preloads' || '' }}
|
||||
${{ steps.comet.outputs.cache-hit != 'true' && 'comet' || '' }}
|
||||
run: python3 tools/components/prepare.py tools
|
||||
|
||||
- name: Build changed ARM64 preloads
|
||||
if: steps.component-preloads.outputs.arm64 != 'true'
|
||||
run: python3 tools/components/prepare.py arm64-preloads
|
||||
|
||||
- name: Prepare remaining Linux runtime assets
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
run: python3 tools/components/prepare.py runtime
|
||||
|
||||
- name: Fetch the Debian image the preloads build in
|
||||
if: steps.component-preloads.outputs.x86 != 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: python3 tools/components/prepare.py debian-image
|
||||
|
||||
- name: Build the x86 preloads FEX guests load (glibc 2.31)
|
||||
if: steps.component-preloads.outputs.x86 != 'true'
|
||||
run: python3 tools/components/prepare.py x86-preloads
|
||||
|
||||
- name: Bundle the droiddeck-esync packs
|
||||
run: python3 tools/components/prepare.py esync
|
||||
|
||||
- name: Fetch PulseAudio 13.0 source
|
||||
if: steps.pa-src.outputs.cache-hit != 'true'
|
||||
run: python3 tools/components/prepare.py pulseaudio-source
|
||||
|
||||
- name: Fetch DirectAudio (tools/directaudio/release.env)
|
||||
run: python3 tools/components/prepare.py directaudio
|
||||
|
||||
- name: Build the AAudio sink into the audio bundle
|
||||
run: python3 tools/components/prepare.py audio
|
||||
|
||||
- name: Build proot
|
||||
if: steps.proot.outputs.cache-hit != 'true'
|
||||
run: python3 tools/components/prepare.py proot
|
||||
|
||||
- name: Check the preloads
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bash tools/linuxfs/check-preloads.sh app/src/main/assets/linuxfs
|
||||
|
||||
- name: Build GOG Galaxy companion
|
||||
if: steps.comet.outputs.cache-hit != 'true'
|
||||
run: python3 tools/components/prepare.py comet
|
||||
|
||||
- name: Prepare graphics driver variants
|
||||
run: python3 tools/quest/build-driver.py "$ANDROID_HOME/ndk/$NDK_VERSION"
|
||||
- name: Record and pack prepared components
|
||||
run: python3 tools/components/prepare.py pack
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: prepared-components
|
||||
path: app/build/prepared-components.tar.gz
|
||||
if-no-files-found: error
|
||||
compression-level: 0
|
||||
retention-days: 14
|
||||
|
||||
build:
|
||||
needs: xbox
|
||||
name: Compile and test APK
|
||||
needs: [source, components, xbox]
|
||||
name: Compile APK and Android tests
|
||||
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
@@ -150,7 +335,7 @@ jobs:
|
||||
- name: Merge onto main, or say what conflicts
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
BUILD_BASE_SHA: ${{ needs.xbox.outputs.base-sha }}
|
||||
BUILD_BASE_SHA: ${{ needs.source.outputs.base-sha }}
|
||||
run: |
|
||||
set -uo pipefail
|
||||
git config user.name "ci"
|
||||
@@ -208,7 +393,7 @@ jobs:
|
||||
|
||||
- name: Verify backend and APK source match
|
||||
env:
|
||||
XBOX_SOURCE_TREE: ${{ needs.xbox.outputs.tree-sha }}
|
||||
XBOX_SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
|
||||
run: test "$(git rev-parse 'HEAD^{tree}')" = "$XBOX_SOURCE_TREE"
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
@@ -218,13 +403,11 @@ jobs:
|
||||
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
cache-read-only: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
cache-cleanup: on-success
|
||||
|
||||
- name: Resolve the runner's NDK
|
||||
run: |
|
||||
NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
|
||||
VERSION=$(sed -n 's/^Pkg.Revision *= *//p' "$NDK/source.properties")
|
||||
echo "NDK_VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
- name: Resolve the pinned Android NDK
|
||||
run: bash tools/ci/resolve-ndk.sh
|
||||
|
||||
- name: Set the APK build label
|
||||
id: build-label
|
||||
@@ -250,264 +433,6 @@ jobs:
|
||||
echo "DROIDDECK_PR_NUMBER=${PR_NUMBER:-0}" >> "$GITHUB_ENV"
|
||||
echo "Build: \`$label\`" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Cache the preloads
|
||||
id: preloads
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: app/src/main/assets/linuxfs
|
||||
key: preloads-${{ env.PRELOAD_CACHE_VERSION }}-${{ hashFiles('app/src/main/cpp/fakeinput_steam.cpp', 'app/src/main/cpp/adrenotools/src/hook/kgsl.h', 'tools/quest/*', 'tools/linuxfs/preload/*.c', 'tools/linuxfs/build-x86-preloads.sh', 'tools/linuxfs/fex/*', 'tools/linuxfs/clipboard/*.c', 'tools/linuxfs/ssbs/*.c', 'tools/proot/fastpath/*.c', 'tools/linuxfs/overlay/usr/local/bin/*', 'tools/linuxfs/overlay/usr/bin/**', 'tools/linuxfs/desktop/*', 'tools/gamescope/release.env', 'tools/wlroots/release.env', 'tools/linuxfs/uruntime.env', 'tools/linuxfs/licenses/*', 'tools/mangoapp/*', 'tools/msitools/**', 'tools/comet/**', 'tools/xbox/**', 'tools/linuxfs/debian-image.env', 'tools/vr/**') }}
|
||||
|
||||
- name: Build libfakeinput.so and libblsession.so (glibc aarch64)
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo apt-get -o Dir::Etc::sourcelist=sources.list.d/ubuntu.sources \
|
||||
-o Dir::Etc::sourceparts=- -o Acquire::Retries=3 update -qq
|
||||
sudo apt-get install -y -qq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libvulkan1 mesa-vulkan-drivers >/dev/null
|
||||
D=app/src/main/assets/linuxfs
|
||||
mkdir -p "$D"
|
||||
aarch64-linux-gnu-g++ -shared -fPIC -O2 -Wall -Wno-attributes -Wno-nonnull-compare \
|
||||
-pthread -std=c++17 -static-libstdc++ -static-libgcc -Wl,--exclude-libs,ALL \
|
||||
-o "$D/libfakeinput.so" app/src/main/cpp/fakeinput_steam.cpp -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libfakeinput.so"
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o "$D/libblsession.so" tools/linuxfs/preload/*.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libblsession.so"
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o "$D/libblfastpath.so" tools/proot/fastpath/fastpath.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libblfastpath.so"
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -nostdlib -ffreestanding -fno-stack-protector \
|
||||
-fno-tree-loop-distribute-patterns -Wl,-z,defs -o "$D/libblaudit.so" tools/proot/fastpath/audit.c
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libblaudit.so"
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o "$D/libssbs.so" tools/linuxfs/ssbs/ssbs_adapter.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libssbs.so"
|
||||
mkdir -p "$D/usr/local/bin"
|
||||
aarch64-linux-gnu-gcc -O2 -Wall -Wextra -o "$D/usr/local/bin/droiddeck-clipboard" tools/linuxfs/clipboard/clipboard.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/usr/local/bin/droiddeck-clipboard"
|
||||
VK_INCLUDE=$(ls -d "${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"/toolchains/llvm/prebuilt/*/sysroot/usr/include | head -1) \
|
||||
tools/vr/build.sh --native "$D/usr/local/lib/droiddeck-vr"
|
||||
for script in tools/linuxfs/overlay/usr/local/bin/droiddeck-* tools/linuxfs/overlay/usr/local/bin/steam-compatibility; do
|
||||
install -Dm644 "$script" "$D/usr/local/bin/$(basename "$script")"
|
||||
done
|
||||
for f in tools/linuxfs/overlay/usr/bin/* tools/linuxfs/overlay/usr/bin/steamos-polkit-helpers/*; do
|
||||
[ -f "$f" ] && install -Dm644 "$f" "$D/${f#tools/linuxfs/overlay/}"
|
||||
done
|
||||
if [ -f tools/gamescope/release.env ]; then
|
||||
. tools/gamescope/release.env
|
||||
curl -fsSL --retry 3 -o gamescope.tzst "https://github.com/${GAMESCOPE_REPO:-${GITHUB_REPOSITORY}}/releases/download/${GAMESCOPE_TAG}/gamescope.tzst"
|
||||
echo "${GAMESCOPE_SHA256} gamescope.tzst" | sha256sum -c -
|
||||
tar --use-compress-program=unzstd -xf gamescope.tzst -C "$D"
|
||||
test -f "$D/usr/local/bin/gamescope"
|
||||
rm gamescope.tzst
|
||||
fi
|
||||
. tools/linuxfs/uruntime.env
|
||||
curl -fsSL --retry 3 -o uruntime "https://github.com/VHSgunzo/uruntime/releases/download/${URUNTIME_VERSION}/${URUNTIME_ASSET}"
|
||||
echo "${URUNTIME_SHA256} uruntime" | sha256sum -c -
|
||||
install -Dm644 uruntime "$D/usr/local/lib/droiddeck/uruntime"
|
||||
install -Dm644 tools/linuxfs/licenses/uruntime-LICENSE "$D/usr/local/share/licenses/uruntime/LICENSE"
|
||||
rm uruntime
|
||||
M="$D/usr/local/lib/mangoapp"
|
||||
mkdir -p "$M" mango-pkgs
|
||||
grep -v '^#' tools/mangoapp/packages.txt | while read -r sum url; do
|
||||
[ -n "$url" ] || continue
|
||||
curl -fsSL --retry 3 -o mango-pkgs/pkg.tar.zst "$url"
|
||||
echo "$sum mango-pkgs/pkg.tar.zst" | sha256sum -c -
|
||||
tar --use-compress-program=unzstd -xf mango-pkgs/pkg.tar.zst -C mango-pkgs
|
||||
rm mango-pkgs/pkg.tar.zst
|
||||
done
|
||||
install -m644 mango-pkgs/usr/bin/mangoapp "$M/mangoapp"
|
||||
for so in libfmt.so.10 libspdlog.so.1.13 libglfw.so.3 libtraceevent.so.1; do
|
||||
cp -L "mango-pkgs/usr/lib/$so" "$M/$so"
|
||||
done
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -Wl,-soname,libtracefs.so.1 \
|
||||
-o "$M/libtracefs.so.1" tools/mangoapp/libtracefs-shim.c
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$M/libtracefs.so.1"
|
||||
install -Dm644 tools/mangoapp/mangoapp "$D/usr/local/bin/mangoapp"
|
||||
rm -rf mango-pkgs
|
||||
ls -l "$M"
|
||||
mkdir -p pw-pkgs
|
||||
grep -v '^#' tools/pipewire/packages.txt | while read -r sum url; do
|
||||
[ -n "$url" ] || continue
|
||||
curl -fsSL --retry 3 -o pw-pkgs/pkg.tar.zst "$url"
|
||||
echo "$sum pw-pkgs/pkg.tar.zst" | sha256sum -c -
|
||||
tar --use-compress-program=unzstd -xf pw-pkgs/pkg.tar.zst -C pw-pkgs
|
||||
rm pw-pkgs/pkg.tar.zst
|
||||
done
|
||||
tools/pipewire/assemble.sh pw-pkgs "$D/usr/local/lib/droiddeck-pipewire.tzst"
|
||||
rm -rf pw-pkgs
|
||||
ls -l "$D/usr/local/lib/droiddeck-pipewire.tzst"
|
||||
T="$D/usr/local/lib/droiddeck-msitools"
|
||||
mkdir -p "$T" msi-pkgs
|
||||
grep -v '^#' tools/msitools/packages.txt | while read -r sum url; do
|
||||
[ -n "$url" ] || continue
|
||||
curl -fsSL --retry 3 -o msi-pkgs/pkg.tar.xz "$url"
|
||||
echo "$sum msi-pkgs/pkg.tar.xz" | sha256sum -c -
|
||||
tar -xJf msi-pkgs/pkg.tar.xz -C msi-pkgs
|
||||
rm msi-pkgs/pkg.tar.xz
|
||||
done
|
||||
install -m644 msi-pkgs/usr/bin/msiinfo "$T/msiinfo"
|
||||
install -m644 msi-pkgs/usr/bin/cabextract "$T/cabextract"
|
||||
install -m644 msi-pkgs/usr/lib/7zip/7z "$T/7z"
|
||||
install -m644 msi-pkgs/usr/lib/7zip/7z.so "$T/7z.so"
|
||||
for so in libmsi-1.0.so.0 libgsf-1.so.114 libgcab-1.0.so.0; do
|
||||
cp -L "msi-pkgs/usr/lib/$so" "$T/$so"
|
||||
done
|
||||
for f in NOTICE GPL-2 GPL-3 LGPL-2.1 7zip-License 7zip-unRarLicense; do
|
||||
install -Dm644 "tools/msitools/licenses/$f" "$D/usr/local/share/licenses/droiddeck-msitools/$f"
|
||||
done
|
||||
rm -rf msi-pkgs
|
||||
ls -l "$T"
|
||||
install -Dm644 tools/linuxfs/desktop/droiddeck-desktop "$D/usr/local/bin/droiddeck-desktop"
|
||||
install -Dm644 tools/linuxfs/desktop/droiddeck-gpu "$D/usr/local/bin/droiddeck-gpu"
|
||||
install -Dm644 tools/linuxfs/desktop/droiddeck-desktop-gpu "$D/usr/local/bin/droiddeck-desktop-gpu"
|
||||
install -Dm644 tools/linuxfs/desktop/kwin_wayland_wrapper "$D/usr/local/bin/kwin_wayland_wrapper"
|
||||
install -Dm644 tools/linuxfs/desktop/firefox-droiddeck.js "$D/usr/lib/firefox/defaults/pref/droiddeck.js"
|
||||
ls -lR "$D"
|
||||
|
||||
- name: Fetch the Debian image the preloads build in
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
. tools/linuxfs/debian-image.env
|
||||
image=public.ecr.aws/docker/library/debian:bullseye
|
||||
if gh release download "$DEBIAN_IMAGE_TAG" -R "$GITHUB_REPOSITORY" -p "$DEBIAN_IMAGE_ASSET" -O /tmp/debian-image.tar.zst \
|
||||
&& { [ -z "$DEBIAN_IMAGE_SHA256" ] || echo "$DEBIAN_IMAGE_SHA256 /tmp/debian-image.tar.zst" | sha256sum -c -; }; then
|
||||
zstd -dc /tmp/debian-image.tar.zst | docker load
|
||||
rm -f /tmp/debian-image.tar.zst
|
||||
else
|
||||
echo "::warning::the hosted Debian image could not be fetched; pulling from the registry instead"
|
||||
for attempt in 1 2 3 4 5; do
|
||||
docker pull "$image" && break
|
||||
[ "$attempt" -lt 5 ] || { echo "::error::could not pull $image after $attempt attempts"; exit 1; }
|
||||
echo "pull attempt $attempt failed (registry busy?); retrying in $((attempt * 30)) s"
|
||||
sleep $((attempt * 30))
|
||||
done
|
||||
fi
|
||||
docker image ls "$image"
|
||||
|
||||
- name: Build the x86 preloads FEX guests load (glibc 2.31)
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
docker run --rm -v "$PWD:/src" -w /src public.ecr.aws/docker/library/debian:bullseye bash -c '
|
||||
set -euo pipefail
|
||||
install_compilers() {
|
||||
apt-get -o Acquire::Check-Valid-Until=false update -qq &&
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends gcc g++ gcc-multilib g++-multilib binutils >/dev/null
|
||||
}
|
||||
printf "deb http://deb.debian.org/debian bullseye main\ndeb http://security.debian.org/debian-security bullseye-security main\n" > /etc/apt/sources.list
|
||||
if ! install_compilers; then
|
||||
printf "deb http://archive.debian.org/debian bullseye main\ndeb http://archive.debian.org/debian-security bullseye-security main\n" > /etc/apt/sources.list
|
||||
install_compilers
|
||||
fi
|
||||
tools/linuxfs/build-x86-preloads.sh app/src/main/assets/linuxfs
|
||||
'
|
||||
sudo chown -R "$(id -u):$(id -g)" app/src/main/assets/linuxfs
|
||||
ls -l app/src/main/assets/linuxfs/x86_64 app/src/main/assets/linuxfs/i386
|
||||
|
||||
- name: Bundle the droiddeck-esync packs
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -f tools/droiddeck-esync/release.env ]; then
|
||||
. tools/droiddeck-esync/release.env
|
||||
release_url="https://github.com/${SYNC_BUNDLE_REPO}/releases/download/${SYNC_BUNDLE_TAG}"
|
||||
curl -fsSL --retry 3 -o sync-bundle.tzst "$release_url/$SYNC_BUNDLE_ASSET"
|
||||
echo "$SYNC_BUNDLE_SHA256 sync-bundle.tzst" | sha256sum -c -
|
||||
mkdir -p app/src/main/assets/droiddeck-esync
|
||||
tar --use-compress-program=unzstd -xf sync-bundle.tzst -C app/src/main/assets/droiddeck-esync
|
||||
rm sync-bundle.tzst
|
||||
curl -fsSL --retry 3 -o sync-index.json "$release_url/index.json"
|
||||
revoked=$(python3 -c 'import json, sys; print(" ".join(p["id"] for p in json.load(open(sys.argv[1]))["packs"] if p.get("revoked") is True))' sync-index.json)
|
||||
for id in $revoked; do
|
||||
if [ -e "app/src/main/assets/droiddeck-esync/packs/$id.tzst" ]; then
|
||||
echo "::warning::$SYNC_BUNDLE_ASSET carries revoked pack $id; it is left out of the APK (point tools/droiddeck-esync/release.env at a newer bundle)"
|
||||
rm -f "app/src/main/assets/droiddeck-esync/packs/$id.tzst"
|
||||
fi
|
||||
done
|
||||
rm sync-index.json
|
||||
test -f app/src/main/assets/droiddeck-esync/index.json
|
||||
test -f app/src/main/assets/droiddeck-esync/index.json.sig
|
||||
ls -lR app/src/main/assets/droiddeck-esync
|
||||
fi
|
||||
|
||||
- name: Cache PulseAudio 13.0 source
|
||||
id: pa-src
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: pa13
|
||||
key: pulseaudio-src-13.0
|
||||
- name: Fetch PulseAudio 13.0 source
|
||||
if: steps.pa-src.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
curl -fsSL -o pa.tar.gz https://github.com/pulseaudio/pulseaudio/archive/refs/tags/v13.0.tar.gz
|
||||
mkdir -p pa13 && tar -xzf pa.tar.gz -C pa13 --strip-components=1 && rm pa.tar.gz
|
||||
- name: Fetch DirectAudio (tools/directaudio/release.env)
|
||||
run: tools/directaudio/fetch.sh "$PWD" "$PWD/sink-out"
|
||||
- name: Build the AAudio sink into the audio bundle
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
|
||||
tools/aaudio-sink/build.sh "$PWD/pa13" "$PWD/sink-out"
|
||||
rm -rf pa-bundle && mkdir -p pa-bundle
|
||||
tar --use-compress-program=unzstd -xf app/src/main/assets/pulseaudio.tzst -C pa-bundle
|
||||
test ! -f pa-bundle/modules/arm64/module-aaudio-sink.so
|
||||
install -m755 sink-out/module-aaudio-sink.so pa-bundle/modules/arm64/module-aaudio-sink.so
|
||||
install -m755 sink-out/module-directaudio-native-sink.so pa-bundle/modules/arm64/module-directaudio-native-sink.so
|
||||
(cd pa-bundle && tar --use-compress-program='zstd -19' -cf ../pulseaudio.tzst .)
|
||||
mkdir -p app/build/prepared-assets
|
||||
mv pulseaudio.tzst app/build/prepared-assets/pulseaudio.tzst
|
||||
tar --use-compress-program=unzstd -tf app/build/prepared-assets/pulseaudio.tzst | grep -c '\.so$'
|
||||
rm -rf pa-bundle sink-out
|
||||
- name: Cache proot
|
||||
id: proot
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
app/src/main/jniLibs/arm64-v8a/libproot.so
|
||||
app/src/main/jniLibs/arm64-v8a/libproot-loader.so
|
||||
key: proot-${{ env.NDK_VERSION }}-${{ hashFiles('tools/proot/**') }}
|
||||
- name: Build proot
|
||||
if: steps.proot.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
|
||||
tools/proot/build.sh app/src/main/jniLibs/arm64-v8a
|
||||
|
||||
- name: Check the preloads
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bash tools/linuxfs/check-preloads.sh app/src/main/assets/linuxfs
|
||||
|
||||
- name: Check Quest tracking IPC
|
||||
run: |
|
||||
set -euo pipefail
|
||||
NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
|
||||
VK_INCLUDE=$(ls -d "$NDK"/toolchains/llvm/prebuilt/*/sysroot/usr/include | head -1)
|
||||
mkdir -p build/vr/include
|
||||
cp -R "$VK_INCLUDE/vulkan" build/vr/include/
|
||||
if [ -d "$VK_INCLUDE/vk_video" ]; then cp -R "$VK_INCLUDE/vk_video" build/vr/include/; fi
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_tracking.cpp -o /tmp/test-xr-tracking
|
||||
/tmp/test-xr-tracking
|
||||
g++ -std=c++17 -Wall -Wextra -Werror tools/vr/tests/test_xr_touch.cpp -o /tmp/test-xr-touch
|
||||
/tmp/test-xr-touch
|
||||
g++ -std=c++17 -Wall -Wextra -Werror tools/vr/tests/test_pad_controller_config.cpp -o /tmp/test-pad-controller-config
|
||||
/tmp/test-pad-controller-config
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_vsync.cpp -o /tmp/test-xr-vsync
|
||||
/tmp/test-xr-vsync
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_frames.cpp -o /tmp/test-xr-frames
|
||||
/tmp/test-xr-frames
|
||||
cc -Itools/vr/third_party/wayland -c tools/vr/src/wayland_client_stub.c -o /tmp/test-wayland-stub.o
|
||||
cc -Itools/vr/third_party/wayland -c app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c -o /tmp/test-xdg-shell.o
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-missing-field-initializers -pthread -Ibuild/vr/include \
|
||||
-Itools/vr/third_party/wayland -Iapp/src/main/cpp/waylandcomp/generated \
|
||||
tools/vr/tests/test_presenter_shutdown.cpp tools/vr/src/presenter.cpp /tmp/test-wayland-stub.o /tmp/test-xdg-shell.o \
|
||||
-ldl -o /tmp/test-presenter-shutdown
|
||||
timeout 10 /tmp/test-presenter-shutdown
|
||||
|
||||
- name: Rust toolchain for the store engines (aarch64-linux-android)
|
||||
id: rust
|
||||
run: |
|
||||
@@ -525,9 +450,10 @@ jobs:
|
||||
~/.cargo/git/db
|
||||
~/.cargo/bin/cargo-ndk
|
||||
app/src/main/rust/stores/target
|
||||
key: stores-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}
|
||||
key: stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}-${{ hashFiles('app/src/main/rust/stores/src/**', 'app/src/main/rust/stores/Cargo.toml', 'app/src/main/rust/stores/build.rs', 'app/src/main/rust/stores/.cargo/**', 'app/build.gradle') }}
|
||||
restore-keys: |
|
||||
stores-${{ steps.rust.outputs.rustc }}-
|
||||
stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-${{ hashFiles('app/src/main/rust/stores/Cargo.lock') }}-
|
||||
stores-v2-${{ runner.os }}-${{ runner.arch }}-${{ env.NDK_VERSION }}-${{ steps.rust.outputs.rustc }}-
|
||||
|
||||
- name: cargo-ndk
|
||||
run: |
|
||||
@@ -545,18 +471,26 @@ jobs:
|
||||
restore-keys: |
|
||||
cxx-${{ env.NDK_VERSION }}-
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: prepared-components
|
||||
path: app/build
|
||||
- name: Verify and unpack prepared components
|
||||
env:
|
||||
SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
|
||||
run: python3 tools/components/prepare.py unpack --tree "$SOURCE_TREE"
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: xbox-arm64
|
||||
path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-xbox
|
||||
|
||||
- name: Build GOG Galaxy companion
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
rustup toolchain install 1.90.0 --profile minimal
|
||||
rustup target add --toolchain 1.90.0 aarch64-unknown-linux-gnu
|
||||
RUSTUP_TOOLCHAIN=1.90.0 bash tools/comet/build.sh
|
||||
|
||||
- name: Cache checksum-pinned pack inputs
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/droiddeck-pack-inputs
|
||||
key: pack-inputs-v1-${{ hashFiles('tools/packs/build.sh', 'tools/packs/fetch-verified.sh', 'tools/packs/tracking/release.env') }}
|
||||
restore-keys: pack-inputs-v1-
|
||||
- name: Build the add-on packs
|
||||
run: bash tools/packs/build.sh app/build/packs
|
||||
|
||||
@@ -567,7 +501,6 @@ jobs:
|
||||
SGDB_API_KEY: ${{ secrets.SGDB_API_KEY }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
python3 tools/quest/build-driver.py "$ANDROID_HOME/ndk/$NDK_VERSION"
|
||||
python3 tools/release/runtime_inputs.py record
|
||||
./gradlew assembleRelease --console=plain -PndkVersion="$NDK_VERSION" 2>&1 | tee /tmp/build.log
|
||||
python3 tools/release/check_session_assets.py app/build/outputs/apk/release/app-release.apk
|
||||
@@ -598,16 +531,11 @@ jobs:
|
||||
path: app/src/main/rust/stores/Cargo.lock
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Install Python test dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y -qq python3-yaml
|
||||
|
||||
- name: Steam import and game environment tests
|
||||
run: python3 -m unittest discover -s tools/tests -p 'test_*.py'
|
||||
|
||||
- name: Unit tests
|
||||
id: unit-tests
|
||||
env:
|
||||
DROIDDECK_BUILD_LABEL: ${{ steps.build-label.outputs.label }}
|
||||
SGDB_API_KEY: ${{ secrets.SGDB_API_KEY }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
mkdir -p app/build
|
||||
@@ -683,86 +611,84 @@ jobs:
|
||||
TEST_DIAGNOSTICS_URL: ${{ steps.unit-test-diagnostics.outputs.artifact-url }}
|
||||
APK_OUTCOME: ${{ steps.apk-upload.outcome }}
|
||||
SAME_REPO: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
run: bash tools/release/report-build.sh
|
||||
|
||||
python-tests:
|
||||
name: Python and native regression tests
|
||||
needs: source
|
||||
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Merge the pinned APK base
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
BUILD_BASE_SHA: ${{ needs.source.outputs.base-sha }}
|
||||
run: |
|
||||
set -uo pipefail
|
||||
MARK="<!-- droiddeck-pr-build -->"
|
||||
{
|
||||
echo "$MARK"
|
||||
echo "## Build of this pull request"
|
||||
echo
|
||||
[ -f /tmp/pr-merge.md ] && cat /tmp/pr-merge.md
|
||||
echo
|
||||
case "$BUILD_OUTCOME:$UNIT_TEST_OUTCOME:$APK_OUTCOME" in
|
||||
success:success:success)
|
||||
echo "### Build passed"
|
||||
echo
|
||||
echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key."
|
||||
echo
|
||||
if [ "$SAME_REPO" = true ]; then
|
||||
echo "A release-signed tester build that installs over Stable or Preview is being published now and will appear in DroidDeck's **Test builds** list. Label the PR \`no-test-build\` to skip that."
|
||||
else
|
||||
echo "**Maintainer:** add the \`publish-test\` label to publish a release-signed tester build that installs over Stable or Preview and appears in DroidDeck's **Test builds** list. The label is removed automatically after publishing."
|
||||
fi
|
||||
echo
|
||||
echo "Fallback: [open **PR Release Publish**]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/workflows/pr-release-publish.yml) on \`main\` and enter PR \`$PR\`."
|
||||
;;
|
||||
success:success:*)
|
||||
echo "### APK publication incomplete"
|
||||
echo
|
||||
echo "Compilation and unit tests passed, but APK publication did not complete. See [the run]($RUN_URL)."
|
||||
;;
|
||||
success:failure:*)
|
||||
echo "### ERROR: Unit tests failed"
|
||||
echo
|
||||
echo "The APK compiled, but unit tests failed. No installable artifact was published."
|
||||
echo
|
||||
if [ -n "$TEST_DIAGNOSTICS_URL" ]; then
|
||||
echo "The [unit-test-results]($TEST_DIAGNOSTICS_URL) artifact contains the test log and any generated reports."
|
||||
else
|
||||
echo "The test diagnostics upload did not complete. See [the test log]($RUN_URL)."
|
||||
fi
|
||||
;;
|
||||
success:*)
|
||||
echo "### Build incomplete"
|
||||
echo
|
||||
echo "The APK compiled, but unit tests did not complete successfully. See [the run]($RUN_URL)."
|
||||
;;
|
||||
failure:*)
|
||||
echo "### ERROR: Build failed"
|
||||
echo
|
||||
echo "The compiler's errors ([full log]($RUN_URL)):"
|
||||
echo
|
||||
echo '```'
|
||||
{ grep -E '^e: |^w: .*error|error:|CMake Error|fatal error|ninja: error|FAILED|What went wrong|Execution failed for task|Unresolved reference|Type mismatch|Unresolved' /tmp/build.log 2>/dev/null \
|
||||
| sed -e 's#file:///home/runner/work/[^/]*/[^/]*/##' -e 's#/home/runner/work/[^/]*/[^/]*/##' \
|
||||
| grep -v '^w: ' | awk '!seen[$0]++' | head -80; } || true
|
||||
echo '```'
|
||||
echo
|
||||
echo "<details><summary>What went wrong (Gradle)</summary>"
|
||||
echo
|
||||
echo '```'
|
||||
awk '/^\* What went wrong/{p=1} /^\* Try:/{p=0} p{print}' /tmp/build.log 2>/dev/null | head -60
|
||||
echo '```'
|
||||
echo "</details>"
|
||||
;;
|
||||
skipped:*|cancelled:*)
|
||||
echo "### Not built"
|
||||
echo
|
||||
echo "The build did not run (see above, or [the run]($RUN_URL))."
|
||||
;;
|
||||
esac
|
||||
echo
|
||||
} > /tmp/pr-report.md
|
||||
cat /tmp/pr-report.md >> "$GITHUB_STEP_SUMMARY"
|
||||
ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR}/comments" --paginate --jq ".[] | select(.body | startswith(\"$MARK\")) | .id" | head -1 || true)
|
||||
if [ -n "$ID" ]; then
|
||||
gh api -X PATCH "repos/${GITHUB_REPOSITORY}/issues/comments/${ID}" -F body=@/tmp/pr-report.md >/dev/null
|
||||
else
|
||||
gh api -X POST "repos/${GITHUB_REPOSITORY}/issues/${PR}/comments" -F body=@/tmp/pr-report.md >/dev/null
|
||||
fi
|
||||
set -euo pipefail
|
||||
git fetch --no-tags origin "$BUILD_BASE_SHA"
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@users.noreply.github.com"
|
||||
git merge --no-ff --no-edit FETCH_HEAD
|
||||
- name: Verify backend and test source match
|
||||
env:
|
||||
XBOX_SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
|
||||
run: test "$(git rev-parse 'HEAD^{tree}')" = "$XBOX_SOURCE_TREE"
|
||||
- name: Install Python test dependencies
|
||||
timeout-minutes: 7
|
||||
run: bash tools/ci/install-ubuntu-packages.sh python3-yaml gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user libvulkan-dev mesa-vulkan-drivers
|
||||
- name: Resolve the pinned Android NDK
|
||||
run: bash tools/ci/resolve-ndk.sh
|
||||
|
||||
- name: Check Quest tracking IPC
|
||||
run: |
|
||||
set -euo pipefail
|
||||
NDK="${ANDROID_NDK_LATEST_HOME:-${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}}"
|
||||
VK_INCLUDE=$(ls -d "$NDK"/toolchains/llvm/prebuilt/*/sysroot/usr/include | head -1)
|
||||
mkdir -p build/vr/include
|
||||
cp -R "$VK_INCLUDE/vulkan" build/vr/include/
|
||||
if [ -d "$VK_INCLUDE/vk_video" ]; then cp -R "$VK_INCLUDE/vk_video" build/vr/include/; fi
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_tracking.cpp -o /tmp/test-xr-tracking
|
||||
/tmp/test-xr-tracking
|
||||
g++ -std=c++17 -Wall -Wextra -Werror tools/vr/tests/test_xr_touch.cpp -o /tmp/test-xr-touch
|
||||
/tmp/test-xr-touch
|
||||
g++ -std=c++17 -Wall -Wextra -Werror tools/vr/tests/test_pad_controller_config.cpp -o /tmp/test-pad-controller-config
|
||||
/tmp/test-pad-controller-config
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_vsync.cpp -o /tmp/test-xr-vsync
|
||||
/tmp/test-xr-vsync
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -pthread tools/vr/tests/test_xr_frames.cpp -o /tmp/test-xr-frames
|
||||
/tmp/test-xr-frames
|
||||
cc -Itools/vr/third_party/wayland -c tools/vr/src/wayland_client_stub.c -o /tmp/test-wayland-stub.o
|
||||
cc -Itools/vr/third_party/wayland -c app/src/main/cpp/waylandcomp/generated/xdg-shell-protocol.c -o /tmp/test-xdg-shell.o
|
||||
g++ -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-missing-field-initializers -pthread -Ibuild/vr/include \
|
||||
-Itools/vr/third_party/wayland -Iapp/src/main/cpp/waylandcomp/generated \
|
||||
tools/vr/tests/test_presenter_shutdown.cpp tools/vr/src/presenter.cpp /tmp/test-wayland-stub.o /tmp/test-xdg-shell.o \
|
||||
-ldl -o /tmp/test-presenter-shutdown
|
||||
timeout 10 /tmp/test-presenter-shutdown
|
||||
|
||||
- name: Steam import and game environment tests
|
||||
run: python3 -m unittest discover -s tools/tests -p 'test_*.py'
|
||||
|
||||
checks:
|
||||
name: Compile and test APK
|
||||
needs: [build, python-tests]
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Require compilation and every test job
|
||||
env:
|
||||
BUILD_RESULT: ${{ needs.build.result }}
|
||||
PYTHON_RESULT: ${{ needs.python-tests.result }}
|
||||
run: test "$BUILD_RESULT" = success && test "$PYTHON_RESULT" = success
|
||||
|
||||
sign:
|
||||
needs: build
|
||||
needs: [build, checks]
|
||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -774,7 +700,7 @@ jobs:
|
||||
secrets: inherit
|
||||
|
||||
packs:
|
||||
needs: build
|
||||
needs: [build, checks]
|
||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -794,6 +720,10 @@ jobs:
|
||||
CI_REPO: Droid-Deck/DroidDeck-CI
|
||||
KEEP: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: droiddeck-signed-*
|
||||
@@ -811,72 +741,13 @@ jobs:
|
||||
- name: Describe the change
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
pr=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" \
|
||||
--jq '[.[] | select(.merged_at != null and .base.ref == "main")] | first // empty')
|
||||
if [ -n "$pr" ]; then
|
||||
number=$(jq -r .number <<<"$pr")
|
||||
title=$(jq -r .title <<<"$pr")
|
||||
merged=$(jq -r '.merged_at[:10]' <<<"$pr")
|
||||
summary=$(jq -r '.body // ""' <<<"$pr" | tr -d '\r' | { grep -v '^🤖' || true; } |
|
||||
awk '!p && /^#/ { next } NF { p = 1; print; next } p { exit }' | head -n 6 | cut -c1-400)
|
||||
{
|
||||
echo "**Merged to main** - [PR #$number]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$number): $title (merged $merged)"
|
||||
if [ -n "$summary" ]; then
|
||||
echo
|
||||
echo "$summary"
|
||||
fi
|
||||
} > notes-head.md
|
||||
else
|
||||
subject=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA" --jq '.commit.message | split("\n")[0]')
|
||||
echo "**Pushed to main** without a PR - $subject" > notes-head.md
|
||||
fi
|
||||
cat notes-head.md
|
||||
run: bash tools/release/describe-build.sh
|
||||
|
||||
- name: Publish to DroidDeck-CI
|
||||
id: publish
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.ci-token.outputs.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag=main-${GITHUB_SHA::7}
|
||||
cat signed/SHA256SUMS-*.txt > signed/SHA256SUMS.txt
|
||||
rm signed/SHA256SUMS-*.txt
|
||||
notes="$(cat notes-head.md)
|
||||
|
||||
Signed build of $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA - in main, not yet in a DroidDeck release; for testing.
|
||||
Commit: $GITHUB_SHA
|
||||
VersionCode: $(sed -n 's/^ *versionCode \([0-9][0-9]*\)$/\1/p' app/build.gradle)
|
||||
Each apk installs over a DroidDeck release and keeps its data. \`standard\` is the normal app; the others are the same app under another package name, installed beside it.
|
||||
|
||||
SHA-256:
|
||||
\`\`\`
|
||||
$(cat signed/SHA256SUMS.txt)
|
||||
\`\`\`"
|
||||
gh release delete "$tag" -R "$CI_REPO" --yes --cleanup-tag 2>/dev/null || true
|
||||
gh release create "$tag" -R "$CI_REPO" --target main --prerelease \
|
||||
--title "main ${GITHUB_SHA::7}" --notes "$notes" signed/*
|
||||
gh release list -R "$CI_REPO" -L 200 --json tagName,publishedAt \
|
||||
--jq '[.[] | select(.tagName | startswith("main-"))] | sort_by(.publishedAt) | reverse | .['"$KEEP"':][] | .tagName' |
|
||||
while IFS= read -r old; do
|
||||
if [ "$old" = "$tag" ]; then
|
||||
continue
|
||||
fi
|
||||
if ! gh release delete "$old" -R "$CI_REPO" --yes --cleanup-tag 2>/dev/null; then
|
||||
if gh release view "$old" -R "$CI_REPO" >/dev/null 2>&1; then
|
||||
echo "::error::Could not delete old release $old"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
published=$(gh release view "$tag" -R "$CI_REPO" --json tagName,assets)
|
||||
jq -e --arg tag "$tag" '.tagName == $tag and (.assets | length) > 0' <<< "$published" >/dev/null
|
||||
url="$GITHUB_SERVER_URL/$CI_REPO/releases/tag/$tag"
|
||||
apk=$(cd signed && ls DroidDeck-*.apk | awk 'length(a) == 0 || length($0) < length(a) { a = $0 } END { print a }')
|
||||
echo "release=$url" >> "$GITHUB_OUTPUT"
|
||||
echo "apk=$GITHUB_SERVER_URL/$CI_REPO/releases/download/$tag/$apk" >> "$GITHUB_OUTPUT"
|
||||
echo "Published $url"
|
||||
run: bash tools/release/publish-ci.sh
|
||||
|
||||
- name: Post the Preview build to Discord
|
||||
env:
|
||||
@@ -884,26 +755,8 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE: ${{ steps.publish.outputs.release }}
|
||||
APK: ${{ steps.publish.outputs.apk }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "$WEBHOOK" ]; then
|
||||
echo "::notice::No DISCORD_BUILDS_WEBHOOK secret; nothing posted"
|
||||
exit 0
|
||||
fi
|
||||
commit=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA")
|
||||
subject=$(jq -r '.commit.message | split("\n")[0]' <<<"$commit")
|
||||
title=$(jq -r '.commit.message | split("\n") | map(select(length > 0)) | .[1] // ""' <<<"$commit")
|
||||
pr=$(sed -n 's/^Merge pull request #\([0-9]*\).*/\1/p' <<<"$subject")
|
||||
if [ -n "$pr" ]; then
|
||||
what="[#$pr]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/$pr): ${title:-$subject}"
|
||||
else
|
||||
what="[\`${GITHUB_SHA::7}\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA): $subject"
|
||||
fi
|
||||
get=$(printf 'Download: [standard APK](<%s>) · [all variants](<%s>)' "$APK" "$RELEASE")
|
||||
content=$(printf '**New signed Preview build** `main-%s`\n%s\nIn the app: **Updates → Preview**\n%s' "${GITHUB_SHA::7}" "$what" "$get")
|
||||
jq -n --arg content "$content" '{content: $content, allowed_mentions: {parse: []}}' |
|
||||
curl -fsS -H 'Content-Type: application/json' -d @- "$WEBHOOK" -o /dev/null
|
||||
echo "Posted: $content"
|
||||
run: bash tools/release/announce-preview.sh
|
||||
|
||||
|
||||
catalog:
|
||||
needs: announce
|
||||
|
||||
@@ -9,6 +9,16 @@ DroidDeck brings the SteamOS experience to Android: Valve's Steam client in Big
|
||||
|
||||
<p align="center"><a href="https://discord.gg/JRGAvawjsm"><img src="https://img.shields.io/badge/Discord-Join%20the%20community-5865F2?logo=discord&logoColor=white" alt="Join the DroidDeck Discord"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/daily?language=C" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/daily?language=Kotlin" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/weekly?language=C" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
<a href="https://trendshift.io/repositories/267852?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-267852" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/267852/weekly?language=Kotlin" alt="Droid-Deck%2FDroidDeck | Trendshift" width="250" height="55"/></a>
|
||||
</p>
|
||||
|
||||
<p align="center"><img src="docs/releases/media/0.2.0/launch-into-steam.gif" width="80%" alt="Tapping DroidDeck on the Android home screen and landing in Steam Big Picture"></p>
|
||||
|
||||
> Note: DroidDeck does not have a stand-alone website. Do not click on any download links from websites claiming to be the DroidDeck team.
|
||||
@@ -47,7 +57,7 @@ Compatibility and performance vary by device; hardware validation is limited. De
|
||||
|
||||
## Credits and licence
|
||||
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultfd support in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/ntdll/unix/virtual.c` (LGPL-2.1-or-later): libblsession gives it the arm64 syscall number and answers its `PAGEMAP_SCAN` from `/proc/self/pagemap` where Android refuses the ioctl. See [LICENSE](LICENSE). Steam and Proton belong to Valve Corporation; this project is not affiliated with Valve.
|
||||
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and is already on through Proton. The proot fast path picks the guest name of a host file bound under several names in the order [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later) sorts its bindings, so links and `/proc/self/fd` read back as they do through proot. The session's [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire) (MIT) opens its sockets with the per-socket access settings documented in its `module-access.c`, and [WirePlumber](https://gitlab.freedesktop.org/pipewire/wireplumber) (MIT) keeps those clients at full permissions through its `access.rules`. Wine write watches use the userfaultfd support in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/ntdll/unix/virtual.c` (LGPL-2.1-or-later): libblsession gives it the arm64 syscall number and answers its `PAGEMAP_SCAN` from `/proc/self/pagemap` where Android refuses the ioctl. Wine on arm64 sets a thread's full context by raising `SIGUSR2` from `syscall_dispatcher_return_slowpath` in [Wine](https://gitlab.winehq.org/wine/wine)'s `dlls/ntdll/unix/signal_arm64.c` (LGPL-2.1-or-later); libblsession runs that handler in place on a frame laid out as the [Linux](https://github.com/torvalds/linux) kernel's `arch/arm64/kernel/signal.c` builds it and returns through `rt_sigreturn`, so proot does not stop the thread for it. Wine's process list reads each process's memory counters from `/proc/<pid>/status` in `fill_vm_counters` ([Wine](https://gitlab.winehq.org/wine/wine) `dlls/ntdll/unix/process.c`, LGPL-2.1-or-later), so libblsession gives those reads the kernel's file instead of a copy with `TracerPid` cleared. droiddeck-ntsync is checked against the object, wait and error semantics documented for the [Linux](https://github.com/torvalds/linux) ntsync driver in `Documentation/userspace-api/ntsync.rst` (GPL-2.0). Xbox games load the Windows modules of [@domsvoboda](https://github.com/domsvoboda)'s [xodus-nexus](https://github.com/domsvoboda/xodus-nexus) runtime (LGPL-2.1-or-later), including its `wintypes.dll`, whose `ApiInformation` answer Minecraft for Windows needs to start; how Minecraft installs GameInput under Wine was checked against [@Wyze3306](https://github.com/Wyze3306)'s [BedrockOnLinuLine truncated
|
||||
|
||||
XR glasses support builds on WinNative's VITURE glasses work. VITURE protocol details were checked against [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) by [@wheaney](https://github.com/wheaney), including the VITURE protocol header it ships, [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) by [@badicsalex](https://github.com/badicsalex) and the [go-macos/iokit VITURE package](https://pkg.go.dev/github.com/go-macos/iokit/viture); the optional VITURE SDK belongs to VITURE and is not included. RayNeo support adapts [@informalTechCode](https://github.com/informalTechCode)'s [RayNeo-Air-Series-3DoF-Scaffold](https://github.com/informalTechCode/RayNeo-Air-Series-3DoF-Scaffold) (Apache-2.0) and references [@verncat](https://github.com/verncat)'s [RayNeo-Air-3S-Pro-OpenVR](https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR) (MIT) and [Monado](https://gitlab.freedesktop.org/monado/monado) (BSL-1.0); see [docs/third-party/rayneo](docs/third-party/rayneo/README.md). XREAL 1S support references [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) and [xrealOneDeviceKit](https://github.com/wheaney/xrealOneDeviceKit) by @wheaney, [xreal_one_driver](https://github.com/rohitsangwan01/xreal_one_driver) by [@rohitsangwan01](https://github.com/rohitsangwan01) (MIT) and [xr-tools](https://github.com/0xcaff/xr-tools) by [@0xcaff](https://github.com/0xcaff). Rokid support follows the Rokid protocol notes in [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) and @badicsalex's [Void Computing write-ups](https://voidcomputing.hu/blog/worse-better-prettier/), and [Monado](https://gitlab.freedesktop.org/monado/monado)'s Rokid driver. The REDMAGIC glasses-display findings draw on [@mekhontsev](https://github.com/mekhontsev)'s [MagicDesk investigation](https://github.com/mekhontsev/magicdesk/blob/main/docs/xr-resolution-fix.md) and [@Coding-BR](https://github.com/Coding-BR)'s [decompiled Nubia kernel](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube). VITURE, RayNeo, XREAL, Rokid and REDMAGIC are trademarks of their owners; this project is not affiliated with them.
|
||||
|
||||
@@ -56,3 +66,5 @@ Joy-Con VR controllers port the arm model of Google's [Google VR SDK for Unity](
|
||||
Camera hand tracking runs Google's [MediaPipe](https://github.com/google-ai-edge/mediapipe) Tasks Vision library with its Pose Landmarker (Lite) model, BlazePose GHUM 3D, and its Hand Landmarker model (all Apache-2.0), on frames from AndroidX [CameraX](https://developer.android.com/jetpack/androidx/releases/camera) (Apache-2.0); MediaPipe's usage reports are switched off. The design was checked against [@F8LEFT](https://github.com/F8LEFT)'s [JoyConVr](https://github.com/F8LEFT/JoyConVr) camera app (MIT), and the short Joy-Con movements follow the accelerometer mode of the [Google VR SDK for Unity](https://github.com/googlevr/gvr-unity-sdk)'s arm model, Eric Foxlin's zero-velocity updates and Frosio, Pedersini and Borghese's accelerometer autocalibration, and the camera and Joy-Con are joined by a Kalman filter (R. E. Kalman, 1960). Bare camera hands take their gestures after [ALVR](https://github.com/alvr-org/ALVR)'s `hand_gestures.rs` (MIT) and Meta Quest's menu pinch, with distances checked on photos from the [HaGRID](https://github.com/hukenovs/hagrid) gesture set (CC BY-SA 4.0, not included), fit the palm with Horn's quaternion method (1987) and smooth it with the 1€ filter (Casiez, Roussel and Vogel, 2012); the white glove model follows Valve's OpenVR render model reference and Index controller poses, is meshed with surface nets (Gibson, 1998; Mikola Lysenko) and blends and shades it with Inigo Quilez's smooth minimum and distance-field ambient occlusion, porting his polygon distance (MIT); see [docs/third-party/handtracking](docs/third-party/handtracking/README.md).
|
||||
|
||||
The Store installs and runs apps with [Flatpak](https://github.com/flatpak/flatpak) (LGPL-2.1). Its sandbox goes through DroidDeck's own bubblewrap shim, which follows how Flatpak hands bwrap its environment. Chromium and Electron apps from Flathub start their browser processes through [zypak](https://github.com/refi64/zypak) by [@refi64](https://github.com/refi64) (BSD-3-Clause); its source was read to see that it always spawns them through Flatpak's spawn portal, which is why DroidDeck starts them directly without Chromium's sandbox instead.
|
||||
|
||||
Steam's Browse buttons open a GTK 3 file chooser through PyGObject (LGPL-2.1-or-later). It runs under Steam's own `reaper` with Steam's app ID, which [gamescope](https://github.com/ValveSoftware/gamescope) (BSD-2-Clause) reads from the process tree (`GetAppIdFromReaper` in `src/Utils/Process.cpp`) to show it over Steam.
|
||||
+5
-1
@@ -80,7 +80,7 @@ def sourceCommit = providers.environmentVariable('DROIDDECK_SOURCE_COMMIT').getO
|
||||
def prNumber = (providers.environmentVariable('DROIDDECK_PR_NUMBER').getOrNull() ?: '0').with { it.isInteger() ? it : '0' }
|
||||
def ciBuild = providers.environmentVariable('GITHUB_ACTIONS').getOrNull() == 'true'
|
||||
def releaseSigner = rootProject.file('keystore/release-signer.sha256').text.trim()
|
||||
def commitTime = (gitValue(['show', '-s', '--format=%ct', 'HEAD']) ?: '0').with { it.isLong() ? it : '0' }
|
||||
def commitTime = (gitValue(['show', '-s', '--format=%ct', '--end-of-options', sourceCommit]) ?: '0').with { it.isLong() ? it : '0' }
|
||||
def desktopKde = rootProject.file('tools/desktop-kde/release.env').readLines()
|
||||
.findAll { it.contains('=') && !it.startsWith('#') }
|
||||
.collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] }
|
||||
@@ -220,6 +220,10 @@ android {
|
||||
unitTests.returnDefaultValues = true
|
||||
unitTests.includeAndroidResources = true
|
||||
unitTests.all {
|
||||
if (ciBuild) {
|
||||
outputs.upToDateWhen { false }
|
||||
outputs.doNotCacheIf('CI executes the test suite on every run') { true }
|
||||
}
|
||||
// Robolectric keeps a sandbox per SDK level the tests ask for; seven no longer fit in Gradle's default 512 MB.
|
||||
maxHeapSize = '2g'
|
||||
def logTarget = providers.systemProperty('robolectric.logging').orNull
|
||||
|
||||
@@ -29,11 +29,16 @@
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="false" />
|
||||
|
||||
<queries>
|
||||
<package android:name="com.valvesoftware.steamlink" />
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:localeConfig="@xml/locales_config"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:allowBackup="false"
|
||||
android:allowAudioPlaybackCapture="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme"
|
||||
@@ -44,6 +49,8 @@
|
||||
android:isGame="true">
|
||||
|
||||
<meta-data android:name="android.game_mode_config" android:resource="@xml/game_mode_config" />
|
||||
<activity android:name=".lan.LocalLanActivity" android:exported="false" />
|
||||
<service android:name=".lan.LocalHotspotService" android:exported="false" />
|
||||
<service android:name=".glasses.LumaRgbCaptureService" android:exported="false"
|
||||
android:process=":rgb_diagnostic" />
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest2|quest3|quest3s" />
|
||||
@@ -61,7 +68,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".FrontEndActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|density|keyboard|keyboardHidden|navigation">
|
||||
@@ -83,22 +90,21 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Red Magic Game Space only lists apps whose launcher entry is a real activity, not an alias. -->
|
||||
<activity
|
||||
android:name=".LauncherDark"
|
||||
<activity-alias
|
||||
android:name=".MainActivity"
|
||||
android:targetActivity=".FrontEndActivity"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:exported="true"
|
||||
android:theme="@android:style/Theme.NoDisplay">
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.CAR_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</activity-alias>
|
||||
|
||||
<activity-alias
|
||||
android:name=".LauncherLight"
|
||||
android:targetActivity=".MainActivity"
|
||||
android:targetActivity=".FrontEndActivity"
|
||||
android:icon="@mipmap/ic_launcher_light"
|
||||
android:enabled="false"
|
||||
android:exported="true">
|
||||
|
||||
@@ -8,6 +8,7 @@ add_library(droiddeckwayland SHARED
|
||||
src/sc_layer.c
|
||||
src/ahb_swapchain.c
|
||||
src/waylandcomp_jni.c
|
||||
src/gpu_clock_pin.c
|
||||
src/droiddeck_ext.c
|
||||
src/wl_dmabuf.c
|
||||
src/wl_clipboard.c
|
||||
|
||||
@@ -808,10 +808,14 @@ static uint32_t nominal_refresh_ns(void) {
|
||||
}
|
||||
|
||||
static int64_t presented_ns(int64_t render_ns) {
|
||||
if (!g_tick_vsync_ns || render_ns - g_last_vsync_ns > (int64_t)nominal_refresh_ns() ||
|
||||
render_ns < g_tick_vsync_ns)
|
||||
int64_t tick = g_tick_vsync_ns;
|
||||
int64_t refresh = (int64_t)nominal_refresh_ns();
|
||||
if (!tick || render_ns - g_last_vsync_ns > refresh)
|
||||
return render_ns;
|
||||
return g_tick_vsync_ns;
|
||||
int64_t delta = render_ns - tick;
|
||||
if (delta > refresh || -delta > refresh)
|
||||
return render_ns;
|
||||
return tick;
|
||||
}
|
||||
|
||||
static void feedback_present_all(struct wl_list *list, int64_t t) {
|
||||
|
||||
@@ -238,7 +238,7 @@ static int ensure_ring(uint32_t w, uint32_t h, VkFormat fmt, uint32_t n) {
|
||||
}
|
||||
g_ring_w = w; g_ring_h = h; g_ring_fmt = fmt;
|
||||
LOGD("framegen: generation ring %ux%u x%u", w, h, n);
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -350,6 +350,7 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view,
|
||||
fge_configure((uint32_t)mult, (uint32_t)atomic_load(&g_target), flow, hz,
|
||||
atomic_load(&g_model), atomic_load(&g_preset));
|
||||
}
|
||||
const int size_changed = g_built_w != (uint32_t)w || g_built_h != (uint32_t)h || g_built_fmt != fmt;
|
||||
if (!fge_prepare((uint32_t)w, (uint32_t)h, fmt)) {
|
||||
if (fmt != VK_FORMAT_R8G8B8A8_UNORM && fge_unavailable()) {
|
||||
refuse_format(fmt, kind, w, h, "build its chain");
|
||||
@@ -361,17 +362,25 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (g_built_w != (uint32_t)w || g_built_h != (uint32_t)h || g_built_fmt != fmt) {
|
||||
if (size_changed) {
|
||||
g_built_w = (uint32_t)w; g_built_h = (uint32_t)h; g_built_fmt = fmt;
|
||||
g_generating_logged = 0;
|
||||
}
|
||||
uint32_t want = (uint32_t)(mult - 1);
|
||||
if (!ensure_ring((uint32_t)w, (uint32_t)h, fmt, want)) {
|
||||
const int ring = ensure_ring((uint32_t)w, (uint32_t)h, fmt, want);
|
||||
if (!ring) {
|
||||
if (fmt != VK_FORMAT_R8G8B8A8_UNORM) { refuse_format(fmt, kind, w, h, "make its generation ring"); return 0; }
|
||||
FGLOG("no memory for the generation ring (%dx%d x%u); frame generation stays off", w, h, want);
|
||||
mark_failed(kind);
|
||||
return 0;
|
||||
}
|
||||
/* The ring and the engine's images are new on this frame. Dispatching into them now
|
||||
* null-dereferenced Turnip (vkp_framegen_run, first Steam frame, 2560x1440 to the panel).
|
||||
* Show this frame as it is; generation starts once the size has settled. */
|
||||
if (size_changed || ring == 2) {
|
||||
FGLOG("frame generation catches up at %dx%d; this frame is shown as it is", w, h);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The pacer's source rate must be the game's, not this loop's: a loop slowed by its own
|
||||
* generations would otherwise read as a slower game and justify even more generations. */
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
#include "gpu_clock_pin.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../adrenotools/src/hook/kgsl.h"
|
||||
|
||||
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_t worker;
|
||||
static bool joinable;
|
||||
static atomic_bool running;
|
||||
|
||||
struct pin {
|
||||
int fd;
|
||||
unsigned int context;
|
||||
unsigned int memory;
|
||||
unsigned int timestamp;
|
||||
unsigned long gpuaddr;
|
||||
uint32_t nop;
|
||||
void *commands;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
static struct pin pin = { .fd = -1 };
|
||||
|
||||
static void release_pin(void) {
|
||||
if (pin.context) {
|
||||
struct kgsl_drawctxt_destroy destroy = { .drawctxt_id = pin.context };
|
||||
ioctl(pin.fd, IOCTL_KGSL_DRAWCTXT_DESTROY, &destroy);
|
||||
}
|
||||
if (pin.commands) munmap(pin.commands, pin.size);
|
||||
if (pin.memory) {
|
||||
struct kgsl_gpumem_free_id free_memory = { .id = pin.memory };
|
||||
ioctl(pin.fd, IOCTL_KGSL_GPUMEM_FREE_ID, &free_memory);
|
||||
}
|
||||
if (pin.fd >= 0) close(pin.fd);
|
||||
pin = (struct pin) { .fd = -1 };
|
||||
}
|
||||
|
||||
static bool submit_pin(void) {
|
||||
struct kgsl_command_object object = {
|
||||
.gpuaddr = pin.gpuaddr,
|
||||
.size = 2 * sizeof(uint32_t),
|
||||
.flags = KGSL_CMDLIST_IB,
|
||||
.id = pin.memory,
|
||||
};
|
||||
struct kgsl_gpu_command command = {
|
||||
.flags = KGSL_CMDBATCH_PWR_CONSTRAINT,
|
||||
.cmdlist = (uintptr_t)&object,
|
||||
.cmdsize = sizeof(object),
|
||||
.numcmds = 1,
|
||||
.context_id = pin.context,
|
||||
};
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_GPU_COMMAND, &command) < 0) return false;
|
||||
pin.timestamp = command.timestamp;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool prepare_pin(void) {
|
||||
pin.fd = open("/dev/kgsl-3d0", O_RDWR | O_CLOEXEC);
|
||||
if (pin.fd < 0) return false;
|
||||
struct kgsl_devinfo info = {0};
|
||||
struct kgsl_device_getproperty device_info = {
|
||||
.type = KGSL_PROP_DEVICE_INFO, .value = &info, .sizebytes = sizeof(info),
|
||||
};
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_DEVICE_GETPROPERTY, &device_info) < 0) return false;
|
||||
unsigned int core = info.chip_id >> 24;
|
||||
if (!core) core = info.gpu_id / 100;
|
||||
if (core < 3) { errno = ENODEV; return false; }
|
||||
pin.nop = core >= 5 ? 0x70100001 : 0xc0001000;
|
||||
struct kgsl_drawctxt_create context = {
|
||||
.flags = KGSL_CONTEXT_NO_GMEM_ALLOC | KGSL_CONTEXT_PREAMBLE | KGSL_CONTEXT_PWR_CONSTRAINT,
|
||||
};
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_DRAWCTXT_CREATE, &context) < 0) return false;
|
||||
pin.context = context.drawctxt_id;
|
||||
struct kgsl_device_constraint_pwrlevel level = { .level = KGSL_CONSTRAINT_PWR_MAX };
|
||||
struct kgsl_device_constraint constraint = {
|
||||
.type = KGSL_CONSTRAINT_PWRLEVEL,
|
||||
.context_id = pin.context,
|
||||
.data = &level,
|
||||
.size = sizeof(level),
|
||||
};
|
||||
struct kgsl_device_getproperty property = {
|
||||
.type = KGSL_PROP_PWR_CONSTRAINT,
|
||||
.value = &constraint,
|
||||
.sizebytes = sizeof(constraint),
|
||||
};
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_SETPROPERTY, &property) < 0) return false;
|
||||
struct kgsl_gpumem_alloc_id memory = { .size = 4096 };
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_GPUMEM_ALLOC_ID, &memory) < 0) return false;
|
||||
pin.memory = memory.id;
|
||||
pin.gpuaddr = memory.gpuaddr;
|
||||
pin.size = memory.mmapsize;
|
||||
void *commands = mmap(NULL, pin.size, PROT_READ | PROT_WRITE, MAP_SHARED, pin.fd,
|
||||
(off_t)pin.memory << 12);
|
||||
if (commands == MAP_FAILED) return false;
|
||||
pin.commands = commands;
|
||||
// A3xx/A4xx use type-3 CP_NOP; newer cores use type-7 with zero odd-parity bits.
|
||||
uint32_t *words = commands;
|
||||
words[0] = pin.nop;
|
||||
words[1] = 0;
|
||||
struct kgsl_gpumem_sync_cache sync = { .id = pin.memory, .op = KGSL_GPUMEM_CACHE_CLEAN };
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_GPUMEM_SYNC_CACHE, &sync) < 0) return false;
|
||||
return submit_pin();
|
||||
}
|
||||
|
||||
static void *hold_pin(void *unused) {
|
||||
(void)unused;
|
||||
while (atomic_load(&running)) {
|
||||
struct kgsl_device_waittimestamp_ctxtid wait = {
|
||||
.context_id = pin.context,
|
||||
.timestamp = pin.timestamp,
|
||||
.timeout = 100,
|
||||
};
|
||||
if (ioctl(pin.fd, IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID, &wait) < 0) {
|
||||
if (errno == EINTR || errno == ETIMEDOUT) continue;
|
||||
break;
|
||||
}
|
||||
// Constraints expire after idle_timer (normally 80 ms); renew with a NOP, keeping devfreq alive.
|
||||
usleep(25000);
|
||||
if (atomic_load(&running) && !submit_pin()) break;
|
||||
}
|
||||
if (atomic_exchange(&running, false))
|
||||
__android_log_print(ANDROID_LOG_WARN, "GpuClockPin", "constraint stopped: %s", strerror(errno));
|
||||
release_pin();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool gpu_clock_pin_set(bool on) {
|
||||
pthread_mutex_lock(&lock);
|
||||
if (joinable) {
|
||||
if (on && atomic_load(&running)) {
|
||||
pthread_mutex_unlock(&lock);
|
||||
return true;
|
||||
}
|
||||
atomic_store(&running, false);
|
||||
pthread_join(worker, NULL);
|
||||
joinable = false;
|
||||
}
|
||||
bool ok = true;
|
||||
if (on) {
|
||||
ok = prepare_pin();
|
||||
if (ok) {
|
||||
atomic_store(&running, true);
|
||||
int error = pthread_create(&worker, NULL, hold_pin, NULL);
|
||||
if (error) {
|
||||
atomic_store(&running, false);
|
||||
errno = error;
|
||||
ok = false;
|
||||
} else {
|
||||
joinable = true;
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
int error = errno;
|
||||
release_pin();
|
||||
errno = error;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&lock);
|
||||
return ok;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
bool gpu_clock_pin_set(bool on);
|
||||
@@ -1626,6 +1626,10 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i
|
||||
VkImageLayout result_layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
|
||||
if (fx) {
|
||||
int mapped_w = (int)(scene_w * g_map.kx + 0.5f), mapped_h = (int)(scene_h * g_map.ky + 0.5f);
|
||||
/* Frame generation samples every output pixel. Upscaling first made it interpolate
|
||||
* the whole panel (3200x1440 on a 1440p phone) and rebuild on Steam's first frame.
|
||||
* Grade at the game's size instead; the screen blit still scales to the panel. */
|
||||
if (fg) { mapped_w = scene_w; mapped_h = scene_h; }
|
||||
vkp_effects_set_formats(scene_fmt, scene_fmt);
|
||||
result = vkp_effects_run(cmd, scene_img, scene_w, scene_h, mapped_w, mapped_h, &rw, &rh);
|
||||
result_layout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "effects_chain.h"
|
||||
#include "cardboard.h"
|
||||
#include "droiddeck_color.h"
|
||||
#include "gpu_clock_pin.h"
|
||||
|
||||
extern int droiddeck_wayland_run(void);
|
||||
extern void droiddeck_wayland_set_scale_mode(int mode, int alignment);
|
||||
@@ -634,8 +635,14 @@ Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeTextInputDelete(JNIE
|
||||
extern void adrenotools_set_turbo(bool turbo);
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_droiddeck_launcher_wayland_WaylandCompositor_nativeSetGpuTurbo(JNIEnv *env, jclass clazz, jboolean on) {
|
||||
(void)env; (void)clazz;
|
||||
adrenotools_set_turbo(on == JNI_TRUE);
|
||||
(void)clazz;
|
||||
if (!gpu_clock_pin_set(on == JNI_TRUE)) {
|
||||
int saved_errno = errno;
|
||||
jclass error = (*env)->FindClass(env, "java/lang/IllegalStateException");
|
||||
if (error) (*env)->ThrowNew(env, error, strerror(saved_errno));
|
||||
}
|
||||
// Clear a legacy global pin when recovering its marker after an app upgrade or crash.
|
||||
if (on != JNI_TRUE) adrenotools_set_turbo(false);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
|
||||
@@ -28,6 +28,7 @@ class App : Application() {
|
||||
if (process == "$packageName:vr_recovery" || process == "$packageName:rgb_diagnostic") return
|
||||
CrashHandler.install(this)
|
||||
com.droiddeck.launcher.session.QuestExperimental.initialize(this)
|
||||
com.droiddeck.launcher.session.SessionPrefs.applyNtsyncDefault(this)
|
||||
com.droiddeck.launcher.session.SessionPrefs.settleGpuDriverMode(this)
|
||||
com.droiddeck.launcher.update.AppUpdates.init(this)
|
||||
com.droiddeck.launcher.core.DownloadSource.init(this)
|
||||
|
||||
@@ -55,6 +55,8 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
|
||||
private set
|
||||
private var runtimePending by mutableStateOf(false)
|
||||
private var sessionRunning by mutableStateOf(false)
|
||||
var tpUbwcMode: String by mutableStateOf(SessionPrefs.TP_UBWC_AUTO)
|
||||
private set
|
||||
|
||||
val uiMode: String get() = when (mode) {
|
||||
SessionPrefs.GPU_DRIVERS_AUTO -> GPU_MODE_AUTO
|
||||
@@ -73,8 +75,16 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
|
||||
mode = uiMode, display = displaySlot(), runtime = runtimeSlot(),
|
||||
canRestart = !sessionRunning,
|
||||
checkedAt = TurnipReleases.cached(activity)?.checkedAt ?: 0L,
|
||||
tpUbwcMode = tpUbwcMode.takeIf { gpu.model == 740 },
|
||||
tpUbwcRestartRequired = com.droiddeck.launcher.gpu.TpUbwcHint.restartRequired(activity),
|
||||
)
|
||||
|
||||
fun chooseTpUbwcMode(mode: String) {
|
||||
if (gpu.model != 740) return
|
||||
SessionPrefs.setTpUbwcMode(activity, mode)
|
||||
tpUbwcMode = mode
|
||||
}
|
||||
|
||||
private fun slotSource(chosenDefault: Boolean, defaultLabel: Int): String = activity.getString(when {
|
||||
uiMode == GPU_MODE_AUTO -> R.string.gpu_src_auto
|
||||
uiMode == GPU_MODE_PAIR && pairRows.any { it.active } -> R.string.gpu_src_pair
|
||||
@@ -124,6 +134,7 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
|
||||
var androidSelected by mutableStateOf("")
|
||||
|
||||
fun refreshDrivers() {
|
||||
tpUbwcMode = SessionPrefs.tpUbwcMode(activity)
|
||||
val lm = LinuxVulkanDriverManager(activity)
|
||||
fun origin(id: String) = if (TurnipReleases.isDownloaded(activity, id)) DriverRow.DOWNLOADED else DriverRow.IMPORTED
|
||||
val bundles = DriverBundle.all(activity)
|
||||
|
||||
+48
-14
@@ -80,7 +80,7 @@ import com.droiddeck.launcher.session.GameStorage
|
||||
import com.droiddeck.launcher.input.SecondScreenDisplay
|
||||
import com.droiddeck.launcher.input.SecondScreenDisplays
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
class FrontEndActivity : ComponentActivity() {
|
||||
override fun attachBaseContext(newBase: android.content.Context) {
|
||||
super.attachBaseContext(newBase)
|
||||
com.droiddeck.launcher.core.AppLanguage.applyTo(this, newBase)
|
||||
@@ -120,6 +120,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var glThread by mutableStateOf(true)
|
||||
private var noGlError by mutableStateOf(true)
|
||||
private var returnAfterGame by mutableStateOf(true)
|
||||
private var shaderPrecache by mutableStateOf<Boolean?>(null)
|
||||
private var steamRepairQueued by mutableStateOf(false)
|
||||
private var mangoapp by mutableStateOf(true)
|
||||
private var steamController by mutableStateOf(SessionPrefs.CONTROLLER_DECK)
|
||||
@@ -154,6 +155,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var gpuClockPin by mutableStateOf(false)
|
||||
private var prootNoSeccomp by mutableStateOf(false)
|
||||
private var prootFastPath by mutableStateOf(true)
|
||||
private var cursorComposite by mutableStateOf(false)
|
||||
private var guestHostname by mutableStateOf(SessionPrefs.DEFAULT_GUEST_HOSTNAME)
|
||||
private var phantomWarning by mutableStateOf<String?>(null)
|
||||
private var phantomProcessStatus by mutableStateOf(PhantomProcessStatus.NOT_APPLICABLE)
|
||||
@@ -161,7 +163,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var directAudio by mutableStateOf(false)
|
||||
private var picturePosition by mutableStateOf("center")
|
||||
private var stretch16x9 by mutableStateOf(false)
|
||||
private var orientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
|
||||
private var orientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
|
||||
private var launcherFullscreen by mutableStateOf(true)
|
||||
private var downloadSource by mutableStateOf(DownloadSource.MODE_AUTO)
|
||||
private var downloadMirror by mutableStateOf("")
|
||||
@@ -542,12 +544,12 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME)
|
||||
.putExtra(SessionActivity.EXTRA_STEAMVR, steamVr)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.returnTo(returnHome)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP))
|
||||
return true
|
||||
}
|
||||
return startSession(Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.returnTo(returnHome)
|
||||
.apply {
|
||||
if (game.gameIdString == com.droiddeck.launcher.gpu.SteamVr.APP_ID) {
|
||||
putExtra(SessionActivity.EXTRA_STEAMVR, true)
|
||||
@@ -558,6 +560,12 @@ class MainActivity : ComponentActivity() {
|
||||
}, steamSession = true)
|
||||
}
|
||||
|
||||
private fun Intent.returnTo(returnHome: Boolean): Intent {
|
||||
val task = taskId
|
||||
return putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.apply { if (returnHome) putExtra(SessionActivity.EXTRA_LINK_TASK, task) }
|
||||
}
|
||||
|
||||
private fun launchWithoutSteam(game: Library.SteamGame, returnHome: Boolean): Boolean {
|
||||
val app = applicationContext
|
||||
Thread({
|
||||
@@ -571,7 +579,7 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
com.droiddeck.launcher.session.NoSteamLaunch.remember(command)
|
||||
val next = Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.returnTo(returnHome)
|
||||
.putExtra(SessionService.EXTRA_MODE, SessionService.MODE_RUN)
|
||||
.putExtra(SessionService.EXTRA_PROGRAM, command.program)
|
||||
.putExtra(SessionService.EXTRA_PROGRAM_ARGS, command.args.toTypedArray())
|
||||
@@ -580,7 +588,7 @@ class MainActivity : ComponentActivity() {
|
||||
SessionState.stopRequested -> android.widget.Toast.makeText(this, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show()
|
||||
SessionState.mode == SessionService.MODE_RUN && SessionState.program == command.program && SessionState.programArgs == command.args ->
|
||||
startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.returnTo(returnHome)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP))
|
||||
else -> pendingSwitch = next
|
||||
}
|
||||
@@ -697,7 +705,7 @@ class MainActivity : ComponentActivity() {
|
||||
else {
|
||||
switchPoll = null
|
||||
switchingTo = null
|
||||
android.widget.Toast.makeText(this@MainActivity, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show()
|
||||
android.widget.Toast.makeText(this@FrontEndActivity, R.string.game_link_session_busy, android.widget.Toast.LENGTH_LONG).show()
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -755,6 +763,7 @@ class MainActivity : ComponentActivity() {
|
||||
downloadPrefix = DownloadSource.custom(this)
|
||||
DownloadSource.probe()
|
||||
animationsEnabled = SessionPrefs.animationsEnabled(this)
|
||||
LauncherIcon.repair(this, intent?.component)
|
||||
launcherIcon = LauncherIcon.current(this)
|
||||
gameStoresEnabled = SessionPrefs.gameStoresEnabled(this)
|
||||
gameStoresSpeedTier = SessionPrefs.gameStoresSpeedTier(this)
|
||||
@@ -1035,7 +1044,7 @@ class MainActivity : ComponentActivity() {
|
||||
onWirelessAdbPair = { host, port, code, complete ->
|
||||
Thread({
|
||||
val result = runCatching {
|
||||
kotlinx.coroutines.runBlocking { WirelessAdbFix.pair(this@MainActivity, host, port, code) }
|
||||
kotlinx.coroutines.runBlocking { WirelessAdbFix.pair(this@FrontEndActivity, host, port, code) }
|
||||
}
|
||||
val error = result.exceptionOrNull()?.let { it.localizedMessage ?: getString(R.string.main_wadb_pair_failed) }
|
||||
ui.post { complete(error) }
|
||||
@@ -1043,13 +1052,13 @@ class MainActivity : ComponentActivity() {
|
||||
},
|
||||
onFindWirelessAdbPort = { host, complete ->
|
||||
Thread({
|
||||
val port = WirelessAdbFix.findConnectPort(this@MainActivity, host)
|
||||
val port = WirelessAdbFix.findConnectPort(this@FrontEndActivity, host)
|
||||
ui.post { complete(port) }
|
||||
}, "wireless-adb-discovery").start()
|
||||
},
|
||||
onWirelessAdbApply = { host, port, enabled, complete ->
|
||||
Thread({
|
||||
val result = runCatching { WirelessAdbFix.setChildProcessLimit(this@MainActivity, host, port, enabled) }
|
||||
val result = runCatching { WirelessAdbFix.setChildProcessLimit(this@FrontEndActivity, host, port, enabled) }
|
||||
val error = result.exceptionOrNull()?.let { it.localizedMessage ?: getString(R.string.main_wadb_command_failed) }
|
||||
ui.post {
|
||||
if (error == null) refreshPhantomStatus()
|
||||
@@ -1059,7 +1068,7 @@ class MainActivity : ComponentActivity() {
|
||||
},
|
||||
onSetPhantomProcessLimit = { enabled, complete ->
|
||||
Thread({
|
||||
val result = runCatching { WirelessAdbFix.setUsingSavedPairing(this@MainActivity, enabled) }
|
||||
val result = runCatching { WirelessAdbFix.setUsingSavedPairing(this@FrontEndActivity, enabled) }
|
||||
val error = result.exceptionOrNull()?.let { it.localizedMessage ?: getString(R.string.main_wadb_unavailable) }
|
||||
ui.post {
|
||||
if (error == null) refreshPhantomStatus()
|
||||
@@ -1115,7 +1124,7 @@ class MainActivity : ComponentActivity() {
|
||||
showNonAdreno?.let { release ->
|
||||
ConfirmDialog(
|
||||
title = androidx.compose.ui.res.stringResource(R.string.main_non_adreno_title),
|
||||
text = androidx.compose.ui.res.stringResource(R.string.main_non_adreno_text, com.droiddeck.launcher.core.DeviceSupport.gpuName(this@MainActivity), release.size / 1e6),
|
||||
text = androidx.compose.ui.res.stringResource(R.string.main_non_adreno_text, com.droiddeck.launcher.core.DeviceSupport.gpuName(this@FrontEndActivity), release.size / 1e6),
|
||||
confirm = androidx.compose.ui.res.stringResource(R.string.main_install_anyway),
|
||||
onConfirm = { showNonAdreno = null; install(release) },
|
||||
onDismiss = { showNonAdreno = null },
|
||||
@@ -1508,6 +1517,7 @@ class MainActivity : ComponentActivity() {
|
||||
onRestoreBundled = { TurnipDriver(this).restoreBundled(); drivers.refreshDrivers() },
|
||||
onMode = { m -> drivers.chooseMode(m) },
|
||||
onRestart = { drivers.restartApp() },
|
||||
onTpUbwcMode = { drivers.chooseTpUbwcMode(it) },
|
||||
),
|
||||
protons = com.droiddeck.launcher.ui.ProtonsState(
|
||||
rows = protons.protonRows, busyId = protons.protonBusyId, stage = protons.protonStage, percent = protons.protonPercent,
|
||||
@@ -1633,6 +1643,7 @@ class MainActivity : ComponentActivity() {
|
||||
syncBackend = if (mode == SessionService.MODE_STEAM) SessionPrefs.syncBackendOf(fastSync, fsyncFirst, syncFallback) else null,
|
||||
steamClientArch = if (mode == SessionService.MODE_STEAM) steamClientArch else null,
|
||||
returnAfterGame = if (mode == SessionService.MODE_STEAM) returnAfterGame else null,
|
||||
shaderPrecache = if (mode == SessionService.MODE_STEAM) shaderPrecache else null,
|
||||
steamRepairQueued = steamRepairQueued,
|
||||
mangoapp = mangoapp,
|
||||
steamController = if (mode == SessionService.MODE_STEAM) steamController else null,
|
||||
@@ -1719,9 +1730,15 @@ class MainActivity : ComponentActivity() {
|
||||
syncFallback = SessionPrefs.syncFallback(this)
|
||||
},
|
||||
onSteamRepair = { steamRepairQueued = SteamRepair.queue(this) },
|
||||
onSteamClientArch = { id -> SessionPrefs.setSteamClientArch(this, id); steamClientArch = id; refresh() },
|
||||
onSteamClientArch = { id ->
|
||||
SessionPrefs.setSteamClientArch(this, id)
|
||||
steamClientArch = id
|
||||
loadShaderPrecache(mode)
|
||||
refresh()
|
||||
},
|
||||
onMangoapp = { on -> SessionPrefs.setMangoapp(this, on); mangoapp = on },
|
||||
onReturnAfterGame = { on -> SessionPrefs.setReturnAfterGame(this, on); returnAfterGame = on },
|
||||
onShaderPrecache = { on -> SessionPrefs.setShaderPrecache(this, on); shaderPrecache = on },
|
||||
onSteamController = { id -> SessionPrefs.setSteamController(this, id); steamController = id },
|
||||
onRunSteamAtStartup = { on ->
|
||||
SessionPrefs.setRunSteamAtStartup(this, on)
|
||||
@@ -1762,7 +1779,8 @@ class MainActivity : ComponentActivity() {
|
||||
fsyncFirst = fsyncFirst,
|
||||
gamescopeRealtime = gamescopeRealtime,
|
||||
gpuClockPin = gpuClockPin,
|
||||
prootNoSeccomp = prootNoSeccomp, prootFastPath = prootFastPath, guestHostname = guestHostname, phantomWarning = phantomWarning,
|
||||
prootNoSeccomp = prootNoSeccomp, prootFastPath = prootFastPath, cursorComposite = cursorComposite,
|
||||
guestHostname = guestHostname, phantomWarning = phantomWarning,
|
||||
onClientOverride = { on -> SessionPrefs.setClientCpusOverride(this, on); clientOverride = on },
|
||||
onTuSysmem = { on -> SessionPrefs.setTuSysmem(this, on); tuSysmem = on },
|
||||
onZinkLazy = { on -> SessionPrefs.setZinkLazy(this, on); zinkLazy = on },
|
||||
@@ -1776,6 +1794,7 @@ class MainActivity : ComponentActivity() {
|
||||
onGpuClockPin = { on -> SessionPrefs.setGpuClockPin(this, on); gpuClockPin = on },
|
||||
onProotNoSeccomp = { on -> SessionPrefs.setProotNoSeccomp(this, on); prootNoSeccomp = on },
|
||||
onProotFastPath = { on -> SessionPrefs.setProotFastPath(this, on); prootFastPath = on },
|
||||
onCursorComposite = { on -> SessionPrefs.setCursorComposite(this, on); cursorComposite = on },
|
||||
onGuestHostname = { name -> SessionPrefs.setGuestHostname(this, name) },
|
||||
onClientCore = { core, on ->
|
||||
clientCores = if (on) clientCores + core else clientCores - core
|
||||
@@ -1876,6 +1895,19 @@ class MainActivity : ComponentActivity() {
|
||||
private var pipAutoEnter by mutableStateOf(false)
|
||||
private var unfoldedControls by mutableStateOf(false)
|
||||
private var unfoldedControlsWithController by mutableStateOf(false)
|
||||
private var shaderPrecacheGeneration = 0
|
||||
|
||||
private fun loadShaderPrecache(mode: String) {
|
||||
val generation = ++shaderPrecacheGeneration
|
||||
shaderPrecache = null
|
||||
if (mode != SessionService.MODE_STEAM) return
|
||||
Thread({
|
||||
val precache = SessionPrefs.shaderPrecache(this)
|
||||
ui.post {
|
||||
if (!isDestroyed && generation == shaderPrecacheGeneration) shaderPrecache = precache
|
||||
}
|
||||
}, "shader-precache").start()
|
||||
}
|
||||
|
||||
private fun loadModeSettings(mode: String) {
|
||||
pipAutoEnter = SessionPrefs.pipAutoEnter(this)
|
||||
@@ -1891,6 +1923,7 @@ class MainActivity : ComponentActivity() {
|
||||
steamRepairQueued = SteamRepair.queued(this)
|
||||
mangoapp = SessionPrefs.mangoapp(this)
|
||||
returnAfterGame = SessionPrefs.returnAfterGame(this)
|
||||
loadShaderPrecache(mode)
|
||||
steamController = SessionPrefs.steamController(this)
|
||||
runSteamAtStartup = SessionPrefs.runSteamAtStartup(this)
|
||||
loadBootMovie()
|
||||
@@ -1957,6 +1990,7 @@ class MainActivity : ComponentActivity() {
|
||||
gpuClockPin = SessionPrefs.gpuClockPin(this)
|
||||
prootNoSeccomp = SessionPrefs.prootNoSeccomp(this)
|
||||
prootFastPath = SessionPrefs.prootFastPath(this)
|
||||
cursorComposite = SessionPrefs.cursorComposite(this)
|
||||
guestHostname = SessionPrefs.guestHostname(this)
|
||||
refreshPhantomStatus()
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class HomeActivity : Activity() {
|
||||
.setAction(SessionService.ACTION_HOME_GUIDE)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
} else {
|
||||
Intent(this, MainActivity::class.java)
|
||||
Intent(this, FrontEndActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
}
|
||||
startActivity(destination)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
|
||||
class LauncherDark : Activity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
startActivity(Intent(intent).setClass(this, MainActivity::class.java)
|
||||
.setFlags(intent.flags and (Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK).inv()))
|
||||
finish()
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ object LauncherIcon {
|
||||
const val DARK = "dark"
|
||||
const val LIGHT = "light"
|
||||
|
||||
private val aliases = linkedMapOf(DARK to "com.droiddeck.launcher.LauncherDark", LIGHT to "com.droiddeck.launcher.LauncherLight")
|
||||
private val aliases = linkedMapOf(DARK to "com.droiddeck.launcher.MainActivity", LIGHT to "com.droiddeck.launcher.LauncherLight")
|
||||
|
||||
val options: List<Pair<String, Int>> = listOf(
|
||||
DARK to R.string.setup_launcher_icon_dark,
|
||||
@@ -29,6 +29,12 @@ object LauncherIcon {
|
||||
|
||||
fun activity(context: Context): ComponentName = component(context, current(context))
|
||||
|
||||
fun repair(context: Context, launchedFrom: ComponentName?) {
|
||||
if (!enabled(context, DARK) || !enabled(context, LIGHT) || launchedFrom == component(context, DARK)) return
|
||||
context.packageManager.setComponentEnabledSetting(component(context, DARK),
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP)
|
||||
}
|
||||
|
||||
fun set(context: Context, style: String) {
|
||||
if (style !in aliases || style == current(context)) return
|
||||
val pm = context.packageManager
|
||||
|
||||
@@ -329,6 +329,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private var glassesSettings by mutableStateOf(Glasses.settings.value)
|
||||
private var glassesScreen: GlassesScreen? = null
|
||||
private var glassesOutputActive by mutableStateOf(false)
|
||||
private var pausedFrame by mutableStateOf<com.droiddeck.launcher.ui.PausedFrame?>(null)
|
||||
private var pausedFrameWanted = false
|
||||
private var trackingRecovery by mutableStateOf<TrackingRecovery?>(null)
|
||||
private var glasses3dForVr = false
|
||||
private var ended = false
|
||||
@@ -1013,9 +1015,20 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
SessionAchievements(inFront.game, inFront.title, onClose = ::closeAchievements)
|
||||
}
|
||||
com.droiddeck.launcher.ui.AchievementNotificationOverlay()
|
||||
if (SessionState.suspended) SessionPausedOverlay(
|
||||
// Auto and Native resume on their own as the session comes back; only a failed resume needs the button.
|
||||
val autoResume = suspendPolicy == SessionPrefs.SUSPEND_AUTO || suspendPolicy == SessionPrefs.SUSPEND_NATIVE
|
||||
SessionPausedOverlay(
|
||||
suspended = SessionState.suspended && (!autoResume || SessionState.resumeFailed),
|
||||
engaged = SessionState.resumeRequested || SessionState.resuming,
|
||||
failures = SessionState.resumeFailures,
|
||||
frame = pausedFrame,
|
||||
title = pausedTitle(),
|
||||
onResume = { SessionService.resume(this@SessionActivity) },
|
||||
onFrameNeeded = ::requestPausedFrame,
|
||||
onHidden = {
|
||||
pausedFrame = null
|
||||
pausedFrameWanted = false
|
||||
},
|
||||
)
|
||||
if (leaving) com.droiddeck.launcher.ui.FloodSpread(
|
||||
com.droiddeck.launcher.ui.LocalPalette.current.signal,
|
||||
@@ -1693,7 +1706,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
com.droiddeck.launcher.gpu.DriverSetupLog.write(this, "compositor.start driver=$driverId")
|
||||
CompositorHost.startOrAttach(
|
||||
holder.surface, runtimeDir.path,
|
||||
this, holder.surface, runtimeDir.path,
|
||||
driverId?.let { turnip.driverPath(it) }, driverId?.let { turnip.libraryName(it) },
|
||||
applicationInfo.nativeLibraryDir, size.first, size.second, refreshHz(), outputFpsLimit(),
|
||||
)
|
||||
@@ -1913,6 +1926,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
SessionState.relaunch?.let { next ->
|
||||
SessionState.relaunch = null
|
||||
next.putExtra(EXTRA_RETURN_HOME, intent.getBooleanExtra(EXTRA_RETURN_HOME, false))
|
||||
next.putExtra(EXTRA_LINK_TASK, intent.getIntExtra(EXTRA_LINK_TASK, -1))
|
||||
setIntent(next)
|
||||
recreate()
|
||||
return@runOnUiThread
|
||||
@@ -2860,6 +2874,50 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
if (down || code !in gestureKeysDown) WaylandCompositor.nativeSendKey(code, if (down) 1 else 0)
|
||||
}
|
||||
|
||||
// The frozen game cannot draw again, so the paused overlay shows a copy taken while the surface still holds its frame.
|
||||
private fun capturePausedFrame() {
|
||||
if (!SessionState.running || pipUi || isInPictureInPictureMode || glassesOutputActive) return
|
||||
if (SessionState.suspended && pausedFrame != null) return
|
||||
if (suspendPolicy == SessionPrefs.SUSPEND_NEVER || !::surfaceView.isInitialized) return
|
||||
if (surfaceView.holder.surface?.isValid != true) return
|
||||
val width = surfaceView.width
|
||||
val height = surfaceView.height
|
||||
if (width <= 0 || height <= 0) return
|
||||
val scale = minOf(1f, PAUSED_FRAME_MAX_EDGE / maxOf(width, height).toFloat())
|
||||
val bitmap = try {
|
||||
android.graphics.Bitmap.createBitmap(
|
||||
maxOf(1, (width * scale).toInt()), maxOf(1, (height * scale).toInt()), android.graphics.Bitmap.Config.ARGB_8888,
|
||||
)
|
||||
} catch (_: OutOfMemoryError) {
|
||||
return
|
||||
}
|
||||
val surfaceAt = IntArray(2).also { surfaceView.getLocationInWindow(it) }
|
||||
val overlayAt = IntArray(2).also { sessionOverlay.getLocationInWindow(it) }
|
||||
val left = surfaceAt[0] - overlayAt[0]
|
||||
val top = surfaceAt[1] - overlayAt[1]
|
||||
val bounds = android.graphics.Rect(left, top, left + width, top + height)
|
||||
try {
|
||||
android.view.PixelCopy.request(surfaceView, bitmap, { result ->
|
||||
if (result == android.view.PixelCopy.SUCCESS && !isDestroyed) {
|
||||
pausedFrame = com.droiddeck.launcher.ui.PausedFrame(bitmap.asImageBitmap(), bounds)
|
||||
pausedFrameWanted = false
|
||||
} else {
|
||||
bitmap.recycle()
|
||||
}
|
||||
}, uiHandler)
|
||||
} catch (_: IllegalArgumentException) {
|
||||
bitmap.recycle()
|
||||
}
|
||||
}
|
||||
|
||||
// Sessions that froze from picture-in-picture, or before onPause could copy a frame, have none; the
|
||||
// compositor shows the frozen frame again once its output is back, so copy it from there.
|
||||
private fun requestPausedFrame() {
|
||||
if (pausedFrame != null) return
|
||||
pausedFrameWanted = true
|
||||
if (resumed && surfaceW > 0) capturePausedFrame()
|
||||
}
|
||||
|
||||
private fun pipBounds(): android.graphics.Rect {
|
||||
val rect = android.graphics.Rect()
|
||||
if (!::surfaceView.isInitialized || !surfaceView.getGlobalVisibleRect(rect)) return rect
|
||||
@@ -2970,6 +3028,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
return
|
||||
}
|
||||
if (this.intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) intent.putExtra(EXTRA_RETURN_HOME, true)
|
||||
if (!intent.hasExtra(EXTRA_LINK_TASK)) intent.putExtra(EXTRA_LINK_TASK, this.intent.getIntExtra(EXTRA_LINK_TASK, -1))
|
||||
setIntent(intent)
|
||||
if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) {
|
||||
SessionState.steamVr = true
|
||||
@@ -2990,6 +3049,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
applyFollowOrientation(resources.configuration)
|
||||
if (runtimeRemovalBlocked) return
|
||||
if (!SessionState.suspended) pausedFrame = null
|
||||
com.droiddeck.launcher.ui.Motion.refresh(this)
|
||||
refreshHomeApp()
|
||||
if (intent?.action == SessionService.ACTION_RESUME) {
|
||||
@@ -3015,6 +3075,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
override fun onPause() {
|
||||
if (runtimeRemovalBlocked) { super.onPause(); return }
|
||||
capturePausedFrame()
|
||||
sessionClipboard.stop()
|
||||
if (::touchscreenGestures.isInitialized) touchscreenGestures.cancel()
|
||||
if (::touchpad.isInitialized) touchpad.cancel()
|
||||
@@ -3253,6 +3314,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
surfaceView.visibility = if (glassesOutputActive) View.INVISIBLE else View.VISIBLE
|
||||
Log.i(TAG, "compositor output attached: " +
|
||||
if (glassesOutputActive) "glasses display ${glassesScreen?.display?.displayId}" else "phone")
|
||||
if (pausedFrameWanted) uiHandler.postDelayed({
|
||||
if (pausedFrameWanted && pausedFrame == null && resumed) capturePausedFrame()
|
||||
}, PAUSED_FRAME_REDRAW_MS)
|
||||
}
|
||||
|
||||
private fun restorePhoneOutput(screen: GlassesScreen) {
|
||||
@@ -3487,17 +3551,33 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
return
|
||||
}
|
||||
super.finish()
|
||||
if (!closeAtOnce && intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) {
|
||||
com.droiddeck.launcher.ui.QuitFlood.take()
|
||||
com.droiddeck.launcher.ui.LaunchOrigin.flooding = null
|
||||
startActivity(Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
}
|
||||
closeLinkTasks()
|
||||
if (!isTaskRoot) moveTaskToBack(true)
|
||||
super.finishAndRemoveTask()
|
||||
} else super.finish()
|
||||
if (quitFlooded) overridePendingTransition(0, 0)
|
||||
else overridePendingTransition(R.anim.session_hold, R.anim.session_sink)
|
||||
}
|
||||
|
||||
private fun closeLinkTasks() {
|
||||
val linkTask = intent.getIntExtra(EXTRA_LINK_TASK, -1)
|
||||
if (linkTask == -1) return
|
||||
val tasks = runCatching { getSystemService(android.app.ActivityManager::class.java)?.appTasks }.getOrNull().orEmpty()
|
||||
for (task in tasks) {
|
||||
runCatching {
|
||||
val info = task.taskInfo
|
||||
@Suppress("DEPRECATION")
|
||||
val id = if (android.os.Build.VERSION.SDK_INT >= 29) info.taskId else info.persistentId
|
||||
val base = info.baseIntent
|
||||
if (id == linkTask && base.component?.className == FrontEndActivity::class.java.name &&
|
||||
com.droiddeck.launcher.frontend.GameLaunchIntent.accepts(base.action)) task.finishAndRemoveTask()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun completeLeave() {
|
||||
if (isFinishing) return
|
||||
val signal = com.droiddeck.launcher.ui.Themes.current(this).signal
|
||||
@@ -3509,9 +3589,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
companion object {
|
||||
const val EXTRA_RETURN_HOME = "returnHome"
|
||||
const val EXTRA_LINK_TASK = "linkTask"
|
||||
const val EXTRA_STEAMVR = "steamVr"
|
||||
const val EXTRA_REPAIR_RUNTIME = "repairRuntime"
|
||||
private const val LEAVE_TIMEOUT_MS = 1_500L
|
||||
private const val PAUSED_FRAME_MAX_EDGE = 1920f
|
||||
private const val PAUSED_FRAME_REDRAW_MS = 150L
|
||||
private const val TAG = "SessionActivity"
|
||||
private var startedScreens = 0
|
||||
private const val FEX_MISSING = "droiddeck-fex: x86 Linux programs need"
|
||||
|
||||
@@ -17,6 +17,8 @@ public class DirectAudioRelayComponent extends SessionPart {
|
||||
private File logFile;
|
||||
private final File micFifoPath;
|
||||
private volatile int pid = -1;
|
||||
private final Object micLock = new Object();
|
||||
private boolean micHot;
|
||||
|
||||
public DirectAudioRelayComponent(File socketPath, File micFifoPath) {
|
||||
this.socketPath = socketPath;
|
||||
@@ -30,6 +32,9 @@ public class DirectAudioRelayComponent extends SessionPart {
|
||||
@Override
|
||||
public void start() {
|
||||
stop();
|
||||
synchronized (micLock) {
|
||||
micHot = false;
|
||||
}
|
||||
File binary = new File(app().getApplicationInfo().nativeLibraryDir, BINARY);
|
||||
if (!binary.isFile()) {
|
||||
Log.w(TAG, "helper missing at " + binary + "; DirectAudio will report itself unavailable");
|
||||
@@ -79,12 +84,40 @@ public class DirectAudioRelayComponent extends SessionPart {
|
||||
app().getFilesDir(), null,
|
||||
line -> {
|
||||
Log.i(TAG, line);
|
||||
trackMic(line);
|
||||
if (log != null) synchronized (log) { log.println(line); log.flush(); }
|
||||
});
|
||||
Log.i(TAG, "started pid=" + pid + " socket=" + socketPath
|
||||
+ (micFifoPath != null ? " mic=" + micFifoPath : " (no microphone)"));
|
||||
}
|
||||
|
||||
private void trackMic(String line) {
|
||||
boolean start = line.startsWith("DA-Relay: mic start ");
|
||||
if (!start && !line.startsWith("DA-Relay: mic stop ")) return;
|
||||
synchronized (micLock) {
|
||||
micHot = start;
|
||||
micLock.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
// Android keeps the input stream's wake lock while a frozen helper still has it started.
|
||||
public boolean awaitMicReleased(long timeoutMs) {
|
||||
long deadline = System.currentTimeMillis() + timeoutMs;
|
||||
synchronized (micLock) {
|
||||
while (micHot) {
|
||||
long left = deadline - System.currentTimeMillis();
|
||||
if (left <= 0) return false;
|
||||
try {
|
||||
micLock.wait(left);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if (pid != -1) {
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class PulseAudioComponent extends SessionPart {
|
||||
private static final String TAG = "PulseAudio";
|
||||
public static final String SOCKET_NAME = "PS0";
|
||||
private static final String MIC_SOURCE = "DirectAudioMic";
|
||||
private static final String BUNDLE_STAMP = "2026-10-08-pa13-directaudio-native";
|
||||
|
||||
|
||||
@@ -97,9 +98,9 @@ public class PulseAudioComponent extends SessionPart {
|
||||
config.add("set-default-sink DirectAudio");
|
||||
config.add(".fail");
|
||||
if (micFifoPath != null && !micFifoPath.isEmpty()) {
|
||||
config.add("load-module module-pipe-source source_name=DirectAudioMic file=\""
|
||||
config.add("load-module module-pipe-source source_name=" + MIC_SOURCE + " file=\""
|
||||
+ micFifoPath + "\" format=s16le rate=48000 channels=1");
|
||||
config.add("set-default-source DirectAudioMic");
|
||||
config.add("set-default-source " + MIC_SOURCE);
|
||||
}
|
||||
FileUtils.writeString(new File(workingDir, "default.pa"), String.join("\n", config));
|
||||
|
||||
@@ -202,16 +203,24 @@ public class PulseAudioComponent extends SessionPart {
|
||||
}
|
||||
|
||||
public boolean setSinkSuspended(boolean suspended) {
|
||||
return suspend("sink", "@DEFAULT_SINK@", suspended);
|
||||
}
|
||||
|
||||
public boolean setMicSuspended(boolean suspended) {
|
||||
return micFifoPath == null || micFifoPath.isEmpty() || suspend("source", MIC_SOURCE, suspended);
|
||||
}
|
||||
|
||||
private boolean suspend(String kind, String name, boolean suspended) {
|
||||
File pactl = new File(workingDir, "pactl");
|
||||
if (!pactl.isFile() || pid <= 1) {
|
||||
Log.w(TAG, "cannot change sink state: PulseAudio control client or server unavailable");
|
||||
Log.w(TAG, "cannot change " + kind + " state: PulseAudio control client or server unavailable");
|
||||
return false;
|
||||
}
|
||||
java.lang.Process process = null;
|
||||
try {
|
||||
File modules = new File(workingDir, "modules/arm64");
|
||||
ProcessBuilder builder = new ProcessBuilder(
|
||||
pactl.getAbsolutePath(), "suspend-sink", "@DEFAULT_SINK@", Boolean.toString(suspended));
|
||||
pactl.getAbsolutePath(), "suspend-" + kind, name, Boolean.toString(suspended));
|
||||
builder.directory(workingDir);
|
||||
builder.redirectErrorStream(true);
|
||||
builder.redirectOutput(new File("/dev/null"));
|
||||
@@ -222,18 +231,18 @@ public class PulseAudioComponent extends SessionPart {
|
||||
process = builder.start();
|
||||
if (!process.waitFor(5, TimeUnit.SECONDS)) {
|
||||
process.destroyForcibly();
|
||||
Log.w(TAG, "timed out changing sink state to suspended=" + suspended);
|
||||
Log.w(TAG, "timed out changing " + kind + " state to suspended=" + suspended);
|
||||
return false;
|
||||
}
|
||||
int status = process.exitValue();
|
||||
if (status != 0) Log.w(TAG, "sink state change failed with exit " + status);
|
||||
if (status != 0) Log.w(TAG, kind + " state change failed with exit " + status);
|
||||
return status == 0;
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
Log.w(TAG, "interrupted changing sink state", e);
|
||||
Log.w(TAG, "interrupted changing " + kind + " state", e);
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "could not change sink state", e);
|
||||
Log.w(TAG, "could not change " + kind + " state", e);
|
||||
return false;
|
||||
} finally {
|
||||
if (process != null && process.isAlive()) process.destroyForcibly();
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.gpu.SocNames
|
||||
|
||||
object CpuAllocationDefaults {
|
||||
data class Allocation(val client: String, val game: String)
|
||||
|
||||
val device: Allocation? by lazy {
|
||||
forDevice(SocNames.model(), GpuInfo.systemProperty("ro.board.platform"),
|
||||
CpuCores.all.associateWith(CpuCores::maxGhz))
|
||||
}
|
||||
|
||||
fun forDevice(model: String, platform: String, frequencies: Map<Int, Double?>): Allocation? {
|
||||
val chip = model.trim().uppercase().substringBefore('-')
|
||||
val gen2 = chip in setOf("SM8550", "QCS8550") ||
|
||||
(chip.isEmpty() && platform.trim().equals("kalama", ignoreCase = true))
|
||||
if (!gen2 || frequencies.size != 8 || frequencies.keys.any { it < 0 } ||
|
||||
frequencies.values.any { it == null || !it.isFinite() || it <= 0.0 }) return null
|
||||
val clusters = frequencies.entries.groupBy { it.value }.toSortedMap(compareBy { it ?: 0.0 }).values.toList()
|
||||
if (clusters.map { it.size } != listOf(3, 4, 1)) return null
|
||||
return Allocation(
|
||||
client = CpuCores.format(clusters[2].map { it.key }.toSet()),
|
||||
game = CpuCores.format(clusters[1].map { it.key }.toSet()),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -152,13 +152,17 @@ object DeviceReport {
|
||||
k("RAM total", FileUtils.sizeToString(mi.totalMem))
|
||||
k("RAM available", FileUtils.sizeToString(mi.availMem))
|
||||
}
|
||||
runCatching {
|
||||
val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) k("Thermal status", thermalStatusName(pm.currentThermalStatus))
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
k("Thermal headroom (10 s)", pm.getThermalHeadroom(10).let { if (it.isNaN()) "not reported" else String.format(Locale.US, "%.2f", it) })
|
||||
val pm = runCatching { context.getSystemService(Context.POWER_SERVICE) as? PowerManager }.getOrNull()
|
||||
if (pm != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
k("Thermal status", runCatching { thermalStatusName(pm.currentThermalStatus) }.getOrNull())
|
||||
}
|
||||
k("Power saver", pm.isPowerSaveMode)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
k("Thermal headroom (10 s)", runCatching {
|
||||
pm.getThermalHeadroom(10).let { if (it.isNaN()) "not reported" else String.format(Locale.US, "%.2f", it) }
|
||||
}.getOrNull())
|
||||
}
|
||||
k("Power saver", runCatching { pm.isPowerSaveMode }.getOrNull())
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val rate = runCatching { context.getSystemService(PerformanceHintManager::class.java)?.preferredUpdateRateNanos }.getOrNull()
|
||||
@@ -200,7 +204,12 @@ object DeviceReport {
|
||||
h("Drivers")
|
||||
val gpu = com.droiddeck.launcher.gpu.GpuInfo.detect()
|
||||
k("GPU", "${gpu.name} · ${gpu.family.label} · ${gpu.supportText}" + if (gpu.oneUi8Gen2) " · One UI 8 Gen 2" else "")
|
||||
if (gpu.model == 740) k("TP UBWC hint", com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice() ?: "driver default")
|
||||
if (gpu.model == 740) {
|
||||
val hint = com.droiddeck.launcher.gpu.TpUbwcHint
|
||||
k("TP UBWC hint", hint.forThisDevice(context) ?: "driver default")
|
||||
k("TP UBWC mode", hint.activeMode ?: SessionPrefs.TP_UBWC_AUTO)
|
||||
if (hint.restartRequired(context)) k("TP UBWC pending", "${SessionPrefs.tpUbwcMode(context)} (restart required)")
|
||||
}
|
||||
k("Driver mode", SessionPrefs.gpuDriverMode(context) +
|
||||
(com.droiddeck.launcher.gpu.DriverPairs.recommendedKey(gpu, com.droiddeck.launcher.gpu.DriverPairs.from(
|
||||
com.droiddeck.launcher.gpu.TurnipReleases.cached(context)), com.droiddeck.launcher.gpu.TurnipReleases.autoPicks(context),
|
||||
|
||||
@@ -14,7 +14,7 @@ import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.IBinder
|
||||
import android.os.Looper
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.FrontEndActivity
|
||||
import com.droiddeck.launcher.R
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
@@ -185,7 +185,7 @@ class WirelessAdbPairingService : Service() {
|
||||
enableVibration(false)
|
||||
})
|
||||
val open = PendingIntent.getActivity(this, 0,
|
||||
Intent(this, MainActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
|
||||
Intent(this, FrontEndActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
|
||||
PendingIntent.FLAG_IMMUTABLE)
|
||||
val cancel = PendingIntent.getService(this, 1,
|
||||
Intent(this, WirelessAdbPairingService::class.java).setAction(ACTION_CANCEL), PendingIntent.FLAG_IMMUTABLE)
|
||||
|
||||
@@ -29,7 +29,7 @@ class FileManagerActivity : ComponentActivity() {
|
||||
setContent {
|
||||
DroidDeckTheme(appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this)) {
|
||||
Surface(modifier = Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) {
|
||||
FileManagerScreen(initialDir = initialDir)
|
||||
FileManagerScreen(initialDir = initialDir, onExit = { finish() })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ import androidx.compose.foundation.lazy.grid.items
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ExitToApp
|
||||
import androidx.compose.material.icons.automirrored.filled.KeyboardReturn
|
||||
import androidx.compose.material.icons.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.ContentPaste
|
||||
import androidx.compose.material.icons.filled.CreateNewFolder
|
||||
@@ -90,12 +92,18 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.ensureActive
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
||||
private enum class FileManagerNavigation { EXIT, RETURN_TO_START, BACK }
|
||||
|
||||
internal fun canNavigateUp(currentDir: File, currentRoot: File): Boolean =
|
||||
currentDir != currentRoot && currentDir.parentFile?.exists() == true
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun FileManagerScreen(
|
||||
@@ -105,6 +113,7 @@ fun FileManagerScreen(
|
||||
initialDir: File? = null,
|
||||
pickerTitle: String? = null,
|
||||
onPick: ((File) -> Unit)? = null,
|
||||
onExit: (() -> Unit)? = null,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val scope = rememberCoroutineScope()
|
||||
@@ -118,12 +127,14 @@ fun FileManagerScreen(
|
||||
|
||||
val pickPrefs = remember { context.getSharedPreferences("file_manager", android.content.Context.MODE_PRIVATE) }
|
||||
val browsePrefs = pickPrefs
|
||||
val rootDir = remember {
|
||||
val rootDir = remember(initialDir) {
|
||||
initialDir?.takeIf { it.isDirectory } ?: File("/storage/emulated/0")
|
||||
}
|
||||
|
||||
val launchDir = remember(initialDir, pickMode) {
|
||||
initialDir?.takeIf { !pickMode }
|
||||
}
|
||||
var currentDir by remember { mutableStateOf(rootDir) }
|
||||
var currentRoot by remember {
|
||||
val initialRoot = remember(rootDir) {
|
||||
val abs = rootDir.absolutePath
|
||||
val internal = "/storage/emulated/0"
|
||||
val vol = when {
|
||||
@@ -139,8 +150,9 @@ fun FileManagerScreen(
|
||||
?: rootDir
|
||||
}
|
||||
}
|
||||
mutableStateOf(vol)
|
||||
vol
|
||||
}
|
||||
var currentRoot by remember { mutableStateOf(initialRoot) }
|
||||
var entries by remember { mutableStateOf(listOf<File>()) }
|
||||
var selectedEntry by remember { mutableStateOf<File?>(null) }
|
||||
var showMenuFor by remember { mutableStateOf<File?>(null) }
|
||||
@@ -151,8 +163,10 @@ fun FileManagerScreen(
|
||||
var pendingConflict by remember { mutableStateOf<File?>(null) }
|
||||
var conflictChoice by remember { mutableStateOf<ConflictChoice?>(null) }
|
||||
var conflictApplyToAll by remember { mutableStateOf(false) }
|
||||
var operationJob by remember { mutableStateOf<kotlinx.coroutines.Job?>(null) }
|
||||
var cancelledJob by remember { mutableStateOf<kotlinx.coroutines.Job?>(null) }
|
||||
var operationJob by remember { mutableStateOf<Job?>(null) }
|
||||
var cancelledJob by remember { mutableStateOf<Job?>(null) }
|
||||
var pendingNavigation by remember { mutableStateOf<FileManagerNavigation?>(null) }
|
||||
var cancellingNavigation by remember { mutableStateOf(false) }
|
||||
var pendingBulkDelete by remember { mutableStateOf<List<File>>(emptyList()) }
|
||||
var searchQuery by remember { mutableStateOf("") }
|
||||
val visibleEntries = if (searchQuery.isBlank()) entries
|
||||
@@ -178,9 +192,10 @@ fun FileManagerScreen(
|
||||
var showFavorites by remember { mutableStateOf(false) }
|
||||
var favTick by remember { mutableIntStateOf(0) }
|
||||
|
||||
var listingJob by remember { mutableStateOf<kotlinx.coroutines.Job?>(null) }
|
||||
var listingJob by remember { mutableStateOf<Job?>(null) }
|
||||
|
||||
fun loadDirectory(dir: File, resetScroll: Boolean = true) {
|
||||
if (cancellingNavigation) return
|
||||
currentDir = dir
|
||||
if (pickMode) pickPrefs.edit().putString("lastFilePickerDir", dir.absolutePath).apply()
|
||||
listingJob?.cancel()
|
||||
@@ -205,25 +220,90 @@ fun FileManagerScreen(
|
||||
}
|
||||
|
||||
fun openDrive(dir: File) {
|
||||
if (cancellingNavigation) return
|
||||
currentRoot = dir
|
||||
loadDirectory(dir)
|
||||
}
|
||||
|
||||
fun returnToStart() {
|
||||
if (cancellingNavigation) return
|
||||
val dir = launchDir ?: return
|
||||
if (!dir.isDirectory) {
|
||||
Toast.makeText(context, R.string.fm_start_unavailable, Toast.LENGTH_SHORT).show()
|
||||
return
|
||||
}
|
||||
showFavorites = false
|
||||
showSearch = false
|
||||
searchQuery = ""
|
||||
currentRoot = initialRoot
|
||||
loadDirectory(dir)
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) { loadDirectory(rootDir) }
|
||||
|
||||
BackHandler(enabled = showFavorites || currentDir != currentRoot) {
|
||||
if (showFavorites) {
|
||||
showFavorites = false
|
||||
return@BackHandler
|
||||
val canGoUp = currentDir != currentRoot && currentDir.parentFile?.exists() == true
|
||||
fun isOperationActive() = isOperationRunning || operationJob?.isCompleted == false || cancelledJob?.isCompleted == false
|
||||
val operationActive = isOperationActive()
|
||||
|
||||
fun navigate(action: FileManagerNavigation) {
|
||||
if (cancellingNavigation) return
|
||||
when (action) {
|
||||
FileManagerNavigation.EXIT -> onExit?.invoke()
|
||||
FileManagerNavigation.RETURN_TO_START -> returnToStart()
|
||||
FileManagerNavigation.BACK -> {
|
||||
if (showFavorites) showFavorites = false
|
||||
else if (canNavigateUp(currentDir, currentRoot)) currentDir.parentFile?.let { loadDirectory(it) }
|
||||
else onExit?.invoke()
|
||||
}
|
||||
}
|
||||
val parent = currentDir.parentFile
|
||||
if (parent != null && parent.exists()) loadDirectory(parent)
|
||||
}
|
||||
|
||||
val canGoUp = currentDir != currentRoot && currentDir.parentFile?.exists() == true
|
||||
fun goUp() {
|
||||
val parent = currentDir.parentFile
|
||||
if (currentDir != currentRoot && parent != null && parent.exists()) loadDirectory(parent)
|
||||
fun requestNavigation(action: FileManagerNavigation) {
|
||||
if (cancellingNavigation) return
|
||||
if (isOperationActive()) pendingNavigation = action else navigate(action)
|
||||
}
|
||||
|
||||
BackHandler(enabled = operationActive || cancellingNavigation || showFavorites || currentDir != currentRoot) {
|
||||
requestNavigation(FileManagerNavigation.BACK)
|
||||
}
|
||||
|
||||
if (pendingNavigation != null) {
|
||||
OutlinedAlertDialog(
|
||||
onDismissRequest = { pendingNavigation = null },
|
||||
title = { Text(stringResource(R.string.fm_cancel_operation_title)) },
|
||||
text = { Text(stringResource(R.string.fm_cancel_operation_confirmation)) },
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
val action = pendingNavigation ?: return@TextButton
|
||||
pendingNavigation = null
|
||||
val job = operationJob?.takeUnless(Job::isCompleted)
|
||||
?: cancelledJob?.takeUnless(Job::isCompleted)
|
||||
if (job == null) {
|
||||
navigate(action)
|
||||
} else {
|
||||
cancellingNavigation = true
|
||||
cancelledJob = job
|
||||
job.cancel()
|
||||
scope.launch {
|
||||
job.join()
|
||||
if (operationJob === job) operationJob = null
|
||||
if (cancelledJob === job) cancelledJob = null
|
||||
pendingConflict = null
|
||||
isOperationRunning = false
|
||||
operationDeterminate = false
|
||||
cancellingNavigation = false
|
||||
if (action != FileManagerNavigation.EXIT) loadDirectory(currentDir, resetScroll = false)
|
||||
navigate(action)
|
||||
}
|
||||
}
|
||||
}) { Text(stringResource(R.string.fm_accept)) }
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = { pendingNavigation = null }) {
|
||||
Text(stringResource(R.string.fm_decline))
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fun uniqueDestination(dir: File, name: String): File {
|
||||
@@ -241,11 +321,14 @@ fun FileManagerScreen(
|
||||
}
|
||||
|
||||
fun performDelete(file: File) {
|
||||
scope.launch {
|
||||
if (isOperationActive()) return
|
||||
operationJob = scope.launch {
|
||||
isOperationRunning = true
|
||||
operationLabel = context.getString(R.string.fm_op_deleting)
|
||||
val ok = withContext(Dispatchers.IO) { FileOps.delete(file) }
|
||||
val job = coroutineContext[Job]
|
||||
val ok = withContext(Dispatchers.IO) { FileOps.delete(file) { job?.isActive == false } }
|
||||
isOperationRunning = false
|
||||
if (operationJob === job) operationJob = null
|
||||
loadDirectory(currentDir, resetScroll = false)
|
||||
if (!ok) Toast.makeText(context, R.string.fm_delete_failed, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
@@ -260,7 +343,7 @@ fun FileManagerScreen(
|
||||
|
||||
fun performPaste() {
|
||||
val sources = clipboardFiles
|
||||
if (sources.isEmpty() || isOperationRunning || operationJob?.isActive == true || cancelledJob?.isCompleted == false) return
|
||||
if (sources.isEmpty() || isOperationActive()) return
|
||||
val dstDir = currentDir
|
||||
val cut = isCutOperation
|
||||
|
||||
@@ -269,7 +352,7 @@ fun FileManagerScreen(
|
||||
operationDeterminate = true
|
||||
operationLabel = context.getString(if (cut) R.string.fm_op_moving else R.string.fm_op_copying)
|
||||
isOperationRunning = true
|
||||
val job = coroutineContext[kotlinx.coroutines.Job]
|
||||
val job = coroutineContext[Job]
|
||||
|
||||
var applyToAll: ConflictChoice? = null
|
||||
var failed = 0
|
||||
@@ -322,7 +405,7 @@ fun FileManagerScreen(
|
||||
|
||||
isOperationRunning = false
|
||||
operationDeterminate = false
|
||||
operationJob = null
|
||||
if (operationJob === job) operationJob = null
|
||||
clipboardFiles = emptyList()
|
||||
isCutOperation = false
|
||||
selectionMode = false
|
||||
@@ -340,32 +423,38 @@ fun FileManagerScreen(
|
||||
}
|
||||
|
||||
fun performRename(file: File, newName: String) {
|
||||
if (isOperationActive()) return
|
||||
val target = File(file.parentFile, newName)
|
||||
if (target.exists()) {
|
||||
Toast.makeText(context, context.getString(R.string.fm_already_exists, newName), Toast.LENGTH_SHORT).show()
|
||||
return
|
||||
}
|
||||
scope.launch {
|
||||
operationJob = scope.launch {
|
||||
val job = coroutineContext[Job]
|
||||
isOperationRunning = true
|
||||
operationLabel = context.getString(R.string.fm_op_renaming)
|
||||
val ok = withContext(Dispatchers.IO) { file.renameTo(target) }
|
||||
isOperationRunning = false
|
||||
if (operationJob === job) operationJob = null
|
||||
loadDirectory(currentDir, resetScroll = false)
|
||||
if (!ok) Toast.makeText(context, R.string.fm_rename_failed, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
fun createFolder(parent: File, name: String) {
|
||||
if (isOperationActive()) return
|
||||
val target = File(parent, name)
|
||||
if (target.exists()) {
|
||||
Toast.makeText(context, context.getString(R.string.fm_already_exists, name), Toast.LENGTH_SHORT).show()
|
||||
return
|
||||
}
|
||||
scope.launch {
|
||||
operationJob = scope.launch {
|
||||
val job = coroutineContext[Job]
|
||||
isOperationRunning = true
|
||||
operationLabel = context.getString(R.string.fm_op_creating_folder)
|
||||
val ok = withContext(Dispatchers.IO) { target.mkdirs() }
|
||||
isOperationRunning = false
|
||||
if (operationJob === job) operationJob = null
|
||||
loadDirectory(currentDir, resetScroll = false)
|
||||
if (!ok) Toast.makeText(context, R.string.fm_create_folder_failed, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
@@ -481,18 +570,20 @@ fun FileManagerScreen(
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
if (isOperationActive()) return@TextButton
|
||||
pendingBulkDelete = emptyList()
|
||||
selectionMode = false
|
||||
selectedPaths = emptySet()
|
||||
operationJob = scope.launch {
|
||||
isOperationRunning = true
|
||||
val job = coroutineContext[Job]
|
||||
var failed = 0
|
||||
victims.forEachIndexed { i, f ->
|
||||
operationLabel = context.getString(R.string.fm_op_deleting_batch, i + 1, victims.size, f.name)
|
||||
if (!withContext(Dispatchers.IO) { FileOps.delete(f) }) failed++
|
||||
if (!withContext(Dispatchers.IO) { FileOps.delete(f) { job?.isActive == false } }) failed++
|
||||
}
|
||||
isOperationRunning = false
|
||||
operationJob = null
|
||||
if (operationJob === job) operationJob = null
|
||||
loadDirectory(currentDir, resetScroll = false)
|
||||
if (failed > 0) {
|
||||
Toast.makeText(context, context.resources.getQuantityString(R.plurals.fm_delete_some_failed, failed, failed), Toast.LENGTH_SHORT).show()
|
||||
@@ -582,7 +673,7 @@ fun FileManagerScreen(
|
||||
.background(MaterialTheme.colorScheme.surfaceContainer)
|
||||
.padding(horizontal = 8.dp, vertical = 6.dp),
|
||||
) {
|
||||
IconButton(onClick = { goUp() }, enabled = canGoUp) {
|
||||
IconButton(onClick = { requestNavigation(FileManagerNavigation.BACK) }, enabled = canGoUp && !cancellingNavigation) {
|
||||
Icon(Icons.Filled.ArrowBack, stringResource(R.string.fm_back), tint = MaterialTheme.colorScheme.primary)
|
||||
}
|
||||
|
||||
@@ -672,6 +763,13 @@ fun FileManagerScreen(
|
||||
)
|
||||
}
|
||||
|
||||
if (launchDir != null) {
|
||||
IconButton(onClick = { requestNavigation(FileManagerNavigation.RETURN_TO_START) }, enabled = !cancellingNavigation) {
|
||||
Icon(Icons.AutoMirrored.Filled.KeyboardReturn, stringResource(R.string.fm_return_to_start), tint = MaterialTheme.colorScheme.primary)
|
||||
}
|
||||
if (LocalConfiguration.current.screenWidthDp >= 700) Spacer(Modifier.width(56.dp))
|
||||
}
|
||||
|
||||
if (!showFavorites) {
|
||||
if (!pickMode) {
|
||||
OutlinedButton(
|
||||
@@ -747,6 +845,11 @@ fun FileManagerScreen(
|
||||
Icon(Icons.Filled.StarBorder, stringResource(R.string.fm_show_favorites), tint = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
}
|
||||
}
|
||||
if (!pickMode && onExit != null) {
|
||||
IconButton(onClick = { requestNavigation(FileManagerNavigation.EXIT) }, enabled = !cancellingNavigation) {
|
||||
Icon(Icons.AutoMirrored.Filled.ExitToApp, stringResource(R.string.fm_exit), tint = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showSearch && !showFavorites) {
|
||||
@@ -986,7 +1089,7 @@ fun FileManagerScreen(
|
||||
contentPadding = PaddingValues(8.dp),
|
||||
) {
|
||||
if (canGoUp) item(key = "..", span = { GridItemSpan(maxLineSpan) }) {
|
||||
ParentFolderRow(compact = compactRows, onTap = { goUp() })
|
||||
ParentFolderRow(compact = compactRows, onTap = { requestNavigation(FileManagerNavigation.BACK) })
|
||||
}
|
||||
items(shownEntries, key = { it.absolutePath }) { file ->
|
||||
val isFav = remember(file.absolutePath, favTick) {
|
||||
@@ -1052,7 +1155,7 @@ fun FileManagerScreen(
|
||||
} else
|
||||
LazyColumn(state = listState, modifier = Modifier.fillMaxSize()) {
|
||||
if (canGoUp) item(key = "..") {
|
||||
ParentFolderRow(compact = compactRows, onTap = { goUp() })
|
||||
ParentFolderRow(compact = compactRows, onTap = { requestNavigation(FileManagerNavigation.BACK) })
|
||||
}
|
||||
if (entries.isEmpty()) {
|
||||
item {
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.nio.file.Files
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.CancellationException
|
||||
|
||||
object FileOps {
|
||||
private const val TAG = "FileOps"
|
||||
@@ -24,24 +25,27 @@ object FileOps {
|
||||
|
||||
fun isSymlink(file: File): Boolean = try { Files.isSymbolicLink(file.toPath()) } catch (e: Exception) { false }
|
||||
|
||||
fun delete(target: File?): Boolean {
|
||||
fun delete(target: File?, isCancelled: () -> Boolean = { false }): Boolean {
|
||||
if (isCancelled()) throw CancellationException("Delete cancelled: $target")
|
||||
if (target == null) return false
|
||||
if (target.isDirectory && !isSymlink(target)) {
|
||||
if (!clear(target)) return false
|
||||
if (!clear(target, isCancelled)) return false
|
||||
}
|
||||
if (isCancelled()) throw CancellationException("Delete cancelled: $target")
|
||||
return target.delete()
|
||||
}
|
||||
|
||||
fun clear(dir: File): Boolean {
|
||||
fun clear(dir: File, isCancelled: () -> Boolean = { false }): Boolean {
|
||||
val children = dir.listFiles() ?: return true
|
||||
var ok = true
|
||||
for (child in children) if (!delete(child)) ok = false
|
||||
for (child in children) if (!delete(child, isCancelled)) ok = false
|
||||
return ok
|
||||
}
|
||||
|
||||
fun totalSize(f: File?): Long {
|
||||
fun totalSize(f: File?, isCancelled: () -> Boolean = { false }): Long {
|
||||
if (isCancelled()) throw CancellationException("Size scan cancelled: $f")
|
||||
if (f == null || !f.exists() || isSymlink(f)) return 0
|
||||
if (f.isDirectory) return f.listFiles()?.sumOf { totalSize(it) } ?: 0
|
||||
if (f.isDirectory) return f.listFiles()?.sumOf { totalSize(it, isCancelled) } ?: 0
|
||||
return f.length()
|
||||
}
|
||||
|
||||
@@ -53,12 +57,12 @@ object FileOps {
|
||||
return true
|
||||
}
|
||||
if (!copyWithProgress(src, dst, progress, isCancelled)) return false
|
||||
if (isCancelled()) return false
|
||||
// Once the destination is committed, finish deleting the source.
|
||||
return delete(src)
|
||||
}
|
||||
|
||||
fun copyWithProgress(src: File, dst: File, progress: ProgressCallback?, isCancelled: () -> Boolean = { false }): Boolean {
|
||||
val total = maxOf(totalSize(src), 1L)
|
||||
val total = maxOf(totalSize(src, isCancelled), 1L)
|
||||
return copyWithProgress(src, dst, longArrayOf(0), total, progress, isCancelled)
|
||||
}
|
||||
|
||||
@@ -71,15 +75,23 @@ object FileOps {
|
||||
return false
|
||||
}
|
||||
if (src.isDirectory) {
|
||||
if (!dst.exists() && !dst.mkdirs()) return false
|
||||
var allOk = true
|
||||
src.list()?.forEach { name ->
|
||||
if (!copyWithProgress(File(src, name), File(dst, name), done, total, progress, isCancelled)) {
|
||||
Log.e(TAG, "Failed to copy: ${File(src, name)}")
|
||||
allOk = false
|
||||
val created = if (dst.exists()) false else {
|
||||
if (!dst.mkdirs()) return false
|
||||
true
|
||||
}
|
||||
try {
|
||||
var allOk = true
|
||||
src.list()?.forEach { name ->
|
||||
if (!copyWithProgress(File(src, name), File(dst, name), done, total, progress, isCancelled)) {
|
||||
Log.e(TAG, "Failed to copy: ${File(src, name)}")
|
||||
allOk = false
|
||||
}
|
||||
}
|
||||
return allOk
|
||||
} catch (e: CancellationException) {
|
||||
if (created) delete(dst)
|
||||
throw e
|
||||
}
|
||||
return allOk
|
||||
}
|
||||
val parent = dst.parentFile
|
||||
if (!src.exists() || (parent != null && !parent.exists() && !parent.mkdirs())) return false
|
||||
@@ -118,6 +130,7 @@ object FileOps {
|
||||
val size = input.size()
|
||||
var position = 0L
|
||||
while (position < size) {
|
||||
if (isCancelled()) throw CancellationException("Copy cancelled: $src")
|
||||
val transferred = input.transferTo(position, minOf(chunk, size - position), channel)
|
||||
if (transferred <= 0) break
|
||||
position += transferred
|
||||
@@ -125,12 +138,19 @@ object FileOps {
|
||||
progress?.onProgress(done[0], total)
|
||||
}
|
||||
if (position < size) throw IOException("Incomplete copy: $position/$size bytes")
|
||||
if (size > 0 && isCancelled()) throw CancellationException("Copy cancelled: $src")
|
||||
}
|
||||
}
|
||||
staging?.let { directory ->
|
||||
val copied = File(directory, "file").toPath()
|
||||
if (permissions != null && Files.getPosixFilePermissions(copied) != permissions) {
|
||||
Files.setPosixFilePermissions(copied, permissions)
|
||||
if (permissions != null) {
|
||||
try {
|
||||
if (Files.getPosixFilePermissions(copied) != permissions) {
|
||||
Files.setPosixFilePermissions(copied, permissions)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to restore destination permissions: $target", e)
|
||||
}
|
||||
}
|
||||
if (isCancelled()) throw java.util.concurrent.CancellationException("Copy cancelled: $src")
|
||||
Files.move(copied, target.toPath(), java.nio.file.StandardCopyOption.ATOMIC_MOVE)
|
||||
|
||||
@@ -50,6 +50,7 @@ class FilePickerActivity : ComponentActivity() {
|
||||
setResult(Activity.RESULT_OK, Intent().putExtra(EXTRA_SELECTED_FILE, file.absolutePath))
|
||||
finish()
|
||||
},
|
||||
onExit = { finish() },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ object AddedGames {
|
||||
|
||||
class FolderResult(val added: List<Game>, val already: Int)
|
||||
|
||||
fun addFolder(context: Context, dir: File, onGame: (Game) -> Unit = {}, onChecking: (String?) -> Unit = {}): FolderResult {
|
||||
fun addFolder(context: Context, dir: File, onGame: (Game) -> Unit = {}, onChecking: (String?) -> Unit = {}, showHidden: Boolean = false): FolderResult {
|
||||
val app = context.applicationContext
|
||||
// Binds are mounted at session start, so a new one reaches the session from the next start.
|
||||
if (guestPath(app, dir) == null) bindFolder(app, dir)
|
||||
@@ -283,7 +283,7 @@ object AddedGames {
|
||||
var already = 0
|
||||
val fresh = ArrayList<String>()
|
||||
val added = ArrayList<Game>()
|
||||
for (sub in dir.listFiles { f -> f.isDirectory && !f.name.startsWith(".") }?.sortedBy { it.name.lowercase() }.orEmpty()) {
|
||||
for (sub in dir.listFiles { f -> f.isDirectory && (showHidden || !f.name.startsWith(".")) }?.sortedBy { it.name.lowercase() }.orEmpty()) {
|
||||
val path = canonical(sub)
|
||||
if (listed.any { it == path || inside(path, it) || inside(it, path) }) { already++; continue }
|
||||
onChecking(sub.name)
|
||||
@@ -387,11 +387,17 @@ object AddedGames {
|
||||
}
|
||||
}
|
||||
|
||||
private class LoginUser(val id: String, val mostRecent: Boolean, val autoLogin: Boolean, val timestamp: Long)
|
||||
|
||||
internal fun accountConfig(root: File): File? {
|
||||
val users = runCatching { File(root, "config/loginusers.vdf").readText() }.getOrDefault("")
|
||||
val recent = Regex(""""(\d{5,})"\s*\{([^}]*)\}""").findAll(users)
|
||||
.lastOrNull { Regex(""""MostRecent"\s*"1"""").containsMatchIn(it.groupValues[2]) }
|
||||
val account = recent?.groupValues?.get(1)?.toLongOrNull()?.let { (it - 76561197960265728L).toString() }
|
||||
val recent = Regex(""""(\d{5,})"\s*\{([^}]*)\}""").findAll(users).map {
|
||||
val body = it.groupValues[2]
|
||||
LoginUser(it.groupValues[1], Regex(""""MostRecent"\s*"1"""").containsMatchIn(body), Regex(""""AutoLogin"\s*"1"""").containsMatchIn(body),
|
||||
Regex(""""timestamp"\s*"(\d+)"""").find(body)?.groupValues?.get(1)?.toLongOrNull() ?: 0L)
|
||||
}.filter { it.mostRecent || it.autoLogin || it.timestamp > 0 }.toList().asReversed()
|
||||
.maxWithOrNull(compareBy<LoginUser>({ it.mostRecent }, { it.autoLogin }, { it.timestamp }))
|
||||
val account = recent?.id?.toLongOrNull()?.let { (it - 76561197960265728L).toString() }
|
||||
?: File(root, "userdata").list()?.filter { it.isNotEmpty() && it.all(Char::isDigit) && it != "0" }?.singleOrNull()
|
||||
return account?.let { File(root, "userdata/$it/config") }
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ import android.graphics.drawable.Icon
|
||||
import android.net.Uri
|
||||
import android.widget.Toast
|
||||
import com.droiddeck.launcher.LauncherIcon
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.FrontEndActivity
|
||||
import com.droiddeck.launcher.R
|
||||
import java.io.File
|
||||
|
||||
object GameShortcuts {
|
||||
fun launchIntent(context: Context, gameId: String) = Intent(Intent.ACTION_VIEW,
|
||||
Uri.parse(GameLaunchLink.uri(gameId)), context, MainActivity::class.java)
|
||||
Uri.parse(GameLaunchLink.uri(gameId)), context, FrontEndActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
|
||||
private fun info(context: Context, game: Library.SteamGame): ShortcutInfo {
|
||||
|
||||
@@ -46,12 +46,14 @@ object Library {
|
||||
1054830,
|
||||
1070560,
|
||||
1113280,
|
||||
1161040,
|
||||
1245040,
|
||||
1391110,
|
||||
1420170,
|
||||
1493710,
|
||||
1580130,
|
||||
1628350,
|
||||
1826330,
|
||||
1887720,
|
||||
2180100,
|
||||
228980,
|
||||
@@ -121,8 +123,9 @@ object Library {
|
||||
val name = NAME.find(text)?.groupValues?.get(1)?.trim().orEmpty()
|
||||
val flags = STATE.find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0
|
||||
if (name.isEmpty() || flags and 4 == 0) return@forEach
|
||||
val art = steamCacheImage(cache, appId, STEAM_CAPSULES)
|
||||
val hero = steamCacheImage(cache, appId, STEAM_HEROES)
|
||||
val images = SteamCacheImages(File(cache, appId.toString()))
|
||||
val art = images.find(STEAM_CAPSULES)
|
||||
val hero = images.find(STEAM_HEROES)
|
||||
val lastPlayed = LAST_PLAYED.find(text)?.groupValues?.get(1)?.toLongOrNull() ?: 0L
|
||||
val installDir = INSTALL_DIR.find(text)?.groupValues?.get(1)?.trim()
|
||||
?.takeIf { it.isNotEmpty() && it != "." && it != ".." && '/' !in it && '\\' !in it }
|
||||
@@ -131,9 +134,8 @@ object Library {
|
||||
appId, name, art, label, hero = hero, lastPlayed = lastPlayed,
|
||||
gameFiles = gameFiles,
|
||||
protonPrefix = protonPrefix(context, appId.toLong(), library, roots),
|
||||
icon = steamCacheImage(cache, appId, listOf("icon.jpg", "icon.png"))
|
||||
?: File(cache, appId.toString()).listFiles()?.firstOrNull { it.isFile && STEAM_ICON.matches(it.name) },
|
||||
logo = steamCacheImage(cache, appId, STEAM_LOGOS),
|
||||
icon = images.icon(),
|
||||
logo = images.find(STEAM_LOGOS),
|
||||
))
|
||||
}
|
||||
}
|
||||
@@ -210,13 +212,19 @@ object Library {
|
||||
)
|
||||
}
|
||||
|
||||
internal fun steamCacheImage(cache: File, appId: Int, names: List<String>): File? {
|
||||
val appDir = File(cache, appId.toString())
|
||||
val dirs = listOf(appDir) + appDir.listFiles()
|
||||
.orEmpty().filter { it.isDirectory }.sortedBy { it.name }
|
||||
return names.asSequence()
|
||||
internal fun steamCacheImage(cache: File, appId: Int, names: List<String>): File? =
|
||||
SteamCacheImages(File(cache, appId.toString())).find(names)
|
||||
|
||||
internal class SteamCacheImages(appDir: File) {
|
||||
private val entries = appDir.listFiles().orEmpty()
|
||||
private val dirs = listOf(appDir) + entries.filter { it.isDirectory }.sortedBy { it.name }
|
||||
|
||||
fun find(names: List<String>): File? = names.asSequence()
|
||||
.flatMap { name -> dirs.asSequence().map { File(it, name) } }
|
||||
.firstOrNull { it.isFile && it.length() > 0L }
|
||||
|
||||
fun icon(): File? = find(listOf("icon.jpg", "icon.png"))
|
||||
?: entries.firstOrNull { it.isFile && STEAM_ICON.matches(it.name) }
|
||||
}
|
||||
|
||||
private class Spec(val id: String, val name: String, val system: String, val program: String, val folders: List<String>, val exts: Set<String>, val atPanel: Boolean = false)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
object TpUbwcHint {
|
||||
const val ENV = "FD_DEV_FEATURES"
|
||||
@@ -8,31 +10,43 @@ object TpUbwcHint {
|
||||
|
||||
@Volatile private var resolved = false
|
||||
@Volatile private var cached: String? = null
|
||||
@Volatile var activeMode: String? = null
|
||||
private set
|
||||
|
||||
// On Adreno 740, TPL1_DBG_ECO_CNTL1.TP_UBWC_FLAG_HINT is shared by every driver on the GPU and must
|
||||
// match the system driver: blob v6xx leaves it off, newer blobs set it. A mismatch corrupts Android UI.
|
||||
// match the system driver. A mismatch corrupts Android UI.
|
||||
// Samsung's One UI firmware sets it whatever blob version it reports.
|
||||
internal fun features(model: Int, systemDriverVersion: String?, samsung: Boolean = false): String? {
|
||||
internal fun features(model: Int, systemDriverVersion: String?, samsung: Boolean = false,
|
||||
mode: String = SessionPrefs.TP_UBWC_AUTO): String? {
|
||||
if (model != 740) return null
|
||||
if (mode == SessionPrefs.TP_UBWC_ON) return "enable_tp_ubwc_flag_hint=1"
|
||||
if (mode == SessionPrefs.TP_UBWC_OFF) return "enable_tp_ubwc_flag_hint=0"
|
||||
if (samsung) return "enable_tp_ubwc_flag_hint=1"
|
||||
val blob = systemDriverVersion?.split('.')?.getOrNull(1)?.toIntOrNull() ?: return null
|
||||
return "enable_tp_ubwc_flag_hint=" + if (blob >= 700) "1" else "0"
|
||||
val parts = systemDriverVersion?.split('.') ?: return null
|
||||
val blob = parts.getOrNull(1)?.toIntOrNull() ?: return null
|
||||
val patch = parts.getOrNull(2)?.toIntOrNull() ?: 0
|
||||
val on = blob >= 700 || (blob == 676 && patch >= 76)
|
||||
return "enable_tp_ubwc_flag_hint=" + if (on) "1" else "0"
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun forThisDevice(): String? {
|
||||
fun forThisDevice(context: Context): String? {
|
||||
if (resolved) return cached
|
||||
val mode = SessionPrefs.tpUbwcMode(context)
|
||||
val gpu = GpuInfo.detect()
|
||||
val model = gpu.model
|
||||
val version = if (model == 740) VulkanInfo.query()["driver_version"] else null
|
||||
cached = features(model, version, gpu.oneUi8Gen2)
|
||||
cached = features(model, version, gpu.oneUi8Gen2, mode)
|
||||
activeMode = mode
|
||||
resolved = true
|
||||
Log.i(TAG, "Adreno $model${if (gpu.oneUi8Gen2) " (One UI)" else ""}, system driver ${version ?: "n/a"}: ${cached ?: "driver default"}")
|
||||
Log.i(TAG, "Adreno $model${if (gpu.oneUi8Gen2) " (One UI)" else ""}, system driver ${version ?: "n/a"}, mode $mode: ${cached ?: "driver default"}")
|
||||
return cached
|
||||
}
|
||||
|
||||
fun applyToProcess() {
|
||||
val value = forThisDevice() ?: return
|
||||
fun restartRequired(context: Context): Boolean = resolved && activeMode != SessionPrefs.tpUbwcMode(context)
|
||||
|
||||
fun applyToProcess(context: Context) {
|
||||
val value = forThisDevice(context) ?: return
|
||||
runCatching { android.system.Os.setenv(ENV, value, true) }
|
||||
.onFailure { Log.w(TAG, "setenv $ENV failed: ${it.javaClass.simpleName}") }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Notification
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.Service
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.location.LocationManager
|
||||
import android.net.wifi.WifiManager
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.IBinder
|
||||
import android.os.Looper
|
||||
import com.droiddeck.launcher.R
|
||||
|
||||
class LocalHotspotService : Service() {
|
||||
private var reservation: WifiManager.LocalOnlyHotspotReservation? = null
|
||||
private var requesting = false
|
||||
private var alive = false
|
||||
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
alive = true
|
||||
val notifications = getSystemService(NotificationManager::class.java)
|
||||
notifications.createNotificationChannel(NotificationChannel(CHANNEL, getString(R.string.lan_title), NotificationManager.IMPORTANCE_LOW))
|
||||
val open = PendingIntent.getActivity(this, 0, Intent(this, LocalLanActivity::class.java), PendingIntent.FLAG_IMMUTABLE)
|
||||
val stop = PendingIntent.getService(this, 0, Intent(this, LocalHotspotService::class.java).setAction(STOP), PendingIntent.FLAG_IMMUTABLE)
|
||||
startForeground(1842, Notification.Builder(this, CHANNEL)
|
||||
.setSmallIcon(R.drawable.ic_stat_session)
|
||||
.setContentTitle(getString(R.string.lan_title))
|
||||
.setContentText(getString(R.string.lan_notification))
|
||||
.setContentIntent(open).setOngoing(true)
|
||||
.addAction(Notification.Action.Builder(null, getString(R.string.lan_stop), stop).build())
|
||||
.build())
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (intent?.action == STOP) {
|
||||
stopSelf()
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
if (requesting || reservation != null) return START_NOT_STICKY
|
||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
fail(R.string.lan_permission_needed)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 28 && !getSystemService(LocationManager::class.java).isLocationEnabled) {
|
||||
fail(R.string.lan_location_needed)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
requesting = true
|
||||
LocalLan.hotspotState.value = HotspotState(starting = true)
|
||||
try {
|
||||
val wifi = applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
|
||||
if (wifi == null) fail(R.string.lan_failed)
|
||||
else wifi.startLocalOnlyHotspot(object : WifiManager.LocalOnlyHotspotCallback() {
|
||||
override fun onStarted(ready: WifiManager.LocalOnlyHotspotReservation) {
|
||||
if (!alive) {
|
||||
ready.close()
|
||||
return
|
||||
}
|
||||
requesting = false
|
||||
reservation = ready
|
||||
val ssid: String?
|
||||
val password: String?
|
||||
if (Build.VERSION.SDK_INT >= 30) {
|
||||
ssid = ready.softApConfiguration.ssid
|
||||
password = ready.softApConfiguration.passphrase
|
||||
} else {
|
||||
ssid = ready.wifiConfiguration?.SSID
|
||||
password = ready.wifiConfiguration?.preSharedKey
|
||||
}
|
||||
if (ssid.isNullOrEmpty() || password.isNullOrEmpty()) fail(R.string.lan_failed)
|
||||
else LocalLan.hotspotState.value = HotspotState(ssid = ssid, password = password)
|
||||
}
|
||||
|
||||
override fun onStopped() {
|
||||
if (!alive) return
|
||||
LocalLan.hotspotState.value = HotspotState()
|
||||
stopSelf()
|
||||
}
|
||||
|
||||
override fun onFailed(reason: Int) {
|
||||
if (alive) fail(when (reason) {
|
||||
ERROR_INCOMPATIBLE_MODE -> R.string.lan_incompatible
|
||||
ERROR_TETHERING_DISALLOWED -> R.string.lan_disallowed
|
||||
ERROR_NO_CHANNEL -> R.string.lan_no_channel
|
||||
else -> R.string.lan_failed
|
||||
})
|
||||
}
|
||||
}, Handler(Looper.getMainLooper()))
|
||||
} catch (_: SecurityException) {
|
||||
fail(R.string.lan_permission_needed)
|
||||
} catch (_: IllegalStateException) {
|
||||
fail(R.string.lan_incompatible)
|
||||
} catch (_: UnsupportedOperationException) {
|
||||
fail(R.string.lan_failed)
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
|
||||
private fun fail(message: Int) {
|
||||
LocalLan.hotspotState.value = HotspotState(error = message)
|
||||
stopSelf()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
alive = false
|
||||
reservation?.close()
|
||||
reservation = null
|
||||
requesting = false
|
||||
LocalLan.hotspotState.value = HotspotState(error = LocalLan.hotspot.value.error)
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val CHANNEL = "local-lan"
|
||||
private const val STOP = "com.droiddeck.launcher.lan.STOP"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.content.Context
|
||||
import android.net.wifi.WifiManager
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import java.net.Inet4Address
|
||||
import java.net.InetAddress
|
||||
import java.net.NetworkInterface
|
||||
import java.net.SocketException
|
||||
|
||||
data class LanAddress(val address: InetAddress, val prefixLength: Int)
|
||||
|
||||
data class LanInterface(
|
||||
val name: String,
|
||||
val index: Int,
|
||||
val mtu: Int,
|
||||
val addresses: List<LanAddress>,
|
||||
)
|
||||
|
||||
data class HotspotState(val starting: Boolean = false, val ssid: String? = null, val password: String? = null, val error: Int? = null)
|
||||
|
||||
object LocalLan {
|
||||
private val selection = MutableStateFlow<String?>(null)
|
||||
val selected = selection.asStateFlow()
|
||||
internal val hotspotState = MutableStateFlow(HotspotState())
|
||||
val hotspot = hotspotState.asStateFlow()
|
||||
private var multicast: WifiManager.MulticastLock? = null
|
||||
|
||||
@Synchronized fun select(name: String?, context: Context? = null) {
|
||||
multicast?.let { if (it.isHeld) it.release() }
|
||||
multicast = null
|
||||
if (name != null && context != null) {
|
||||
val wifi = context.applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager
|
||||
multicast = wifi?.createMulticastLock("droiddeck-lan")?.apply {
|
||||
setReferenceCounted(false)
|
||||
acquire()
|
||||
}
|
||||
}
|
||||
selection.value = name
|
||||
}
|
||||
|
||||
fun interfaces(): List<LanInterface> = try {
|
||||
NetworkInterface.getNetworkInterfaces()?.toList().orEmpty().mapNotNull { network ->
|
||||
val addresses = network.interfaceAddresses.filter {
|
||||
it.address is Inet4Address && usableAddress(it.address as Inet4Address, it.networkPrefixLength.toInt())
|
||||
}.map { LanAddress(it.address, it.networkPrefixLength.toInt()) }
|
||||
if (!network.isUp || network.isLoopback || network.isPointToPoint || addresses.isEmpty() || network.index <= 1) null
|
||||
else LanInterface(network.name, network.index, network.mtu.coerceAtLeast(576), addresses)
|
||||
}.sortedBy { it.name }
|
||||
} catch (_: SocketException) {
|
||||
emptyList()
|
||||
} catch (_: SecurityException) {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
internal fun usableAddress(address: Inet4Address, prefix: Int) =
|
||||
(address.isSiteLocalAddress || address.isLinkLocalAddress) && prefix in 1..32
|
||||
|
||||
internal fun selectedInterface() = selected.value?.let { name -> interfaces().firstOrNull { it.name == name } }
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.SessionActivity
|
||||
import com.droiddeck.launcher.core.AppLanguage
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
import com.droiddeck.launcher.ui.ActionRow
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import com.droiddeck.launcher.ui.Note
|
||||
import com.droiddeck.launcher.ui.PrimaryButton
|
||||
import com.droiddeck.launcher.ui.SecondaryButton
|
||||
import com.droiddeck.launcher.ui.SettingsGroup
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class LocalLanActivity : ComponentActivity() {
|
||||
private var clientInstalled by mutableStateOf(false)
|
||||
private var hostRunning by mutableStateOf(false)
|
||||
|
||||
override fun attachBaseContext(base: Context) = super.attachBaseContext(AppLanguage.wrap(base))
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContent {
|
||||
DroidDeckTheme(SessionPrefs.theme(this)) {
|
||||
Surface(Modifier.fillMaxSize()) { LanSetup() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
clientInstalled = SteamLinkCoop.clientIntent(this) != null
|
||||
hostRunning = SessionState.running && SessionState.mode == SessionService.MODE_STEAM
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LanSetup() {
|
||||
val hotspot by LocalLan.hotspot.collectAsState()
|
||||
val selected by LocalLan.selected.collectAsState()
|
||||
var interfaces by remember { mutableStateOf(emptyList<LanInterface>()) }
|
||||
var denied by remember { mutableStateOf(false) }
|
||||
val permission = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
|
||||
denied = !granted
|
||||
if (granted) startHotspot()
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
while (true) {
|
||||
interfaces = withContext(Dispatchers.IO) { LocalLan.interfaces() }
|
||||
hostRunning = SessionState.running && SessionState.mode == SessionService.MODE_STEAM
|
||||
delay(2000)
|
||||
}
|
||||
}
|
||||
Column(Modifier.verticalScroll(rememberScrollState()).padding(20.dp), verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
Text(stringResource(R.string.lan_title), style = MaterialTheme.typography.headlineSmall)
|
||||
Note(stringResource(R.string.lan_experimental))
|
||||
SteamLinkCoopPanel(
|
||||
hostAddress = interfaces.firstOrNull { it.name == selected }?.addresses?.firstOrNull()?.address?.hostAddress,
|
||||
hostRunning = hostRunning,
|
||||
clientInstalled = clientInstalled,
|
||||
onHost = {
|
||||
if (SessionState.running && SessionState.mode == SessionService.MODE_STEAM) {
|
||||
startActivity(Intent(this@LocalLanActivity, SessionActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT))
|
||||
} else finish()
|
||||
},
|
||||
onClient = {
|
||||
if (!SteamLinkCoop.openClientOrStore(this@LocalLanActivity)) {
|
||||
android.widget.Toast.makeText(this@LocalLanActivity, R.string.lan_coop_client_unavailable, android.widget.Toast.LENGTH_LONG).show()
|
||||
}
|
||||
},
|
||||
)
|
||||
SettingsGroup(stringResource(R.string.lan_wireless)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_wireless_help))
|
||||
if (hotspot.ssid != null) {
|
||||
SelectionContainer { Text(stringResource(R.string.lan_credentials, hotspot.ssid!!, hotspot.password.orEmpty())) }
|
||||
}
|
||||
if (hotspot.starting || hotspot.ssid != null) {
|
||||
SecondaryButton(stringResource(R.string.lan_stop)) { stopService(Intent(this@LocalLanActivity, LocalHotspotService::class.java)) }
|
||||
} else {
|
||||
PrimaryButton(stringResource(R.string.lan_host)) {
|
||||
denied = false
|
||||
if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) startHotspot()
|
||||
else permission.launch(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
}
|
||||
}
|
||||
if (hotspot.starting) Text(stringResource(R.string.lan_starting))
|
||||
hotspot.error?.let { Text(stringResource(it), color = MaterialTheme.colorScheme.error) }
|
||||
if (denied) {
|
||||
Text(stringResource(R.string.lan_permission_needed))
|
||||
SecondaryButton(stringResource(R.string.lan_app_settings)) {
|
||||
openSettings(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, android.net.Uri.parse("package:$packageName"))
|
||||
}
|
||||
}
|
||||
SecondaryButton(stringResource(R.string.lan_wifi_settings)) { openSettings(Settings.ACTION_WIFI_SETTINGS) }
|
||||
SecondaryButton(stringResource(R.string.lan_location_settings)) { openSettings(Settings.ACTION_LOCATION_SOURCE_SETTINGS) }
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.lan_wired)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_wired_help))
|
||||
SecondaryButton(stringResource(R.string.lan_network_settings)) { openSettings(Settings.ACTION_WIRELESS_SETTINGS) }
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.lan_interface)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Text(stringResource(R.string.lan_interface_help))
|
||||
if (interfaces.isEmpty()) Text(stringResource(R.string.lan_no_interfaces))
|
||||
if (selected != null && interfaces.none { it.name == selected }) Text(stringResource(R.string.lan_interface_lost, selected!!), color = MaterialTheme.colorScheme.error)
|
||||
}
|
||||
interfaces.forEach { network ->
|
||||
ActionRow(network.name, network.addresses.joinToString { it.address.hostAddress.orEmpty() },
|
||||
stringResource(if (selected == network.name) R.string.lan_selected else R.string.lan_use), onClick = { LocalLan.select(network.name, this@LocalLanActivity) })
|
||||
}
|
||||
ActionRow(stringResource(R.string.lan_default), null,
|
||||
stringResource(if (selected == null) R.string.lan_selected else R.string.lan_use), onClick = { LocalLan.select(null) })
|
||||
}
|
||||
SecondaryButton(stringResource(R.string.common_back)) { finish() }
|
||||
}
|
||||
}
|
||||
|
||||
private fun startHotspot() = startForegroundService(Intent(this, LocalHotspotService::class.java))
|
||||
|
||||
private fun openSettings(action: String, data: android.net.Uri? = null) {
|
||||
val intent = Intent(action, data)
|
||||
if (intent.resolveActivity(packageManager) != null) startActivity(intent)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
|
||||
object SteamLinkCoop {
|
||||
const val PACKAGE = "com.valvesoftware.steamlink"
|
||||
private const val STORE_URL = "https://play.google.com/store/apps/details?id=$PACKAGE"
|
||||
|
||||
fun clientIntent(context: Context): Intent? = context.packageManager.getLaunchIntentForPackage(PACKAGE)
|
||||
?: context.packageManager.getLeanbackLaunchIntentForPackage(PACKAGE)
|
||||
|
||||
fun openClientOrStore(context: Context): Boolean {
|
||||
val choices = listOfNotNull(
|
||||
clientIntent(context),
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$PACKAGE")),
|
||||
Intent(Intent.ACTION_VIEW, Uri.parse(STORE_URL)),
|
||||
)
|
||||
for (intent in choices) {
|
||||
try {
|
||||
context.startActivity(intent)
|
||||
return true
|
||||
} catch (_: ActivityNotFoundException) {
|
||||
} catch (_: SecurityException) {
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.droiddeck.launcher.lan
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.ui.PrimaryButton
|
||||
import com.droiddeck.launcher.ui.SecondaryButton
|
||||
import com.droiddeck.launcher.ui.SettingsGroup
|
||||
|
||||
@Composable
|
||||
internal fun SteamLinkCoopPanel(
|
||||
hostAddress: String?,
|
||||
hostRunning: Boolean,
|
||||
clientInstalled: Boolean,
|
||||
onHost: () -> Unit,
|
||||
onClient: () -> Unit,
|
||||
) {
|
||||
SettingsGroup(stringResource(R.string.lan_coop_title)) {
|
||||
Column(Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
Text(stringResource(R.string.lan_coop_overview))
|
||||
Text(stringResource(R.string.lan_coop_network))
|
||||
Text(stringResource(R.string.lan_coop_host))
|
||||
SecondaryButton(stringResource(if (hostRunning) R.string.lan_coop_return_host else R.string.lan_coop_open_launcher), onClick = onHost)
|
||||
if (hostAddress != null) {
|
||||
SelectionContainer { Text(stringResource(R.string.lan_coop_host_address, hostAddress)) }
|
||||
} else Text(stringResource(R.string.lan_coop_find_host))
|
||||
Text(stringResource(R.string.lan_coop_client))
|
||||
PrimaryButton(stringResource(if (clientInstalled) R.string.lan_coop_open_client else R.string.lan_coop_get_client), onClick = onClient)
|
||||
Text(stringResource(R.string.lan_coop_controllers))
|
||||
Text(stringResource(R.string.lan_coop_offline))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,9 @@ import android.provider.Settings
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.SessionPart
|
||||
import com.droiddeck.launcher.core.WifiDiscovery
|
||||
import com.droiddeck.launcher.lan.LanInterface
|
||||
import com.droiddeck.launcher.lan.LanAddress
|
||||
import com.droiddeck.launcher.lan.LocalLan
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.net.Inet4Address
|
||||
@@ -29,6 +32,7 @@ import org.json.JSONObject
|
||||
class LinuxNetworkLinkComponent(
|
||||
context: Context,
|
||||
private val rootDir: File,
|
||||
private val lanInterface: () -> LanInterface? = LocalLan::selectedInterface,
|
||||
) : SessionPart() {
|
||||
private val appContext = context.applicationContext
|
||||
private val connectivity =
|
||||
@@ -43,9 +47,16 @@ class LinuxNetworkLinkComponent(
|
||||
private var wifiReceiver: BroadcastReceiver? = null
|
||||
private var scanRequestStamp = 0L
|
||||
private var lastScanRequest = -SCAN_INTERVAL_MS
|
||||
private var publishedLanSelection: String? = null
|
||||
private var publishedLanInterface: LanInterface? = null
|
||||
@Volatile private var lastNamesAllowed = false
|
||||
private val scanRequests = object : Runnable {
|
||||
override fun run() {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = lanInterface()
|
||||
synchronized(lock) {
|
||||
if (selection != publishedLanSelection || lan != publishedLanInterface) write(currentProperties, currentCapabilities)
|
||||
}
|
||||
if (canReadWifiNames() != lastNamesAllowed) {
|
||||
synchronized(lock) { writeNetworkState(currentProperties, currentCapabilities) }
|
||||
requestWifiScan()
|
||||
@@ -153,11 +164,16 @@ class LinuxNetworkLinkComponent(
|
||||
private fun write(properties: LinkProperties?, capabilities: NetworkCapabilities?) {
|
||||
val file = File(rootDir, LINK_FILE)
|
||||
synchronized(lock) {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = lanInterface()
|
||||
try {
|
||||
file.parentFile?.mkdirs()
|
||||
val staged = File(file.path + ".staged")
|
||||
staged.writeText(describe(properties))
|
||||
staged.writeText(if (selection == null) describe(properties)
|
||||
else if (lan != null) describe(null, lan) else "")
|
||||
if (!staged.renameTo(file)) throw IOException("Could not replace $file")
|
||||
publishedLanSelection = selection
|
||||
publishedLanInterface = lan
|
||||
} catch (e: IOException) {
|
||||
Log.w(TAG, "Could not publish the network link", e)
|
||||
}
|
||||
@@ -167,13 +183,18 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private fun writeNetworkState(properties: LinkProperties?, capabilities: NetworkCapabilities?) {
|
||||
private fun writeNetworkState(defaultProperties: LinkProperties?, defaultCapabilities: NetworkCapabilities?) {
|
||||
val selection = LocalLan.selected.value
|
||||
val lan = if (selection != null) lanInterface() else null
|
||||
val properties = if (selection == null) defaultProperties else null
|
||||
val capabilities = if (selection == null) defaultCapabilities else null
|
||||
val namesAllowed = canReadWifiNames()
|
||||
lastNamesAllowed = namesAllowed
|
||||
val scans = if (namesAllowed && wifiManager?.isWifiEnabled == true) {
|
||||
try { wifiManager.scanResults.orEmpty() } catch (e: SecurityException) { emptyList() }
|
||||
} else emptyList()
|
||||
val transport = when {
|
||||
lan != null -> "other"
|
||||
capabilities == null -> "none"
|
||||
capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> "wifi"
|
||||
capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> "cellular"
|
||||
@@ -183,9 +204,10 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
val state = JSONObject().apply {
|
||||
put("transport", transport)
|
||||
put("interface", properties?.interfaceName ?: "android")
|
||||
put("mtu", properties?.mtu?.takeIf { it > 0 } ?: DEFAULT_MTU)
|
||||
put("connected", properties != null && capabilities != null)
|
||||
put("interface", lan?.name ?: properties?.interfaceName ?: "android")
|
||||
put("mtu", lan?.mtu ?: properties?.mtu?.takeIf { it > 0 } ?: DEFAULT_MTU)
|
||||
put("connected", lan != null || (properties != null && capabilities != null))
|
||||
put("localLan", selection != null)
|
||||
put("validated", capabilities?.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED) == true)
|
||||
put("captivePortal", capabilities?.hasCapability(NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL) == true)
|
||||
put("metered", capabilities?.let { !it.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED) })
|
||||
@@ -205,7 +227,7 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
})
|
||||
put("addresses", JSONArray().apply {
|
||||
properties?.linkAddresses.orEmpty().forEach {
|
||||
(lan?.addresses ?: properties?.linkAddresses.orEmpty().map { LanAddress(it.address, it.prefixLength) }).forEach {
|
||||
put(JSONObject().put("address", it.address.hostAddress?.substringBefore('%')).put("prefix", it.prefixLength))
|
||||
}
|
||||
})
|
||||
@@ -277,13 +299,14 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
}
|
||||
|
||||
private fun describe(properties: LinkProperties?): String {
|
||||
val addresses = properties?.linkAddresses.orEmpty()
|
||||
private fun describe(properties: LinkProperties?, lan: LanInterface? = null): String {
|
||||
val addresses = (lan?.addresses ?: properties?.linkAddresses.orEmpty().map { LanAddress(it.address, it.prefixLength) })
|
||||
.filter { it.address is Inet4Address || it.address is Inet6Address }
|
||||
val name = properties?.interfaceName?.takeIf { addresses.isNotEmpty() } ?: OFFLINE_NAME
|
||||
val mtu = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) properties?.mtu ?: 0 else 0
|
||||
val name = (lan?.name ?: properties?.interfaceName)?.takeIf { addresses.isNotEmpty() } ?: OFFLINE_NAME
|
||||
val mtu = lan?.mtu ?: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) properties?.mtu ?: 0 else 0
|
||||
return buildString {
|
||||
append("if $name $LINK_INDEX ${if (mtu > 0) mtu else DEFAULT_MTU}\n")
|
||||
append("if $name ${lan?.index ?: LINK_INDEX} ${if (mtu > 0) mtu else DEFAULT_MTU}\n")
|
||||
if (lan != null) append("selected 1\n")
|
||||
append("mac ${seededMac()}\n")
|
||||
if (addresses.isEmpty()) {
|
||||
append("addr $OFFLINE_ADDRESS\n")
|
||||
@@ -301,15 +324,18 @@ class LinuxNetworkLinkComponent(
|
||||
}
|
||||
}
|
||||
|
||||
private fun seededMac(): String {
|
||||
val id = Settings.Secure.getString(appContext.contentResolver, Settings.Secure.ANDROID_ID) ?: "bannerlator"
|
||||
val bytes = java.security.MessageDigest.getInstance("SHA-1").digest(id.toByteArray())
|
||||
val b0 = (bytes[0].toInt() and 0xfc) or 0x02
|
||||
return listOf(b0, bytes[1].toInt(), bytes[2].toInt(), bytes[3].toInt(), bytes[4].toInt(), bytes[5].toInt())
|
||||
.joinToString(":") { "%02x".format(it and 0xff) }
|
||||
}
|
||||
private fun seededMac(): String =
|
||||
seededMac { Settings.Secure.getString(appContext.contentResolver, Settings.Secure.ANDROID_ID) }
|
||||
|
||||
companion object {
|
||||
internal fun seededMac(readId: () -> String?): String {
|
||||
val id = runCatching(readId).getOrNull() ?: "bannerlator"
|
||||
val bytes = java.security.MessageDigest.getInstance("SHA-1").digest(id.toByteArray())
|
||||
val b0 = (bytes[0].toInt() and 0xfc) or 0x02
|
||||
return listOf(b0, bytes[1].toInt(), bytes[2].toInt(), bytes[3].toInt(), bytes[4].toInt(), bytes[5].toInt())
|
||||
.joinToString(":") { "%02x".format(it and 0xff) }
|
||||
}
|
||||
|
||||
private const val TAG = "LinuxNetworkLink"
|
||||
private const val LINK_FILE = "etc/droiddeck-net"
|
||||
private const val LINK_INDEX = 2
|
||||
|
||||
@@ -110,6 +110,11 @@ public final class LinuxRuntime {
|
||||
File root = rootDir(context);
|
||||
List<String> binds = binds(context, sessionRoot, runtimeDir, externalStorage, extraBinds);
|
||||
if (sessionRoot != null) lastBinds = binds;
|
||||
return commandWithBinds(context, root, binds, guestCommand);
|
||||
}
|
||||
|
||||
public static List<String> commandWithBinds(Context context, File root, List<String> binds,
|
||||
List<String> guestCommand) {
|
||||
List<String> cmd = prootPrefix(context, root, "/root");
|
||||
for (String spec : binds) bind(cmd, spec);
|
||||
cmd.addAll(guestCommand);
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.FrontEndActivity
|
||||
import com.droiddeck.launcher.R
|
||||
|
||||
class RuntimeInstallService : Service() {
|
||||
@@ -75,7 +75,7 @@ class RuntimeInstallService : Service() {
|
||||
enableVibration(false)
|
||||
})
|
||||
val open = PendingIntent.getActivity(this, 0,
|
||||
Intent(this, MainActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
|
||||
Intent(this, FrontEndActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
|
||||
PendingIntent.FLAG_IMMUTABLE)
|
||||
return Notification.Builder(this, CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.ic_stat_session)
|
||||
|
||||
@@ -51,7 +51,7 @@ object BootMovie {
|
||||
SessionPrefs.setBootMovieApplyNext(context, true)
|
||||
BootMovieReport.note(context, "picked $id here; Steam names ${SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context))}")
|
||||
// Whatever Steam names right now is about to be replaced, so it is not a pick to adopt later.
|
||||
SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context))?.let { SessionPrefs.setBootMovieSteamSeen(context, it) }
|
||||
SessionFiles.startupMovieLocalPath(BootMovieLibrary.steamConfig(context))?.let { SessionPrefs.setBootMovieSteamSeen(context, it) }
|
||||
}
|
||||
|
||||
fun customName(context: Context): String? =
|
||||
@@ -167,10 +167,12 @@ object BootMovie {
|
||||
* that movie becomes the choice here. Steam already plays it, so nothing is staged over it. True when the choice changed.
|
||||
*/
|
||||
fun syncFromSteam(context: Context): Boolean {
|
||||
val path = SessionFiles.startupMoviePath(BootMovieLibrary.steamConfig(context)) ?: return false
|
||||
if (path == SessionPrefs.bootMovieSteamSeen(context)) return false
|
||||
SessionPrefs.setBootMovieSteamSeen(context, path)
|
||||
if (path == SessionFiles.BOOT_MOVIE_PATH) return false
|
||||
val named = SessionFiles.startupMovieLocalPath(BootMovieLibrary.steamConfig(context)) ?: return false
|
||||
val seen = SessionPrefs.bootMovieSteamSeen(context)
|
||||
if (named == seen) return false
|
||||
SessionPrefs.setBootMovieSteamSeen(context, named)
|
||||
if (named == SessionFiles.BOOT_MOVIE_PATH || (named.isEmpty() && seen == null)) return false
|
||||
val path = named.ifEmpty { "/movies/steam_os_startup.webm" }
|
||||
val prefix = "/uioverrides/movies/"
|
||||
// The list names a bought movie from the Steam folder (/config/communityitemscache/...), Steam's config from its config folder.
|
||||
val id = if (path.startsWith(prefix)) BootMovieLibrary.idOf(path.removePrefix(prefix)) else {
|
||||
|
||||
@@ -79,8 +79,9 @@ object BootMovieLibrary {
|
||||
return customMovieDirs(context).map { File(it, name) }.firstOrNull { it.isFile && it.length() > 0L }
|
||||
}
|
||||
|
||||
private fun isMovie(file: File) = file.isFile && file.length() > 0L && file.name.endsWith(".webm", ignoreCase = true) &&
|
||||
file.name !in STAGED && !file.name.startsWith(".")
|
||||
private fun isMovie(file: File) = isWebm(file) && file.name !in STAGED
|
||||
|
||||
private fun isWebm(file: File) = file.isFile && file.length() > 0L && file.name.endsWith(".webm", ignoreCase = true) && !file.name.startsWith(".")
|
||||
|
||||
private fun readMeta(context: Context): JSONObject =
|
||||
runCatching { JSONObject(metaFile(context).readText()) }.getOrDefault(JSONObject())
|
||||
@@ -136,7 +137,7 @@ object BootMovieLibrary {
|
||||
}
|
||||
val bought = HashMap<String, String>()
|
||||
for (root in steamRoots(context)) {
|
||||
File(root, "steamui/movies").listFiles { f -> isMovie(f) && f.nameWithoutExtension.lowercase() in NATIVE }.orEmpty()
|
||||
File(root, "steamui/movies").listFiles { f -> isWebm(f) && f.nameWithoutExtension.lowercase() in NATIVE }.orEmpty()
|
||||
.sortedBy { it.name.lowercase() }.forEach { steam.putIfAbsent(STEAM_PREFIX + "/movies/" + it.name, it) }
|
||||
val scan = pointShopMovies(root)
|
||||
bought.putAll(scan.titles)
|
||||
@@ -144,8 +145,8 @@ object BootMovieLibrary {
|
||||
}
|
||||
val seen = HashSet<String>()
|
||||
for ((id, file) in steam) {
|
||||
if (file.name in STAGED || !seen.add(file.canonicalPath)) continue
|
||||
val native = file.nameWithoutExtension.lowercase() in NATIVE
|
||||
if ((file.name in STAGED && !native) || !seen.add(file.canonicalPath)) continue
|
||||
// Steam names a bought movie by an item number and a hash; the points shop's own title is shown when Steam has it.
|
||||
val title = if (native) NATIVE[file.nameWithoutExtension.lowercase()] ?: file.nameWithoutExtension else bought[file.path] ?: boughtId(file)?.let { "#$it" } ?: file.nameWithoutExtension
|
||||
out.add(Entry(id, title, if (native) SOURCE_STEAM else SOURCE_POINTSHOP, file, removable = false))
|
||||
@@ -153,8 +154,11 @@ object BootMovieLibrary {
|
||||
return out
|
||||
}
|
||||
|
||||
/** The three startup movies Steam ships with; Steam's movies folder holds many more videos that are not startup movies. */
|
||||
private val NATIVE = mapOf("deck_startup" to "Deck startup", "oled_startup" to "Oled startup", "startup_machine" to "Machine startup")
|
||||
/** The four startup movies Steam ships with; Steam's movies folder holds many more videos that are not startup movies. */
|
||||
private val NATIVE = mapOf(
|
||||
"deck_startup" to "Deck startup", "oled_startup" to "Oled startup", "startup_machine" to "Machine startup",
|
||||
"steam_os_startup" to "SteamOS startup",
|
||||
)
|
||||
|
||||
private val skippedFolders = setOf("uioverrides", "steamapps", "librarycache", "httpcache", "logs", "compatdata", "shadercache")
|
||||
|
||||
|
||||
@@ -721,13 +721,19 @@ object ComponentsManager {
|
||||
class StoredOriginal(val protonId: String, val protonName: String?, val comp: String, val protonVersion: String, val size: Long, val kept: Boolean)
|
||||
class Stored(val packages: List<StoredPackage>, val originals: List<StoredOriginal>)
|
||||
|
||||
private fun packagesInUse(state: JSONObject): Set<String> {
|
||||
internal fun liveSelection(key: String, entry: JSONObject, proton: Proton?): Boolean =
|
||||
proton != null && (key == "queued" || entry.optString("protonVersion") == proton.version)
|
||||
|
||||
private fun packagesInUse(state: JSONObject, installed: Map<String, Proton>): Set<String> {
|
||||
val names = HashSet<String>()
|
||||
for (key in listOf("active", "queued")) {
|
||||
val byProton = state.optJSONObject(key) ?: continue
|
||||
for (pid in byProton.keys()) {
|
||||
val comps = byProton.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) comps.optJSONObject(comp)?.optString("file")?.takeIf { it.isNotEmpty() }?.let(names::add)
|
||||
for (comp in comps.keys()) {
|
||||
val entry = comps.optJSONObject(comp) ?: continue
|
||||
if (liveSelection(key, entry, installed[pid])) entry.optString("file").takeIf { it.isNotEmpty() }?.let(names::add)
|
||||
}
|
||||
}
|
||||
}
|
||||
val profiles = state.optJSONObject("profiles")
|
||||
@@ -747,8 +753,8 @@ object ComponentsManager {
|
||||
|
||||
fun stored(context: Context): Stored = synchronized(lock) {
|
||||
val state = loadState(context)
|
||||
val used = packagesInUse(state)
|
||||
val installed = protons(context).associateBy { it.id }
|
||||
val installed = protons(context).distinctBy { it.id }.associateBy { it.id }
|
||||
val used = packagesInUse(state, installed)
|
||||
val originals = originalsDir(context).listFiles()?.filter { it.isDirectory }?.flatMap { proton ->
|
||||
proton.listFiles()?.filter { it.isDirectory }?.flatMap { version ->
|
||||
COMPONENTS.mapNotNull { comp ->
|
||||
@@ -774,27 +780,50 @@ object ComponentsManager {
|
||||
true
|
||||
}
|
||||
|
||||
fun forgetProton(context: Context, dirName: String) {
|
||||
synchronized(lock) {
|
||||
val id = safeName(dirName)
|
||||
if (protons(context).any { it.id == id }) return
|
||||
val state = loadState(context)
|
||||
val selected = listOf("active", "queued").map { state.sub(it).remove(id) != null }.any { it }
|
||||
if (selected && runCatching { saveState(context, state) }.onFailure { Log.w(TAG, "forget $id", it) }.isFailure) return
|
||||
File(originalsDir(context), id).deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
fun deletePackage(context: Context, file: String): String = synchronized(lock) {
|
||||
val name = safeName(file)
|
||||
val state = loadState(context)
|
||||
val queued = state.sub("queued")
|
||||
for (pid in queued.keys()) {
|
||||
val comps = queued.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) check(comps.optJSONObject(comp)?.optString("file") != name) { context.getString(R.string.cmgr_package_in_use, name, pid) }
|
||||
}
|
||||
val active = state.sub("active")
|
||||
for (pid in active.keys()) {
|
||||
val comps = active.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys()) check(comps.optJSONObject(comp)?.optString("file") != name) { context.getString(R.string.cmgr_package_in_use, name, pid) }
|
||||
}
|
||||
val profiles = state.sub("profiles")
|
||||
for (scope in profiles.keys()) {
|
||||
val profile = profiles.optJSONObject(scope) ?: continue
|
||||
check(COMPONENTS.none { profile.optString(it) == name }) { context.getString(R.string.cmgr_package_in_use, name, scope) }
|
||||
val installed = protons(context).distinctBy { it.id }.associateBy { it.id }
|
||||
var changed = false
|
||||
for (key in listOf("queued", "active")) {
|
||||
val byProton = state.sub(key)
|
||||
for (pid in byProton.keys().asSequence().toList()) {
|
||||
val comps = byProton.optJSONObject(pid) ?: continue
|
||||
for (comp in comps.keys().asSequence().toList()) {
|
||||
val entry = comps.optJSONObject(comp) ?: continue
|
||||
if (entry.optString("file") != name) continue
|
||||
check(!liveSelection(key, entry, installed[pid])) { context.getString(R.string.cmgr_package_in_use, name, installed[pid]?.name ?: pid) }
|
||||
comps.remove(comp)
|
||||
changed = true
|
||||
}
|
||||
if (comps.length() == 0) byProton.remove(pid)
|
||||
}
|
||||
}
|
||||
val f = File(packagesDir(context), name)
|
||||
check(f.isFile) { context.getString(R.string.cmgr_package_not_stored, name) }
|
||||
f.delete()
|
||||
val profiles = state.sub("profiles")
|
||||
for (scope in profiles.keys().asSequence().toList()) {
|
||||
val profile = profiles.optJSONObject(scope) ?: continue
|
||||
for (comp in COMPONENTS.filter { profile.optString(it) == name }) {
|
||||
rememberProfiledComponent(state, comp)
|
||||
profile.remove(comp)
|
||||
changed = true
|
||||
}
|
||||
if (profile.length() == 0) profiles.remove(scope)
|
||||
}
|
||||
check(f.delete()) { name }
|
||||
if (changed) saveState(context, state)
|
||||
context.getString(R.string.cmgr_deleted, name)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ object GpuClockPin {
|
||||
pinned = true
|
||||
"gpu clock: held at its top"
|
||||
} catch (t: Throwable) {
|
||||
File(context.filesDir, MARKER).delete()
|
||||
Log.w(TAG, "pin", t)
|
||||
"gpu clock: pin failed"
|
||||
}
|
||||
|
||||
@@ -87,11 +87,10 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
if (line.startsWith("== STEP ")) {
|
||||
stepAt = at
|
||||
stepText = line.substringAfter("== STEP ").substringAfter(' ')
|
||||
val m = INSTALL_COUNT.find(line)
|
||||
if (m != null) {
|
||||
clientDownload(line)?.let { (what, percent) ->
|
||||
clientDownloadAt = at
|
||||
clientDownload = m.groupValues[1]
|
||||
clientPercent = m.groupValues[2].toInt() * 100 / maxOf(1, m.groupValues[3].toInt())
|
||||
clientDownload = what
|
||||
clientPercent = percent
|
||||
}
|
||||
} else {
|
||||
val m = UPDATE_PROGRESS.find(line)
|
||||
@@ -132,6 +131,19 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun clientDownload(line: String): Pair<String, Int>? {
|
||||
val count = INSTALL_COUNT.find(line) ?: return null
|
||||
val mb = INSTALL_MEGABYTES.find(line.substring(count.range.last + 1))
|
||||
val done = mb?.groupValues?.get(1)?.toLongOrNull()
|
||||
val total = mb?.groupValues?.get(2)?.toLongOrNull()
|
||||
if (done != null && total != null && total > 0) {
|
||||
return "$done / $total MB" to (done * 100 / total).toInt().coerceIn(0, 100)
|
||||
}
|
||||
val part = count.groupValues[2].toIntOrNull() ?: return null
|
||||
val all = count.groupValues[3].toIntOrNull() ?: return null
|
||||
return count.groupValues[1] to (part.toLong() * 100 / maxOf(1, all)).coerceIn(0L, 100L).toInt()
|
||||
}
|
||||
|
||||
internal fun readableScriptStep(scriptStep: String): Boolean {
|
||||
val t = scriptStep.lowercase()
|
||||
return t.startsWith("download") || t.startsWith("checking the linux") || t.startsWith("unpacking") || t.startsWith("installing")
|
||||
@@ -140,5 +152,6 @@ class LoadingState(context: Context, private val steam: Boolean = true) {
|
||||
private const val TAIL_BYTES = 48L * 1024
|
||||
private val UPDATE_PROGRESS = Regex("""Downloading update \((\d+) of (\d+) KB\)""")
|
||||
private val INSTALL_COUNT = Regex("""downloading Steam: (\S+) \((\d+)/(\d+)\)""")
|
||||
private val INSTALL_MEGABYTES = Regex("""^, (\d+) of (\d+) MB""")
|
||||
}
|
||||
}
|
||||
@@ -136,11 +136,13 @@ object ProtonExtras {
|
||||
|
||||
fun remove(context: Context, tool: Tool, dir: String? = null) {
|
||||
val name = if (dir != null) dir.takeIf { it in installedAll(context, tool) } ?: return else installed(context, tool) ?: return
|
||||
File(toolsDir(context), name).deleteRecursively()
|
||||
if (File(toolsDir(context), name).deleteRecursively()) ComponentsManager.forgetProton(context, name)
|
||||
}
|
||||
|
||||
fun removeOlder(context: Context, tool: Tool) {
|
||||
installedAll(context, tool).dropLast(1).forEach { File(toolsDir(context), it).deleteRecursively() }
|
||||
installedAll(context, tool).dropLast(1).forEach {
|
||||
if (File(toolsDir(context), it).deleteRecursively()) ComponentsManager.forgetProton(context, it)
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -200,22 +200,86 @@ object SessionArtifacts {
|
||||
internal fun recordedClient(dir: File): String? =
|
||||
runCatching { File(dir, CLIENT_FILE).readText().trim() }.getOrNull()?.takeIf { it == "arm64" || it == "x86_64" }
|
||||
|
||||
private const val LOG_MARKS = "steam-log-marks.txt"
|
||||
private const val MAX_STEAM_LOG = 8L * 1024 * 1024
|
||||
private const val HEAD = 4096L
|
||||
|
||||
private class Mark(val size: Long, val head: String)
|
||||
|
||||
fun markSteamLogs(dir: File, logs: File) {
|
||||
val lines = logs.listFiles { f -> f.isFile }?.mapNotNull { f ->
|
||||
val size = f.length()
|
||||
head(f, size)?.let { "$size\t$it\t${f.name}" }
|
||||
} ?: return
|
||||
runCatching { File(dir, LOG_MARKS).writeText(lines.joinToString("") { "$it\n" }) }
|
||||
}
|
||||
|
||||
private fun head(f: File, length: Long): String? = runCatching {
|
||||
val buf = ByteArray(minOf(length, HEAD).toInt())
|
||||
f.inputStream().use { input ->
|
||||
var off = 0
|
||||
while (off < buf.size) {
|
||||
val n = input.read(buf, off, buf.size - off)
|
||||
if (n < 0) return@runCatching null
|
||||
off += n
|
||||
}
|
||||
}
|
||||
java.security.MessageDigest.getInstance("SHA-1").digest(buf).joinToString("") { "%02x".format(it) }
|
||||
}.getOrNull()
|
||||
|
||||
private fun steamLogMarks(dir: File): List<Mark>? = runCatching {
|
||||
File(dir, LOG_MARKS).readLines().mapNotNull { line ->
|
||||
val parts = line.split('\t', limit = 3)
|
||||
parts.getOrNull(0)?.toLongOrNull()?.let { size -> parts.getOrNull(1)?.let { Mark(size, it) } }
|
||||
}
|
||||
}.getOrNull()
|
||||
|
||||
private fun startOf(src: File, size: Long, marks: List<Mark>): Long {
|
||||
val heads = HashMap<Long, String?>()
|
||||
return marks.filter { it.size <= size }.sortedByDescending { it.size }
|
||||
.firstOrNull { m -> heads.getOrPut(minOf(m.size, HEAD)) { head(src, m.size) } == m.head }?.size ?: 0L
|
||||
}
|
||||
|
||||
private fun copySteamLogs(context: Context, dir: File, record: Record, steamArch: String? = null) {
|
||||
val logs = File(steamArch?.let { SessionPrefs.steamRoot(context, it) } ?: SessionPrefs.activeSteamRoot(context), "logs")
|
||||
if (!logs.isDirectory) return
|
||||
val out = File(dir, "steam").apply { mkdirs() }
|
||||
logs.listFiles { f -> f.isFile && f.length() < 8L * 1024 * 1024 }?.forEach { src ->
|
||||
copySessionLogs(logs, dir, out).forEach { dst -> record.files[dst] = Scrubbed(dst.length(), dst.lastModified()) }
|
||||
Log.i(TAG, "collected ${out.listFiles()?.size ?: 0} Steam log(s), scrubbed, into $out")
|
||||
}
|
||||
|
||||
internal fun copySessionLogs(logs: File, dir: File, out: File): List<File> {
|
||||
val marks = steamLogMarks(dir)
|
||||
val copied = ArrayList<File>()
|
||||
logs.listFiles { f -> f.isFile }?.forEach { src ->
|
||||
val size = src.length()
|
||||
val from = marks?.let { startOf(src, size, it) } ?: 0L
|
||||
if (marks != null && from == size || size - from >= MAX_STEAM_LOG) return@forEach
|
||||
try {
|
||||
val dst = File(out, src.name)
|
||||
dst.bufferedWriter().use { w ->
|
||||
src.forEachLine { line -> w.write(LogRedactor.redact(line)); w.newLine() }
|
||||
src.inputStream().buffered().use { input ->
|
||||
var left = if (from > 0) from - 1 else 0L
|
||||
while (left > 0) {
|
||||
val skipped = input.skip(left)
|
||||
if (skipped <= 0) break
|
||||
left -= skipped
|
||||
}
|
||||
if (from > 0 && input.read() != '\n'.code) {
|
||||
while (true) {
|
||||
val c = input.read()
|
||||
if (c < 0 || c == '\n'.code) break
|
||||
}
|
||||
}
|
||||
dst.bufferedWriter().use { w ->
|
||||
input.bufferedReader().forEachLine { line -> w.write(LogRedactor.redact(line)); w.newLine() }
|
||||
}
|
||||
}
|
||||
record.files[dst] = Scrubbed(dst.length(), dst.lastModified())
|
||||
copied.add(dst)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "could not scrub ${src.name}", e)
|
||||
}
|
||||
}
|
||||
Log.i(TAG, "collected ${out.listFiles()?.size ?: 0} Steam log(s), scrubbed, into $out")
|
||||
return copied
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -58,6 +58,7 @@ object SessionFiles {
|
||||
"usr/local/bin/droiddeck-steam-install" to "usr/local/bin/droiddeck-steam-install",
|
||||
"usr/local/bin/droiddeck-steam-ui-scale" to "usr/local/bin/droiddeck-steam-ui-scale",
|
||||
"usr/local/bin/droiddeck-steam-language" to "usr/local/bin/droiddeck-steam-language",
|
||||
"usr/local/bin/droiddeck-steam-shaders" to "usr/local/bin/droiddeck-steam-shaders",
|
||||
"usr/local/bin/droiddeck-steam-desktop-ui" to "usr/local/bin/droiddeck-steam-desktop-ui",
|
||||
"usr/local/bin/droiddeck-steam-library" to "usr/local/bin/droiddeck-steam-library",
|
||||
"usr/local/bin/droiddeck-seed-redists" to "usr/local/bin/droiddeck-seed-redists",
|
||||
@@ -78,6 +79,7 @@ object SessionFiles {
|
||||
"usr/local/bin/droiddeck-steam-games" to "usr/local/bin/droiddeck-steam-games",
|
||||
"usr/local/bin/droiddeck-pad-defaults" to "usr/local/bin/droiddeck-pad-defaults",
|
||||
"usr/local/bin/droiddeck-steam-x64" to "usr/local/bin/droiddeck-steam-x64",
|
||||
"usr/local/bin/droiddeck-steamrt-shim" to "usr/local/bin/droiddeck-steamrt-shim",
|
||||
"usr/local/bin/droiddeck-x64-arm-proton" to "usr/local/bin/droiddeck-x64-arm-proton",
|
||||
"usr/local/bin/droiddeck-x64-arm-webhelper" to "usr/local/bin/droiddeck-x64-arm-webhelper",
|
||||
"usr/local/bin/droiddeck-x64-webhelper" to "usr/local/bin/droiddeck-x64-webhelper",
|
||||
@@ -388,10 +390,12 @@ object SessionFiles {
|
||||
private fun activeStartupMovie(text: String): VdfBlock? = customizationMovie(text) ?: olderMovie(text)
|
||||
|
||||
/** The movie Steam's config selects, as a path like `/uioverrides/movies/x.webm`; null when none is named. */
|
||||
internal fun startupMoviePath(config: File): String? {
|
||||
internal fun startupMoviePath(config: File): String? = startupMovieLocalPath(config)?.takeIf { it.isNotEmpty() }
|
||||
|
||||
internal fun startupMovieLocalPath(config: File): String? {
|
||||
val text = runCatching { config.readText() }.getOrNull() ?: return null
|
||||
val movie = activeStartupMovie(text) ?: return null
|
||||
return scalar(text.substring(movie.keyStart, movie.close + 1), "LocalPath")?.takeIf { it.isNotEmpty() }
|
||||
return scalar(text.substring(movie.keyStart, movie.close + 1), "LocalPath")
|
||||
}
|
||||
|
||||
/** Both `StartupMovie` sections of Steam's config as written there, for the report; null when there is none. */
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.Context
|
||||
import android.content.pm.ActivityInfo
|
||||
import androidx.annotation.StringRes
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.CpuAllocationDefaults
|
||||
import com.droiddeck.launcher.core.GameEnvironment
|
||||
import com.droiddeck.launcher.core.TextureFiltering
|
||||
import com.droiddeck.launcher.gpu.Cardboard
|
||||
@@ -50,9 +49,9 @@ object SessionPrefs {
|
||||
)
|
||||
|
||||
fun orientation(context: Context): Int =
|
||||
prefs(context).getInt("orientation", ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
|
||||
prefs(context).getInt("orientation", ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
|
||||
.takeIf { value -> orientationOptions.any { it.first == value } }
|
||||
?: ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
?: ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
||||
|
||||
fun setOrientation(context: Context, orientation: Int) {
|
||||
require(orientationOptions.any { it.first == orientation })
|
||||
@@ -263,6 +262,19 @@ object SessionPrefs {
|
||||
const val GPU_DRIVERS_MANUAL = "manual"
|
||||
const val GPU_DRIVERS_MIX = "mix"
|
||||
|
||||
const val TP_UBWC_AUTO = "auto"
|
||||
const val TP_UBWC_ON = "on"
|
||||
const val TP_UBWC_OFF = "off"
|
||||
|
||||
fun tpUbwcMode(context: Context): String =
|
||||
prefs(context).getString("tpUbwcMode", TP_UBWC_AUTO)
|
||||
?.takeIf { it in setOf(TP_UBWC_AUTO, TP_UBWC_ON, TP_UBWC_OFF) } ?: TP_UBWC_AUTO
|
||||
|
||||
fun setTpUbwcMode(context: Context, mode: String) {
|
||||
require(mode in setOf(TP_UBWC_AUTO, TP_UBWC_ON, TP_UBWC_OFF))
|
||||
prefs(context).edit().putString("tpUbwcMode", mode).commit()
|
||||
}
|
||||
|
||||
fun gpuDriverMode(context: Context): String =
|
||||
prefs(context).getString("gpuDriverMode", GPU_DRIVERS_AUTO) ?: GPU_DRIVERS_AUTO
|
||||
|
||||
@@ -304,6 +316,34 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("returnAfterGame", on).apply()
|
||||
}
|
||||
|
||||
private fun shaderPrecacheApplied(context: Context) =
|
||||
java.io.File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.bl-shader-precache-applied")
|
||||
|
||||
/**
|
||||
* Shader pre-caching as the launcher last set it, until a session reports it written into the
|
||||
* client's config.vdf; after that the client's own toggle is the user's again.
|
||||
*/
|
||||
fun pendingShaderPrecache(context: Context): Boolean? {
|
||||
val prefs = prefs(context)
|
||||
if (!prefs.contains("shaderPrecache")) return null
|
||||
val on = prefs.getBoolean("shaderPrecache", true)
|
||||
val applied = shaderPrecacheApplied(context)
|
||||
val written = runCatching { applied.readText().trim() }.getOrNull() ?: return on
|
||||
applied.delete()
|
||||
if (written != if (on) "1" else "0") return on
|
||||
prefs.edit().remove("shaderPrecache").apply()
|
||||
return null
|
||||
}
|
||||
|
||||
fun setShaderPrecache(context: Context, on: Boolean) {
|
||||
shaderPrecacheApplied(context).delete()
|
||||
prefs(context).edit().putBoolean("shaderPrecache", on).apply()
|
||||
}
|
||||
|
||||
fun shaderPrecache(context: Context): Boolean = pendingShaderPrecache(context)
|
||||
?: runCatching { com.droiddeck.launcher.storage.SteamStorage.shaderPrecache(
|
||||
java.io.File(steamRoot(context, steamClientArch(context)), "config/config.vdf").readText()) }.getOrDefault(true)
|
||||
|
||||
fun stretch16x9(context: Context): Boolean = prefs(context).getBoolean("stretch16x9", false)
|
||||
|
||||
fun setStretch16x9(context: Context, on: Boolean) {
|
||||
@@ -341,30 +381,19 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("wifiDiscoveryAsked", true).apply()
|
||||
}
|
||||
|
||||
internal data class CoreAllocation(val clientOverride: Boolean, val clientCpus: String, val gameCpus: String)
|
||||
|
||||
internal fun coreAllocation(context: Context, defaults: CpuAllocationDefaults.Allocation? = CpuAllocationDefaults.device): CoreAllocation {
|
||||
val saved = prefs(context)
|
||||
return CoreAllocation(
|
||||
saved.getBoolean("clientCpusOverride", defaults != null && !saved.contains("clientCpus")),
|
||||
saved.getString("clientCpus", defaults?.client.orEmpty()).orEmpty(),
|
||||
saved.getString("gameCpus", defaults?.game.orEmpty()).orEmpty(),
|
||||
)
|
||||
}
|
||||
|
||||
fun clientCpusOverride(context: Context): Boolean = coreAllocation(context).clientOverride
|
||||
fun clientCpusOverride(context: Context): Boolean = prefs(context).getBoolean("clientCpusOverride", false)
|
||||
|
||||
fun setClientCpusOverride(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("clientCpusOverride", on).apply()
|
||||
}
|
||||
|
||||
fun clientCpus(context: Context): String = coreAllocation(context).clientCpus
|
||||
fun clientCpus(context: Context): String = prefs(context).getString("clientCpus", "").orEmpty()
|
||||
|
||||
fun setClientCpus(context: Context, list: String) {
|
||||
prefs(context).edit().putString("clientCpus", list).apply()
|
||||
}
|
||||
|
||||
fun gameCpus(context: Context): String = coreAllocation(context).gameCpus
|
||||
fun gameCpus(context: Context): String = prefs(context).getString("gameCpus", "").orEmpty()
|
||||
|
||||
fun setGameCpus(context: Context, list: String) {
|
||||
prefs(context).edit().putString("gameCpus", list).apply()
|
||||
@@ -376,7 +405,7 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("noXalia", on).apply()
|
||||
}
|
||||
|
||||
fun fastSync(context: Context): Boolean = prefs(context).getBoolean("fastSync", false)
|
||||
fun fastSync(context: Context): Boolean = prefs(context).getBoolean("fastSync", true)
|
||||
|
||||
fun setFastSync(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("fastSync", on).apply()
|
||||
@@ -411,6 +440,17 @@ object SessionPrefs {
|
||||
.apply()
|
||||
}
|
||||
|
||||
fun applyNtsyncDefault(context: Context) {
|
||||
val prefs = prefs(context)
|
||||
if (prefs.getBoolean("ntsyncDefaultV1", false)) return
|
||||
prefs.edit()
|
||||
.putBoolean("fastSync", true)
|
||||
.putBoolean("fsyncFirst", false)
|
||||
.putBoolean("syncFallback", true)
|
||||
.putBoolean("ntsyncDefaultV1", true)
|
||||
.apply()
|
||||
}
|
||||
|
||||
fun syncFallback(context: Context): Boolean = prefs(context).getBoolean("syncFallback", true)
|
||||
|
||||
fun setSyncFallback(context: Context, on: Boolean) {
|
||||
@@ -444,6 +484,13 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("prootFastPath", on).apply()
|
||||
}
|
||||
|
||||
/** gamescope draws the cursor itself. Off by default: on a phone that plane costs frames. */
|
||||
fun cursorComposite(context: Context): Boolean = prefs(context).getBoolean("cursorComposite", false)
|
||||
|
||||
fun setCursorComposite(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("cursorComposite", on).apply()
|
||||
}
|
||||
|
||||
const val DEFAULT_GUEST_HOSTNAME = "DroidDeck"
|
||||
|
||||
@JvmStatic
|
||||
@@ -764,6 +811,14 @@ object SessionPrefs {
|
||||
it.getInt("gradientSecondary", com.droiddeck.launcher.ui.Themes.DEFAULT_SECONDARY)
|
||||
}
|
||||
|
||||
/** How fast the Inner Gamer theme cycles its colours, 1 to 10. */
|
||||
fun rgbSpeed(context: Context): Int =
|
||||
prefs(context).getInt("innerGamerSpeed", com.droiddeck.launcher.ui.Themes.DEFAULT_RGB_SPEED).coerceIn(1, com.droiddeck.launcher.ui.Themes.RGB_SPEEDS)
|
||||
|
||||
fun setRgbSpeed(context: Context, speed: Int) {
|
||||
prefs(context).edit().putInt("innerGamerSpeed", speed.coerceIn(1, com.droiddeck.launcher.ui.Themes.RGB_SPEEDS)).apply()
|
||||
}
|
||||
|
||||
fun setGradientColors(context: Context, primary: Int, secondary: Int) {
|
||||
prefs(context).edit().putInt("gradientPrimary", primary).putInt("gradientSecondary", secondary).apply()
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ class SessionService : Service() {
|
||||
private val steamDownloadMonitor = SteamDownloadMonitor()
|
||||
private var downloadMonitorTask: Runnable? = null
|
||||
private var downloadActive = false
|
||||
private var clientInstallActive = false
|
||||
@Volatile private var steamLibraryMounts = emptyMap<String, File>()
|
||||
private var suspendDownloadNow = false
|
||||
private var suspendPolicy = SessionPrefs.SUSPEND_MANUAL
|
||||
@@ -321,6 +322,7 @@ class SessionService : Service() {
|
||||
suspendDownloadNow = false
|
||||
steamDownloadMonitor.reset()
|
||||
downloadActive = false
|
||||
clientInstallActive = false
|
||||
steamSleepToken = null
|
||||
completeNativeSleep()
|
||||
suspendOperationPending = false
|
||||
@@ -328,6 +330,9 @@ class SessionService : Service() {
|
||||
suspendAttemptFailed = false
|
||||
suspendController = null
|
||||
SessionState.suspended = false
|
||||
SessionState.resumeRequested = false
|
||||
SessionState.resuming = false
|
||||
SessionState.resumeFailed = false
|
||||
SessionState.pipActive = false
|
||||
pipTask = false
|
||||
SessionState.program = intent?.getStringExtra(EXTRA_PROGRAM)
|
||||
@@ -394,7 +399,7 @@ class SessionService : Service() {
|
||||
|
||||
private fun runSession(gen: Int) {
|
||||
SessionTerminal.clear()
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice()
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice(this)
|
||||
try {
|
||||
LinuxRuntime.writeAccounts(this)
|
||||
} catch (e: Exception) {
|
||||
@@ -615,9 +620,15 @@ class SessionService : Service() {
|
||||
helperRoots = { components.mapNotNull { it.suspendPid().takeIf { pid -> pid > 1 } } },
|
||||
suspendAudio = {
|
||||
if (!pulse.setSinkSuspended(true)) Log.w(TAG, "could not suspend audio sink")
|
||||
if (!pulse.setMicSuspended(true)) Log.w(TAG, "could not suspend microphone source")
|
||||
val relay = components.firstNotNullOfOrNull { it as? DirectAudioRelayComponent }
|
||||
if (relay != null && !relay.awaitMicReleased(MIC_RELEASE_TIMEOUT_MS)) {
|
||||
Log.w(TAG, "microphone still open after ${MIC_RELEASE_TIMEOUT_MS} ms; suspending anyway")
|
||||
}
|
||||
},
|
||||
resumeAudio = {
|
||||
if (!pulse.setSinkSuspended(false)) Log.w(TAG, "could not resume audio sink")
|
||||
if (!pulse.setMicSuspended(false)) Log.w(TAG, "could not resume microphone source")
|
||||
},
|
||||
zramControl = File(filesDir, "${LinuxRuntime.DIR}/tmp/.bl-zram"),
|
||||
pagedOut = { processes, unacknowledged, residentKb, swapKb, swapBeforeKb, millis ->
|
||||
@@ -631,8 +642,8 @@ class SessionService : Service() {
|
||||
}
|
||||
},
|
||||
)
|
||||
mainHandler.post { updateSuspendPolicy() }
|
||||
updateDownloadMonitoring()
|
||||
mainHandler.post { updateSuspendPolicy() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,6 +675,7 @@ class SessionService : Service() {
|
||||
com.droiddeck.launcher.core.AppLanguage.system(this).country,
|
||||
))
|
||||
guest.add("TZ=" + java.util.TimeZone.getDefault().id)
|
||||
if (SessionState.mode == MODE_STEAM) SessionPrefs.pendingShaderPrecache(this)?.let { guest.add("BL_SHADER_PRECACHE=" + if (it) "1" else "0") }
|
||||
guest.add("XDG_RUNTIME_DIR=" + LinuxRuntime.GUEST_RUNTIME_DIR)
|
||||
guest.add("XDG_SESSION_TYPE=wayland")
|
||||
guest.add("WAYLAND_DISPLAY=wayland-0")
|
||||
@@ -686,7 +698,6 @@ class SessionService : Service() {
|
||||
val tuOverride = tuDebugOverride()
|
||||
val tuDriver = sysmemDriver(linuxDriverId)
|
||||
(tuOverride ?: "sysmem".takeIf { tuDriver || SessionPrefs.tuSysmem(this) })?.let { guest.add("TU_DEBUG=$it") }
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice()?.let { guest.add("${com.droiddeck.launcher.gpu.TpUbwcHint.ENV}=$it") }
|
||||
if (SessionPrefs.zinkLazy(this)) {
|
||||
guest.add("ZINK_DESCRIPTORS=lazy")
|
||||
guest.add("ZINK_DEBUG=compact")
|
||||
@@ -699,7 +710,10 @@ class SessionService : Service() {
|
||||
SessionState.steamClientArch = if (steamHere) SessionPrefs.steamClientArch(this) else null
|
||||
SessionState.steamClientArch?.let { arch ->
|
||||
guest.add("BL_STEAM_CLIENT_ARCH=$arch")
|
||||
SessionPaths.current()?.let { SessionArtifacts.recordClient(it, arch) }
|
||||
SessionPaths.current()?.let {
|
||||
SessionArtifacts.recordClient(it, arch)
|
||||
SessionArtifacts.markSteamLogs(it, File(SessionPrefs.steamRoot(this, arch), "logs"))
|
||||
}
|
||||
if (arch == "x86_64") FexCatalog.cached(this)?.let { guest.addAll(FexCatalog.environment(it)) }
|
||||
}
|
||||
if (SessionState.mode == MODE_STEAM) {
|
||||
@@ -710,11 +724,13 @@ class SessionService : Service() {
|
||||
guest.add("BL_SYNC_FALLBACK=" + (if (SessionPrefs.syncFallback(this)) "1" else "0"))
|
||||
guest.add("BL_FSYNC_FIRST=" + (if (SessionPrefs.fsyncFirst(this)) "1" else "0"))
|
||||
guest.add("BL_GAMESCOPE_REALTIME=" + (if (SessionPrefs.gamescopeRealtime(this)) "1" else "0"))
|
||||
if (SessionPrefs.cursorComposite(this)) guest.add("BL_CURSOR_COMPOSITE=1")
|
||||
if (com.droiddeck.launcher.core.ZramSupport.supported()) guest.add("BL_ZRAM=1")
|
||||
guest.add("BANNER_AUDIO_DIRECT_DECAY=0")
|
||||
val extra = extraEnv() + com.droiddeck.launcher.agent.AgentEnv.beginSession(this)
|
||||
if (extra.none { it.startsWith("TU_DEBUG=") }) guest.add("$GAME_TU_DEBUG=" + (tuOverride ?: if (tuDriver) "sysmem" else ""))
|
||||
extra.forEach { guest.add(it) }
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.forThisDevice(this)?.let { guest.add("${com.droiddeck.launcher.gpu.TpUbwcHint.ENV}=$it") }
|
||||
val clientPinned = steamHere && SessionPrefs.clientCpusOverride(this)
|
||||
if (clientPinned) {
|
||||
guest.add("BL_CLIENT_CPUS=" + CpuCores.listOrAll(SessionPrefs.clientCpus(this)))
|
||||
@@ -1204,6 +1220,7 @@ class SessionService : Service() {
|
||||
}
|
||||
|
||||
private fun resumeSession(panelVisible: Boolean = true) {
|
||||
if (SessionState.suspended) SessionState.resumeRequested = true
|
||||
if (panelVisible) activityVisible = true
|
||||
screenOn = readScreenOn()
|
||||
manualPauseRequested = false
|
||||
@@ -1401,10 +1418,12 @@ class SessionService : Service() {
|
||||
private fun updateSuspendPolicy() {
|
||||
if (!SessionState.running) return
|
||||
val hidden = !hasVisibleSurface
|
||||
val downloadsBlockingSuspend = steamDownloadsInBackground && SessionState.mode == MODE_STEAM &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER && hidden && downloadActive && !suspendDownloadNow
|
||||
val downloadsBlockingSuspend = downloadsKeepAwake() && hidden && !suspendDownloadNow
|
||||
if (suspendPolicy == SessionPrefs.SUSPEND_MANUAL && hidden && !downloadsBlockingSuspend) {
|
||||
manualPauseRequested = true
|
||||
} else if (!hidden && !SessionState.suspended) {
|
||||
// Coming back before the freeze finished keeps the game running instead of pausing it a moment later.
|
||||
manualPauseRequested = false
|
||||
}
|
||||
val controller = suspendController ?: return
|
||||
if (downloadsBlockingSuspend) acquireLocks()
|
||||
@@ -1430,6 +1449,7 @@ class SessionService : Service() {
|
||||
freezeCancelled = true
|
||||
controller.cancelFreeze()
|
||||
}
|
||||
if (shouldSuspend && SessionState.suspended && !suspendOperationPending) SessionState.resumeRequested = false
|
||||
if (suspendOperationPending || suspendAttemptFailed || shouldSuspend == SessionState.suspended) return
|
||||
val gen = sessionGen
|
||||
suspendOperationPending = true
|
||||
@@ -1453,6 +1473,7 @@ class SessionService : Service() {
|
||||
freezePending = false
|
||||
if (success) {
|
||||
SessionState.suspended = true
|
||||
SessionState.resumeFailed = false
|
||||
SessionEvents.transition(SessionPhase.SUSPENDED, "session.suspended")
|
||||
releaseLocks()
|
||||
refreshNotification()
|
||||
@@ -1471,16 +1492,22 @@ class SessionService : Service() {
|
||||
}
|
||||
} else {
|
||||
acquireLocks()
|
||||
SessionState.resuming = true
|
||||
controller.resume { success ->
|
||||
mainHandler.post {
|
||||
if (gen != sessionGen || !SessionState.running) return@post
|
||||
suspendOperationPending = false
|
||||
SessionState.resuming = false
|
||||
SessionState.resumeRequested = false
|
||||
if (success) {
|
||||
SessionState.suspended = false
|
||||
SessionState.resumeFailed = false
|
||||
SessionEvents.transition(SessionEvents.resumePhase(), "session.resumed")
|
||||
refreshNotification()
|
||||
} else {
|
||||
suspendAttemptFailed = true
|
||||
SessionState.resumeFailures++
|
||||
SessionState.resumeFailed = true
|
||||
Log.w(TAG, "could not confirm that the session resumed")
|
||||
}
|
||||
updateSuspendPolicy()
|
||||
@@ -1570,6 +1597,9 @@ class SessionService : Service() {
|
||||
return@post
|
||||
}
|
||||
SessionState.suspended = false
|
||||
SessionState.resumeRequested = false
|
||||
SessionState.resuming = false
|
||||
SessionState.resumeFailed = false
|
||||
SessionState.pipActive = false
|
||||
pipTask = false
|
||||
SessionState.guestPid = -1
|
||||
@@ -1802,8 +1832,7 @@ class SessionService : Service() {
|
||||
.setContentText(getString(
|
||||
when {
|
||||
SessionState.suspended -> R.string.session_notification_paused
|
||||
downloadActive && steamDownloadsInBackground &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER -> R.string.session_notification_downloads
|
||||
downloadsKeepAwake() -> R.string.session_notification_downloads
|
||||
else -> R.string.session_notification
|
||||
}
|
||||
))
|
||||
@@ -1811,8 +1840,7 @@ class SessionService : Service() {
|
||||
.apply {
|
||||
if (SessionState.suspended) {
|
||||
addAction(Notification.Action.Builder(null, getString(R.string.resume_session), resume).build())
|
||||
} else if (downloadActive && steamDownloadsInBackground &&
|
||||
suspendPolicy != SessionPrefs.SUSPEND_NEVER) {
|
||||
} else if (downloadsKeepAwake()) {
|
||||
val suspend = PendingIntent.getService(
|
||||
this@SessionService, 3,
|
||||
Intent(this@SessionService, SessionService::class.java).setAction(ACTION_SUSPEND_NOW),
|
||||
@@ -1832,33 +1860,50 @@ class SessionService : Service() {
|
||||
getSystemService(NotificationManager::class.java)?.notify(NOTIFICATION_ID, buildNotification())
|
||||
}
|
||||
|
||||
private fun downloadsKeepAwake(): Boolean =
|
||||
downloadActive && (steamDownloadsInBackground || clientInstallActive) &&
|
||||
SessionState.mode == MODE_STEAM && suspendPolicy != SessionPrefs.SUSPEND_NEVER
|
||||
|
||||
private fun downloadWatchWanted(): Boolean =
|
||||
SessionState.running && SessionState.mode == MODE_STEAM && suspendPolicy != SessionPrefs.SUSPEND_NEVER &&
|
||||
(steamDownloadsInBackground || !SessionState.firstFrameSeen)
|
||||
|
||||
private fun updateDownloadMonitoring() {
|
||||
val enabled = SessionState.running && SessionState.mode == MODE_STEAM &&
|
||||
steamDownloadsInBackground && suspendPolicy != SessionPrefs.SUSPEND_NEVER
|
||||
if (!enabled) {
|
||||
if (!downloadWatchWanted()) {
|
||||
val wasActive = downloadActive
|
||||
downloadMonitorTask?.let(mainHandler::removeCallbacks)
|
||||
downloadMonitorTask = null
|
||||
steamDownloadMonitor.reset()
|
||||
downloadActive = false
|
||||
if (clientInstallActive) SessionEvents.record("steam.client_download", mapOf("active" to false))
|
||||
clientInstallActive = false
|
||||
if (wasActive) refreshNotification()
|
||||
return
|
||||
}
|
||||
if (downloadMonitorTask != null) return
|
||||
val poll = object : Runnable {
|
||||
override fun run() {
|
||||
if (downloadMonitorTask !== this || !SessionState.running ||
|
||||
SessionState.mode != MODE_STEAM || !steamDownloadsInBackground ||
|
||||
suspendPolicy == SessionPrefs.SUSPEND_NEVER) {
|
||||
if (downloadMonitorTask !== this) return
|
||||
if (!downloadWatchWanted()) {
|
||||
downloadMonitorTask = null
|
||||
updateDownloadMonitoring()
|
||||
updateSuspendPolicy()
|
||||
return
|
||||
}
|
||||
val root = LinuxRuntime.rootDir(this@SessionService)
|
||||
val wasActive = downloadActive
|
||||
downloadActive = steamDownloadMonitor.poll(
|
||||
LinuxRuntime.rootDir(this@SessionService),
|
||||
val wasInstalling = clientInstallActive
|
||||
clientInstallActive = !SessionState.firstFrameSeen &&
|
||||
(clientInstallActive || SteamDownloadMonitor.clientInstallPending(root))
|
||||
downloadActive = clientInstallActive || steamDownloadsInBackground && steamDownloadMonitor.poll(
|
||||
root,
|
||||
receivedBytes = TrafficStats.getUidRxBytes(android.os.Process.myUid()),
|
||||
client = SessionState.steamClientArch,
|
||||
mounts = steamLibraryMounts,
|
||||
)
|
||||
if (wasInstalling != clientInstallActive) {
|
||||
SessionEvents.record("steam.client_download", mapOf("active" to clientInstallActive))
|
||||
}
|
||||
if (wasActive != downloadActive) refreshNotification()
|
||||
updateSuspendPolicy()
|
||||
mainHandler.postDelayed(this, DOWNLOAD_POLL_MS)
|
||||
@@ -1884,6 +1929,7 @@ class SessionService : Service() {
|
||||
companion object {
|
||||
private const val TAG = "SessionService"
|
||||
private const val TRACER_NICE = -6
|
||||
private const val MIC_RELEASE_TIMEOUT_MS = 5_000L
|
||||
private const val TU_DEBUG_SWITCH = "Download/droiddeck-tu-debug"
|
||||
private const val GAME_TU_DEBUG = "DROIDDECK_GAME_TU_DEBUG"
|
||||
private const val LEGACY_ENV_SWITCH = "Download/droiddeck-env"
|
||||
@@ -2015,6 +2061,7 @@ class SessionService : Service() {
|
||||
|
||||
fun resume(context: Context) {
|
||||
if (!SessionState.running) return
|
||||
if (SessionState.suspended) SessionState.resumeRequested = true
|
||||
context.startService(Intent(context, SessionService::class.java).setAction(ACTION_RESUME))
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.droiddeck.launcher.session
|
||||
|
||||
import java.io.File
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
|
||||
@@ -46,6 +47,10 @@ object SessionState {
|
||||
@Volatile
|
||||
var runtimeDriver: String? = null
|
||||
var suspended by mutableStateOf(false)
|
||||
var resumeRequested by mutableStateOf(false)
|
||||
var resuming by mutableStateOf(false)
|
||||
var resumeFailures by mutableIntStateOf(0)
|
||||
var resumeFailed by mutableStateOf(false)
|
||||
@Volatile var pipActive = false
|
||||
@Volatile
|
||||
var program: String? = null
|
||||
|
||||
@@ -20,7 +20,7 @@ object SettingsReset {
|
||||
"gpuDriverMode", "androidDriver", "linuxDriver", "linuxDriver.steam", "linuxDriver.desktop",
|
||||
"tuSysmem", "glThread", "noGlError", "zinkLazy", "mangoapp", "gpuClockPin", "gamescopeRealtime",
|
||||
"directAudio", "mic", "wifiDiscovery", "clientCpusOverride", "clientCpus", "gameCpus",
|
||||
"noXalia", "fastSync", "fsyncFirst", "syncFallback", "prootNoSeccomp", "prootFastPath",
|
||||
"noXalia", "fastSync", "fsyncFirst", "syncFallback", "prootNoSeccomp", "prootFastPath", "cursorComposite",
|
||||
"guestHostname", "fexPreset", "forceSsbs", "logs", "storageDiagnostics",
|
||||
"upscaler", "upscaleSharpness", "screenEffects", "textureAnisotropy", "textureLodBias",
|
||||
"steamDownloadsInBackground", "steam_offline", "bootMovie", "bootMovieSound", "bootMovieVolume", "bootMovieSeconds",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import java.io.File
|
||||
import java.io.RandomAccessFile
|
||||
import java.io.FileInputStream
|
||||
|
||||
internal class SteamDownloadMonitor {
|
||||
private data class ManifestState(
|
||||
@@ -63,16 +63,17 @@ internal class SteamDownloadMonitor {
|
||||
lastContentActivityAt = 0L
|
||||
}
|
||||
runCatching {
|
||||
RandomAccessFile(log, "r").use { input ->
|
||||
input.seek(contentLogOffset)
|
||||
FileInputStream(log).use { input ->
|
||||
input.channel.position(contentLogOffset)
|
||||
val reader = input.bufferedReader(Charsets.ISO_8859_1)
|
||||
while (true) {
|
||||
val line = input.readLine() ?: break
|
||||
val line = reader.readLine() ?: break
|
||||
when {
|
||||
"Client version:" in line -> {
|
||||
activeContentUpdates.clear()
|
||||
lastContentActivityAt = 0L
|
||||
}
|
||||
CONTENT_UPDATE.find(line)?.let { match ->
|
||||
" update changed : " in line && CONTENT_UPDATE.find(line)?.let { match ->
|
||||
val appId = match.groupValues[1]
|
||||
val updateType = match.groupValues[2]
|
||||
val state = match.groupValues[3]
|
||||
@@ -85,14 +86,15 @@ internal class SteamDownloadMonitor {
|
||||
}
|
||||
true
|
||||
} == true -> Unit
|
||||
CURRENT_RATE.find(line)?.groupValues?.get(1)?.toDoubleOrNull()?.let { it > 0.0 } == true ->
|
||||
"Current download rate: " in line &&
|
||||
CURRENT_RATE.find(line)?.groupValues?.get(1)?.toDoubleOrNull()?.let { it > 0.0 } == true ->
|
||||
lastContentActivityAt = now
|
||||
"Downloading " in line && " chunks for depot " in line ->
|
||||
lastContentActivityAt = now
|
||||
}
|
||||
if (activeContentUpdates.isNotEmpty()) lastContentActivityAt = now
|
||||
}
|
||||
contentLogOffset = input.filePointer
|
||||
contentLogOffset = input.channel.position()
|
||||
}
|
||||
}
|
||||
return activeContentUpdates.isNotEmpty() && lastContentActivityAt > 0L &&
|
||||
@@ -138,13 +140,21 @@ internal class SteamDownloadMonitor {
|
||||
private fun value(text: String, key: String): String? =
|
||||
Regex("\"$key\"\\s+\"([^\"]*)\"").find(text)?.groupValues?.get(1)
|
||||
|
||||
private companion object {
|
||||
const val MANIFEST_PROGRESS_GRACE_MS = 8_000L
|
||||
const val CONTENT_ACTIVITY_GRACE_MS = 90_000L
|
||||
const val MIN_RECEIVE_BYTES_PER_SEC = 64L * 1024L
|
||||
val PATH = Regex("\"path\"\\s+\"([^\"]+)\"")
|
||||
val STEAM_HOMES = listOf("root/.local/share/Steam", "root/.droiddeck-x64/.local/share/Steam")
|
||||
val CONTENT_UPDATE = Regex("""AppID (\d+) (App|Workshop|Shader) update changed : (.*)""")
|
||||
val CURRENT_RATE = Regex("""Current download rate: ([\d.]+) Mbps""")
|
||||
companion object {
|
||||
fun clientInstallPending(runtimeRoot: File): Boolean {
|
||||
val home = File(runtimeRoot, "root")
|
||||
val steam = File(home, ".local/share/Steam")
|
||||
val stamped = File(steam, "package/droiddeck-installed").isFile ||
|
||||
File(steam, "package/bannerlator-installed").isFile
|
||||
return !(stamped && File(steam, "steamrtarm64/steam").isFile) || File(home, ".bl-steam-repair").exists()
|
||||
}
|
||||
|
||||
private const val MANIFEST_PROGRESS_GRACE_MS = 8_000L
|
||||
private const val CONTENT_ACTIVITY_GRACE_MS = 90_000L
|
||||
private const val MIN_RECEIVE_BYTES_PER_SEC = 64L * 1024L
|
||||
private val PATH = Regex("\"path\"\\s+\"([^\"]+)\"")
|
||||
private val STEAM_HOMES = listOf("root/.local/share/Steam", "root/.droiddeck-x64/.local/share/Steam")
|
||||
private val CONTENT_UPDATE = Regex("""AppID (\d+) (App|Workshop|Shader) update changed : (.*)""")
|
||||
private val CURRENT_RATE = Regex("""Current download rate: ([\d.]+) Mbps""")
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,8 @@ object SteamStorage {
|
||||
private val LAST_PLAYED = Regex("^\\s*\"LastPlayed\"\\s*\"(\\d+)\"", RegexOption.MULTILINE)
|
||||
private val MAPPING = Regex("\"(\\d+)\"\\s*\\{\\s*\"name\"\\s*\"([^\"]*)\"")
|
||||
private val COMPAT_NAME = Regex("\"compat_tools\"\\s*\\{\\s*\"([^\"]+)\"")
|
||||
private val VDF_TOKEN = Regex("\"((?:\\\\.|[^\"\\\\])*)\"|[{}]|//[^\n]*")
|
||||
private val SHADER_CACHE_OFF = listOf("InstallConfigStore", "Software", "Valve", "Steam", "ShaderCacheManager", "DisableShaderCache")
|
||||
|
||||
data class Manifest(
|
||||
val file: File, val appId: Int, val name: String, val installDir: String?,
|
||||
@@ -118,6 +120,28 @@ object SteamStorage {
|
||||
return MAPPING.findAll(configVdf.substring(open, end)).associate { it.groupValues[1] to it.groupValues[2] }
|
||||
}
|
||||
|
||||
fun shaderPrecache(configVdf: String): Boolean = vdfValue(configVdf, SHADER_CACHE_OFF) != "1"
|
||||
|
||||
private fun vdfValue(text: String, path: List<String>): String? {
|
||||
val blocks = ArrayList<String>()
|
||||
var key: String? = null
|
||||
for (token in VDF_TOKEN.findAll(text)) {
|
||||
val name = key
|
||||
when {
|
||||
token.value.startsWith("//") -> {}
|
||||
token.value == "{" -> { blocks.add(name.orEmpty()); key = null }
|
||||
token.value == "}" -> { blocks.removeLastOrNull(); key = null }
|
||||
name == null -> key = token.groupValues[1]
|
||||
else -> {
|
||||
val at = blocks + name
|
||||
if (at.size == path.size && at.zip(path).all { (a, b) -> a.equals(b, ignoreCase = true) }) return token.groupValues[1]
|
||||
key = null
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun compatToolName(compatibilityToolVdf: String): String? = COMPAT_NAME.find(compatibilityToolVdf)?.groupValues?.get(1)
|
||||
|
||||
private val ARM_IN_NAME = Regex("arm64|aarch64")
|
||||
|
||||
@@ -104,6 +104,29 @@ object StoreInstallRoot {
|
||||
.map { it to guestFor(context, it) }
|
||||
}
|
||||
|
||||
/** Xodus has its own PRoot mount table and cannot see the selected Steam library's SD bind. */
|
||||
fun externalRootsForXodus(context: Context): List<Pair<File, String>> {
|
||||
val roots = externalRoots(context).toMutableList()
|
||||
val selectedLibrary = GameStorage.effective(context)?.let { File(it.path, ON_VOLUME) }
|
||||
?.takeUnless { isInternal(context, it) }
|
||||
if (selectedLibrary != null && roots.none { it.first.absolutePath == selectedLibrary.absolutePath }) {
|
||||
roots += selectedLibrary to guestFor(context, selectedLibrary)
|
||||
}
|
||||
return roots
|
||||
}
|
||||
|
||||
fun externalBindSpecs(context: Context): List<String> = externalBindSpecs(externalRoots(context), LinuxRuntime.rootDir(context))
|
||||
|
||||
fun externalBindSpecsForXodus(context: Context): List<String> =
|
||||
externalBindSpecs(externalRootsForXodus(context), LinuxRuntime.rootDir(context))
|
||||
|
||||
internal fun externalBindSpecs(roots: List<Pair<File, String>>, guestRoot: File): List<String> =
|
||||
roots.mapNotNull { (host, guest) ->
|
||||
if (!host.isDirectory || !host.canRead()) return@mapNotNull null
|
||||
val target = File(guestRoot, guest.removePrefix("/"))
|
||||
if (target.isDirectory || target.mkdirs()) "${host.path}:$guest" else null
|
||||
}
|
||||
|
||||
private fun guestFor(context: Context, root: File): String {
|
||||
val sm = context.getSystemService(StorageManager::class.java)
|
||||
val uuid = runCatching { sm?.getStorageVolume(root)?.uuid }.getOrNull()?.takeIf { it.isNotBlank() }?.replace(Regex("[^A-Za-z0-9-]"), "")
|
||||
@@ -114,11 +137,21 @@ object StoreInstallRoot {
|
||||
fun isInternal(context: Context, root: File): Boolean = root.absolutePath == internalRoot(context).absolutePath
|
||||
|
||||
fun externalGuestPath(context: Context, host: File): String? {
|
||||
return externalGuestPath(host, externalRoots(context))
|
||||
}
|
||||
|
||||
fun guestPath(context: Context, host: File): String = externalGuestPath(context, host) ?: host.path
|
||||
|
||||
fun guestPathForXodus(context: Context, host: File): String =
|
||||
externalGuestPath(host, externalRootsForXodus(context)) ?: host.path
|
||||
|
||||
internal fun externalGuestPath(host: File, roots: List<Pair<File, String>>): String? {
|
||||
val path = host.absolutePath
|
||||
for ((root, guest) in externalRoots(context)) {
|
||||
val dir = root.absolutePath
|
||||
for ((root, guest) in roots.sortedByDescending { it.first.absolutePath.length }) {
|
||||
val dir = root.absolutePath.trimEnd(File.separatorChar)
|
||||
if (path == dir) return guest
|
||||
if (path.startsWith("$dir/")) return guest + "/" + path.removePrefix("$dir/")
|
||||
val prefix = dir + File.separator
|
||||
if (path.startsWith(prefix)) return guest + "/" + path.removePrefix(prefix).replace(File.separatorChar, '/')
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ object StoresState {
|
||||
fun installedGame(store: Store, id: String): InstalledStoreGame? = installed.firstOrNull { it.sidecar.store == store && it.sidecar.id == id }
|
||||
|
||||
fun detailItem(store: Store, id: String): CatalogItem? = detailCatalogItem(
|
||||
store, id, library[store].orEmpty(), found[store].orEmpty(), shelves[store],
|
||||
store, id, library[store].orEmpty(),
|
||||
found[store].orEmpty() + if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchBrowseState.items else emptyList(),
|
||||
shelves[store],
|
||||
)
|
||||
|
||||
fun open(context: Context, store: Store, force: Boolean = false) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import android.os.IBinder
|
||||
import android.os.Looper
|
||||
import android.os.PowerManager
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.MainActivity
|
||||
import com.droiddeck.launcher.FrontEndActivity
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.core.DeviceSupport
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
@@ -189,7 +189,7 @@ class StoreDownloadService : Service() {
|
||||
}
|
||||
|
||||
private fun openPage(context: Context, nav: String, code: Int): PendingIntent =
|
||||
PendingIntent.getActivity(context, code, Intent(context, MainActivity::class.java).putExtra(EXTRA_NAV, nav)
|
||||
PendingIntent.getActivity(context, code, Intent(context, FrontEndActivity::class.java).putExtra(EXTRA_NAV, nav)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP), PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
|
||||
private fun openDownloads(context: Context, code: Int) = openPage(context, "stores:downloads", code)
|
||||
|
||||
@@ -251,7 +251,7 @@ internal object EpicClientLibrary {
|
||||
SessionPrefs.addedGameStoredAppId(app, oldFolder.path)?.let { SteamLiveShortcuts.remove(app, it) }
|
||||
changed = true
|
||||
}
|
||||
val next = StoreGameSidecar(
|
||||
val next = withLaunchArgs(StoreGameSidecar(
|
||||
Store.EPIC, appName, item.optString("DisplayName").ifEmpty { appName }, exe,
|
||||
installVersion = item.optString("AppVersionString"), installedAt = existing?.installedAt?.takeIf { it > 0 } ?: folder.lastModified(),
|
||||
cover = existing?.cover, hero = existing?.hero,
|
||||
@@ -260,7 +260,7 @@ internal object EpicClientLibrary {
|
||||
epic = existing?.epic ?: com.droiddeck.launcher.stores.EpicOptions(),
|
||||
cloud = existing?.cloud ?: true,
|
||||
launcher = StoreLaunch.LAUNCHER,
|
||||
)
|
||||
), commandArgs(item.optString("LaunchCommand")))
|
||||
val sidecarChanged = existing?.toJson()?.toString(2) != next.toJson().toString(2)
|
||||
val launcher = File(folder, StoreLaunch.LAUNCHER)
|
||||
if (sidecarChanged || runCatching { launcher.readText() }.getOrNull() != StoreLaunch.launcherText(next)) {
|
||||
@@ -328,6 +328,7 @@ internal object EpicClientLibrary {
|
||||
.put("CatalogItemId", record.optString("itemId"))
|
||||
.put("InstallLocation", dir)
|
||||
.put("LaunchExecutable", record.optString("launchExecutable"))
|
||||
.put("LaunchCommand", record.optString("launchCommand"))
|
||||
.put("AppVersionString", record.optString("version"))
|
||||
.put("SidecarDeploymentId", record.optJSONObject("sidecar")?.optString("deploymentId").orEmpty())
|
||||
.put("DisplayName", title?.takeIf(String::isNotBlank) ?: dir.substringAfterLast('/'))
|
||||
@@ -358,7 +359,11 @@ internal object EpicClientLibrary {
|
||||
write(File(manifests, "$guid.item"), item(install, tags, ownership == true).toString(2))
|
||||
runCatching { egstore(install, guid) { token } }.onFailure { Log.w(TAG, "${install.appName}: .egstore not written (${it.javaClass.simpleName})") }
|
||||
after.put(install.appName, JSONObject().put("guid", guid).put("signature", install.signature).apply { if (ownership != null) put("ownership", ownership) })
|
||||
StoreGameSidecar.read(install.folder)?.let { StoreLaunch.refreshLauncher(install.folder, it) }
|
||||
StoreGameSidecar.read(install.folder)?.let { sidecar ->
|
||||
val next = runCatching { manifestArgs(install, guid) }.getOrNull()?.let { withLaunchArgs(sidecar, it) } ?: sidecar
|
||||
if (next !== sidecar) next.write(install.folder)
|
||||
StoreLaunch.refreshLauncher(install.folder, next)
|
||||
}
|
||||
}
|
||||
for (name in before.keys().asSequence().toList()) {
|
||||
if (after.has(name)) continue
|
||||
@@ -376,6 +381,33 @@ internal object EpicClientLibrary {
|
||||
return changed
|
||||
}
|
||||
|
||||
private const val LAUNCH_ARGS = "launchArgs"
|
||||
|
||||
private fun manifestArgs(install: Install, guid: String): List<String>? {
|
||||
val manifest = File(install.folder, ".egstore/$guid.manifest").takeIf { it.isFile } ?: return null
|
||||
val launch = EpicNative.inspect(manifest.readBytes(), JSONObject().put("op", "launch")) ?: return null
|
||||
val build = launch.optString("buildVersion")
|
||||
if (install.version.isNotEmpty() && build != install.version) return null
|
||||
val args = launch.optJSONArray("args") ?: return null
|
||||
return List(args.length()) { args.optString(it) }.filter { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
private fun commandArgs(command: String): List<String> {
|
||||
if (command.isBlank()) return emptyList()
|
||||
val args = EpicNative.call("launch.split", JSONObject().put("command", command))?.optJSONArray("args") ?: return emptyList()
|
||||
return List(args.length()) { args.optString(it) }.filter { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
internal fun withLaunchArgs(sidecar: StoreGameSidecar, args: List<String>): StoreGameSidecar {
|
||||
val previous = sidecar.extra[LAUNCH_ARGS]?.split('\n')?.filter { it.isNotEmpty() }.orEmpty()
|
||||
val kept = sidecar.args.filterNot { it in previous }
|
||||
val added = args.filterNot { it in kept }
|
||||
val next = kept + added
|
||||
val extra = LinkedHashMap(sidecar.extra).apply { if (added.isEmpty()) remove(LAUNCH_ARGS) else put(LAUNCH_ARGS, added.joinToString("\n")) }
|
||||
if (next == sidecar.args && extra == sidecar.extra) return sidecar
|
||||
return sidecar.copy(args = next, extra = extra)
|
||||
}
|
||||
|
||||
private fun ownershipToken(token: String, install: Install): Boolean? =
|
||||
runCatching { EpicApiClient.getCustomAttribute(token, install.namespace, install.catalogItemId, "OwnershipToken") }
|
||||
.getOrNull()?.trim()?.lowercase()?.let { it == "true" }
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.droiddeck.launcher.stores.itch
|
||||
|
||||
import android.content.Context
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
import org.json.JSONArray
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
|
||||
internal data class BrowseQuery(
|
||||
val sort: String = ItchBrowse.SORT_POPULAR,
|
||||
val price: String = ItchBrowse.PRICE_ANY,
|
||||
val platforms: Set<String> = emptySet(),
|
||||
val tags: List<String> = emptyList(),
|
||||
) {
|
||||
val isDefault: Boolean get() = this == BrowseQuery()
|
||||
}
|
||||
|
||||
internal class BrowsePage(val items: List<CatalogItem>, val code: Int, val cached: Boolean)
|
||||
|
||||
internal object ItchBrowse {
|
||||
const val SORT_POPULAR = "popular"
|
||||
const val SORT_NEW_POPULAR = "new-and-popular"
|
||||
const val SORT_TOP_SELLERS = "top-sellers"
|
||||
const val SORT_TOP_RATED = "top-rated"
|
||||
const val SORT_NEWEST = "newest"
|
||||
val sorts = listOf(SORT_POPULAR, SORT_NEW_POPULAR, SORT_TOP_SELLERS, SORT_TOP_RATED, SORT_NEWEST)
|
||||
|
||||
const val PRICE_ANY = "any"
|
||||
const val PRICE_FREE = "free"
|
||||
const val PRICE_SALE = "on-sale"
|
||||
const val PRICE_PAID = "store"
|
||||
const val PRICE_UNDER_5 = "5-dollars-or-less"
|
||||
const val PRICE_UNDER_15 = "15-dollars-or-less"
|
||||
val prices = listOf(PRICE_ANY, PRICE_FREE, PRICE_SALE, PRICE_PAID, PRICE_UNDER_5, PRICE_UNDER_15)
|
||||
|
||||
val platformNames = listOf("windows", "osx", "linux", "android", "ios", "web", "mobile-web")
|
||||
|
||||
private const val BASE = "https://itch.io/games"
|
||||
private const val FRESH_MS = 3 * 60 * 60 * 1000L
|
||||
private const val GAP_MS = 1_200L
|
||||
private const val RETRY_MS = 8_000L
|
||||
private const val FOLDER = "itch-browse"
|
||||
|
||||
@Volatile private var lastRequestAt = 0L
|
||||
private val lock = Any()
|
||||
|
||||
private fun sortSegment(sort: String): String? = sort.takeIf { it != SORT_POPULAR && it in sorts }
|
||||
|
||||
private fun priceSegment(price: String): String? = price.takeIf { it != PRICE_ANY && it in prices }
|
||||
|
||||
fun path(query: BrowseQuery): String {
|
||||
val segments = listOfNotNull(sortSegment(query.sort), priceSegment(query.price)) +
|
||||
platformNames.filter { it in query.platforms }.map { "platform-$it" } +
|
||||
query.tags.map { "tag-" + tagSlug(it) }
|
||||
return if (segments.isEmpty()) BASE else BASE + "/" + segments.joinToString("/")
|
||||
}
|
||||
|
||||
fun url(query: BrowseQuery, page: Int): String = path(query) + ".xml" + if (page > 1) "?page=$page" else ""
|
||||
|
||||
fun tagSlug(tag: String): String = tag.trim().lowercase().replace(Regex("[^a-z0-9]+"), "-").trim('-')
|
||||
|
||||
fun page(context: Context, query: BrowseQuery, page: Int, force: Boolean = false): BrowsePage {
|
||||
val app = context.applicationContext
|
||||
val url = url(query, page)
|
||||
if (!force) read(app, url)?.let { return BrowsePage(it, 200, true) }
|
||||
val (status, body) = fetch(url)
|
||||
val items = if (status in 200..299 && body != null) ItchShelves.parse(body) else emptyList()
|
||||
StoresState.logLine("itch.io browse: $url answered $status with ${items.size} games")
|
||||
if (items.isNotEmpty()) write(app, url, items)
|
||||
return BrowsePage(items, status, false)
|
||||
}
|
||||
|
||||
private fun fetch(url: String): Pair<Int, String?> {
|
||||
synchronized(lock) {
|
||||
pause()
|
||||
var answer = ItchShelves.open(url)
|
||||
if (answer.first == 429) {
|
||||
StoresState.logLine("itch.io browse: 429, waiting before one more try")
|
||||
Thread.sleep(RETRY_MS)
|
||||
pause()
|
||||
answer = ItchShelves.open(url)
|
||||
}
|
||||
lastRequestAt = System.currentTimeMillis()
|
||||
return answer
|
||||
}
|
||||
}
|
||||
|
||||
private fun pause() {
|
||||
val gap = GAP_MS - (System.currentTimeMillis() - lastRequestAt)
|
||||
if (gap > 0) Thread.sleep(gap)
|
||||
}
|
||||
|
||||
private fun file(context: Context, url: String): File {
|
||||
val digest = MessageDigest.getInstance("SHA-1").digest(url.toByteArray()).joinToString("") { "%02x".format(it) }
|
||||
return File(File(context.cacheDir, FOLDER), "$digest.json")
|
||||
}
|
||||
|
||||
private fun read(context: Context, url: String): List<CatalogItem>? {
|
||||
val file = file(context, url)
|
||||
if (!file.isFile || System.currentTimeMillis() - file.lastModified() > FRESH_MS) return null
|
||||
return runCatching { ItchCatalog.list(JSONArray(file.readText())) }.getOrNull()?.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
|
||||
private fun write(context: Context, url: String, items: List<CatalogItem>) {
|
||||
val file = file(context, url)
|
||||
runCatching {
|
||||
file.parentFile?.mkdirs()
|
||||
file.writeText(ItchCatalog.array(items).toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal object ItchBrowseState {
|
||||
var query by mutableStateOf(BrowseQuery())
|
||||
private set
|
||||
var items by mutableStateOf<List<CatalogItem>>(emptyList())
|
||||
private set
|
||||
var loading by mutableStateOf(false)
|
||||
private set
|
||||
var ended by mutableStateOf(false)
|
||||
private set
|
||||
var failed by mutableStateOf(false)
|
||||
private set
|
||||
|
||||
private var next = 1
|
||||
private var generation = 0
|
||||
|
||||
val active: Boolean get() = !query.isDefault
|
||||
|
||||
fun choose(context: Context, wanted: BrowseQuery) {
|
||||
if (wanted == query) return
|
||||
generation++
|
||||
query = wanted
|
||||
items = emptyList()
|
||||
ended = false
|
||||
failed = false
|
||||
loading = false
|
||||
next = 1
|
||||
if (active) more(context)
|
||||
}
|
||||
|
||||
fun more(context: Context, retry: Boolean = false) {
|
||||
if (loading || ended || !active || (failed && !retry)) return
|
||||
loading = true
|
||||
failed = false
|
||||
val app = context.applicationContext
|
||||
val mine = generation
|
||||
val asked = query
|
||||
val page = next
|
||||
Thread({
|
||||
val answer = runCatching { ItchBrowse.page(app, asked, page) }.getOrNull()
|
||||
StoresState.post {
|
||||
if (mine != generation) return@post
|
||||
loading = false
|
||||
if (answer == null || answer.code !in 200..299) {
|
||||
failed = true
|
||||
return@post
|
||||
}
|
||||
if (answer.items.isEmpty()) {
|
||||
ended = true
|
||||
return@post
|
||||
}
|
||||
val known = items.mapTo(HashSet()) { it.id }
|
||||
val fresh = answer.items.filter { known.add(it.id) }
|
||||
if (fresh.isEmpty()) ended = true else {
|
||||
items = items + fresh
|
||||
next = page + 1
|
||||
}
|
||||
}
|
||||
}, "itch-browse").start()
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ internal object ItchShelves {
|
||||
return shelves.takeUnless { it.isEmpty }
|
||||
}
|
||||
|
||||
private fun open(url: String): Pair<Int, String?> {
|
||||
internal fun open(url: String): Pair<Int, String?> {
|
||||
var conn: HttpURLConnection? = null
|
||||
return try {
|
||||
conn = (URL(url).openConnection() as HttpURLConnection).apply {
|
||||
|
||||
@@ -39,11 +39,17 @@ internal class XboxInstaller(private val app: Context, private val item: Catalog
|
||||
var sequence = -1L
|
||||
try {
|
||||
val source = if (content) selected else item.id
|
||||
val guestFolder = StoreInstallRoot.guestPathForXodus(app, folder)
|
||||
val selection = if (content) emptyList() else listOf("--selected-content-id", selected)
|
||||
Xodus.start(app, listOf("streaming", source, folder.path, "--market", market,
|
||||
Xodus.start(app, listOf("streaming", source, guestFolder, "--market", market,
|
||||
"--progress-json", "--control-stdin") + selection).use { process ->
|
||||
child = process
|
||||
val diagnostics = Xodus.diagnostics(process)
|
||||
val rejected = AtomicBoolean(false)
|
||||
val rejectedLine = Regex(Xodus.SIGN_IN_REJECTED)
|
||||
val diagnostics = Xodus.diagnostics(process) { line ->
|
||||
StoresState.logLine("Xbox: $line")
|
||||
if (line.matches(rejectedLine)) rejected.set(true)
|
||||
}
|
||||
if (cancelled.get()) process.process.destroy()
|
||||
process.process.inputStream.bufferedReader().useLines { lines -> lines.forEach { line ->
|
||||
if (line.startsWith("NEXUS_PROGRESS ")) {
|
||||
@@ -62,6 +68,7 @@ internal class XboxInstaller(private val app: Context, private val item: Catalog
|
||||
check(process.process.waitFor(15, TimeUnit.SECONDS)) { "Xbox installer did not exit." }
|
||||
diagnostics.join(2000)
|
||||
if (cancelled.get()) return null
|
||||
check(!rejected.get()) { app.getString(com.droiddeck.launcher.R.string.stores_xbox_sign_in_again) }
|
||||
check(process.process.exitValue() == 0 && complete) { "Xbox download did not complete. Resume to retry with fresh licenses." }
|
||||
}
|
||||
if (content) {
|
||||
|
||||
@@ -46,7 +46,7 @@ internal object XboxRuntime {
|
||||
val market = game.second.extra["market"]?.takeIf { it.matches(Regex("[A-Z]{2}")) } ?: Xodus.market()
|
||||
val directory = views.create(app.filesDir)
|
||||
val process = try {
|
||||
Xodus.start(app, listOf("run", game.first.path, "droiddeck:prepare", "--exe", game.second.exe,
|
||||
Xodus.start(app, listOf("run", StoreInstallRoot.guestPathForXodus(app, game.first), "droiddeck:prepare", "--exe", game.second.exe,
|
||||
"--materialize-chain", "--market", market), launchDirectory = directory, credentialGeneration = credentials)
|
||||
} catch (e: Exception) { XboxLaunchViews.remove(directory); throw e }
|
||||
if (!launches.attach(token, process)) { process.close(); error("Xbox launch was cancelled") }
|
||||
|
||||
@@ -5,7 +5,9 @@ import android.os.Environment
|
||||
import com.droiddeck.launcher.core.AddonPack
|
||||
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.droiddeck.launcher.runtime.ProotFastPath
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.stores.StoreInstallRoot
|
||||
import org.json.JSONObject
|
||||
import java.io.Closeable
|
||||
import java.io.File
|
||||
@@ -79,10 +81,24 @@ internal object Xodus {
|
||||
networkLink.publish()
|
||||
networkLink.start()
|
||||
val runtime = (runtimeDirectory ?: File(app.filesDir, "xbox-runtime")).apply { mkdirs() }
|
||||
val command = LinuxRuntime.command(app, null, null, Environment.getExternalStorageDirectory(), listOf(
|
||||
val root = LinuxRuntime.rootDir(app)
|
||||
val external = Environment.getExternalStorageDirectory()
|
||||
val extraBinds = StoreInstallRoot.externalBindSpecsForXodus(app)
|
||||
val binds = LinuxRuntime.binds(app, null, null, external, extraBinds)
|
||||
val fastPathPreloaded = runCatching {
|
||||
File(root, "etc/ld.so.preload").useLines { lines -> lines.any { it.trim() == ProotFastPath.LIBRARY } }
|
||||
}.getOrDefault(false)
|
||||
val fastPathKey = if (ProotFastPath.enabled(app) && fastPathPreloaded &&
|
||||
File(root, ProotFastPath.LIBRARY.removePrefix("/")).isFile) ProotFastPath.key(root, binds) else null
|
||||
val guestCommand = mutableListOf(
|
||||
"/usr/bin/env", "HOME=/root", "XODUS_LOG=off", "RUST_LOG=off",
|
||||
"XDG_RUNTIME_DIR=${runtime.path}", "DROIDDECK_XBOX_CREDENTIAL_SOCKET=${credentials.name}", binary,
|
||||
) + args)
|
||||
)
|
||||
fastPathKey?.let { key ->
|
||||
guestCommand.addAll(guestCommand.lastIndex, ProotFastPath.guestEnv(root, binds, key))
|
||||
}
|
||||
guestCommand.addAll(args)
|
||||
val command = LinuxRuntime.commandWithBinds(app, root, binds, guestCommand)
|
||||
val builder = ProcessBuilder(command).directory(LinuxRuntime.rootDir(app))
|
||||
if (launchDirectory != null) builder.environment()["TMPDIR"] = launchDirectory.path
|
||||
builder.environment().apply {
|
||||
@@ -90,6 +106,7 @@ internal object Xodus {
|
||||
put("PROOT_LOADER", LinuxRuntime.prootLoader(app).path)
|
||||
put("PROOT_TMP_DIR", LinuxRuntime.prootTempDir(app).path)
|
||||
if (SessionPrefs.prootNoSeccomp(app)) put("PROOT_NO_SECCOMP", "1")
|
||||
fastPathKey?.let { ProotFastPath.hostEnv(it).let { (key, value) -> put(key, value) } }
|
||||
LinuxRuntime.prootLibraryPath(app).takeIf { it.isNotEmpty() }?.let { put("LD_LIBRARY_PATH", it) }
|
||||
}
|
||||
val digest = java.security.MessageDigest.getInstance("SHA-256")
|
||||
@@ -133,11 +150,13 @@ internal object Xodus {
|
||||
}
|
||||
}
|
||||
|
||||
const val SIGN_IN_REJECTED = "Microsoft content licensing rejected sign-in \\(HTTP 401\\)\\. Sign in again in Settings\\."
|
||||
|
||||
/** Passes the backend's known stderr diagnostics to [report]; other stderr text never leaves the process. */
|
||||
fun diagnostics(child: Child, report: (String) -> Unit = { com.droiddeck.launcher.stores.StoresState.logLine("Xbox: $it") }): Thread = Thread({
|
||||
runCatching {
|
||||
child.process.errorStream.bufferedReader().useLines { lines -> lines.forEach { line ->
|
||||
if (line.matches(Regex("NEXUS_CREDENTIAL_ERROR_V1 [a-z-]{1,48}|NEXUS_LIBRARY_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{1,3} [0-9]{1,6}|NEXUS_SESSION_DIAGNOSTIC_V1 [a-z-]{1,64}|Account library unavailable \\([a-z-]{1,64}\\); credentials and installed games are unchanged\\.|Account library timed out; installed games are unchanged\\.|Xbox profile is temporarily unavailable \\([a-z-]{1,48}\\); stored account is unchanged\\.|Xbox profile request timed out; stored account is unchanged\\.")))
|
||||
if (line.matches(Regex("NEXUS_CREDENTIAL_ERROR_V1 [a-z-]{1,48}|NEXUS_LIBRARY_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{1,3} [0-9]{1,6}|NEXUS_SESSION_DIAGNOSTIC_V1 [a-z-]{1,64}|Account library unavailable \\([a-z-]{1,64}\\); credentials and installed games are unchanged\\.|Account library timed out; installed games are unchanged\\.|Xbox profile is temporarily unavailable \\([a-z-]{1,48}\\); stored account is unchanged\\.|Xbox profile request timed out; stored account is unchanged\\.|NEXUS_CONTENT_LICENSE_DIAGNOSTIC_V1 [a-z-]{1,48} [0-9]{3}|$SIGN_IN_REJECTED")))
|
||||
report(line)
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -308,6 +308,7 @@ internal fun AppDialog(
|
||||
width: Dp? = null, fitContent: Boolean = false,
|
||||
back: (() -> Unit)? = null,
|
||||
scrollable: Boolean = true,
|
||||
scrollState: androidx.compose.foundation.ScrollState = rememberScrollState(),
|
||||
content: @Composable ColumnScope.() -> Unit,
|
||||
) {
|
||||
val pal = LocalPalette.current
|
||||
@@ -345,7 +346,7 @@ internal fun AppDialog(
|
||||
.blockTouches()
|
||||
.controllerBack(back ?: close)
|
||||
.then(modifier)
|
||||
.then(if (scrollable) Modifier.verticalScroll(rememberScrollState()) else Modifier)
|
||||
.then(if (scrollable) Modifier.verticalScroll(scrollState) else Modifier)
|
||||
.padding(horizontal = 18.dp, vertical = 16.dp),
|
||||
content = content,
|
||||
)
|
||||
|
||||
@@ -676,14 +676,15 @@ private fun MoviePreview(url: String, modifier: Modifier = Modifier) {
|
||||
|
||||
/** A dialog with one text box, for a search term or a page number; the Android keyboard comes up with it. */
|
||||
@Composable
|
||||
private fun TextEntryDialog(
|
||||
internal fun TextEntryDialog(
|
||||
title: String, initial: String, number: Boolean, confirm: String, onSubmit: (String) -> Unit, onDismiss: () -> Unit,
|
||||
id: String = "boot-movie-entry",
|
||||
) {
|
||||
val shown = rememberShown(onDismiss)
|
||||
val close = { shown.targetState = false }
|
||||
var text by remember { mutableStateOf(initial) }
|
||||
val submit = { onSubmit(text.trim()); close() }
|
||||
AppDialog(shown, close, "boot-movie-entry", wide = false, maxWidth = 460.dp) {
|
||||
AppDialog(shown, close, id, wide = false, maxWidth = 460.dp) {
|
||||
DialogTitleRow(title, close)
|
||||
AdbTextField(
|
||||
value = text, onValueChange = { text = it }, label = "", keyboardType = if (number) KeyboardType.Number else KeyboardType.Text,
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -70,12 +71,15 @@ internal fun ColorPickerDialog(title: String, initial: Int, onDismiss: () -> Uni
|
||||
var hexText by remember { mutableStateOf(ThemeColors.hex(initial)) }
|
||||
val current = ThemeColors.fromHsv(hue, sat, value)
|
||||
val first = remember { FocusRequester() }
|
||||
val scroll = rememberScrollState()
|
||||
var typingHex by remember { mutableStateOf(false) }
|
||||
LaunchedEffect(Unit) { focusSoon { first } }
|
||||
LaunchedEffect(typingHex, scroll.maxValue) { if (typingHex) scroll.animateScrollTo(scroll.maxValue) }
|
||||
fun picked(h: Float = hue, s: Float = sat, v: Float = value) {
|
||||
hue = h.coerceIn(0f, 360f); sat = s.coerceIn(0f, 1f); value = v.coerceIn(0f, 1f)
|
||||
hexText = ThemeColors.hex(ThemeColors.fromHsv(hue, sat, value))
|
||||
}
|
||||
AppDialog(shown, close, "colorPicker", wide = false, maxWidth = 460.dp) {
|
||||
AppDialog(shown, close, "colorPicker", wide = false, maxWidth = 460.dp, scrollState = scroll) {
|
||||
DialogTitleRow(title, close)
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(14.dp), verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) {
|
||||
ColorWheel(hue, sat, value) { h, s -> picked(h = h, s = s) }
|
||||
@@ -95,6 +99,7 @@ internal fun ColorPickerDialog(title: String, initial: Int, onDismiss: () -> Uni
|
||||
ThemeColors.parseHex(text)?.let { argb -> ThemeColors.toHsv(argb).let { hsv -> hue = hsv.h; sat = hsv.s; value = hsv.v } }
|
||||
},
|
||||
label = "", keyboardType = KeyboardType.Ascii, imeAction = ImeAction.Done, placeholder = stringResource(R.string.theme_color_hex),
|
||||
onFocusChange = { typingHex = it },
|
||||
onDone = { ThemeColors.parseHex(hexText)?.let { onApply(it); close() } },
|
||||
)
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth()) {
|
||||
|
||||
@@ -70,6 +70,7 @@ import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.layout.boundsInRoot
|
||||
import androidx.compose.ui.layout.onGloballyPositioned
|
||||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.painterResource
|
||||
@@ -102,6 +103,7 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
val ctx = LocalContext.current
|
||||
val density = LocalDensity.current
|
||||
val narrow = LocalNarrowPane.current
|
||||
val short = compactDesktop()
|
||||
val colors = MaterialTheme.colorScheme
|
||||
LaunchedEffect(Unit) { UserAppsState.refresh(ctx) }
|
||||
LaunchedEffect(s.ready) { com.droiddeck.launcher.store.StoreState.refresh(ctx) }
|
||||
@@ -120,7 +122,7 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
key = "desktop", tabs = tabs,
|
||||
onOpen = a.onDesktopSettings, onPrimary = a.onDesktop,
|
||||
modifier = modifier.clipToBounds(),
|
||||
start = if (narrow) 20.dp else 44.dp, bottom = if (narrow) 20.dp else 44.dp,
|
||||
start = if (narrow) 20.dp else 44.dp, bottom = 44.dp,
|
||||
background = {
|
||||
DesktopWall(installed.map { it.iconRes } + apps.mapNotNull { it.icon })
|
||||
},
|
||||
@@ -132,8 +134,8 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
},
|
||||
words = {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (narrow) 30.sp else 42.sp, lineHeight = if (narrow) 34.sp else 46.sp,
|
||||
if (LocalConfiguration.current.screenHeightDp >= 400) Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (short) 30.sp else 42.sp, lineHeight = if (short) 34.sp else 46.sp,
|
||||
fontWeight = FontWeight.Black, color = colors.onBackground,
|
||||
)
|
||||
BusyChip(s)
|
||||
@@ -143,11 +145,12 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
PrimaryButton(open, enabled = !s.busy, main = true, large = true, icon = Icons.Outlined.DesktopWindows, onClick = click)
|
||||
},
|
||||
beside = {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
HeroIconButton(Icons.Outlined.Storefront, stringResource(R.string.flathub_name), FlathubTeal, "desktop:flathub") { at -> openFrom(at, null, "store") }
|
||||
HeroIconButton(Icons.Filled.Add, stringResource(R.string.user_apps_add), null, "desktop:add") { if (!s.busy) adding = true }
|
||||
}
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp), verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.horizontalScroll(rememberScrollState()),
|
||||
) {
|
||||
HeroIconButton(Icons.Outlined.Storefront, stringResource(R.string.flathub_name), FlathubTeal, "desktop:flathub") { at -> openFrom(at, null, "store") }
|
||||
HeroIconButton(Icons.Filled.Add, stringResource(R.string.user_apps_add), null, "desktop:add") { if (!s.busy) adding = true }
|
||||
if (s.desktopPresent) UninstallDesktop(enabled = !s.runtimeActionsBlocked, onUninstall = a.onRemoveDesktop)
|
||||
}
|
||||
},
|
||||
@@ -159,6 +162,9 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
if (adding && !s.busy) AddAppDialog(s.ready, onDismiss = { adding = false }) { request, label -> UserAppsState.add(ctx, request, label) }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun compactDesktop() = LocalNarrowPane.current || LocalConfiguration.current.screenHeightDp < 600
|
||||
|
||||
@Composable
|
||||
private fun DesktopDock(
|
||||
s: FrontEndState, a: FrontEndActions, installed: List<Library.Emulator>, apps: List<UserApps.App>,
|
||||
@@ -177,7 +183,7 @@ private fun DesktopDock(
|
||||
LaunchedEffect(Unit) { mounted[0] = true }
|
||||
val scroll = rememberScrollState()
|
||||
if (keys.isEmpty() && available.isEmpty() && UserAppsState.working == null && UserAppsState.lastError == null) return
|
||||
Column(Modifier.fillMaxWidth().padding(top = if (narrow) 14.dp else 22.dp)) {
|
||||
Column(Modifier.fillMaxWidth().padding(top = if (compactDesktop()) 14.dp else 22.dp)) {
|
||||
Text(
|
||||
stringResource(R.string.user_apps_section).uppercase(), fontSize = 11.sp, fontWeight = FontWeight.Bold, letterSpacing = 1.6.sp,
|
||||
color = colors.onSurfaceVariant, modifier = Modifier.padding(start = if (narrow) 20.dp else 44.dp, bottom = 8.dp),
|
||||
|
||||
@@ -27,6 +27,8 @@ import androidx.compose.material.icons.outlined.Image
|
||||
import androidx.compose.material.icons.outlined.InsertDriveFile
|
||||
import androidx.compose.material.icons.outlined.SdCard
|
||||
import androidx.compose.material.icons.outlined.Smartphone
|
||||
import androidx.compose.material.icons.outlined.Visibility
|
||||
import androidx.compose.material.icons.outlined.VisibilityOff
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
@@ -81,8 +83,8 @@ internal class PickFolder(val dir: File, val readable: Boolean)
|
||||
|
||||
internal class PickListing(val folders: List<PickFolder>, val files: List<File>)
|
||||
|
||||
internal fun pickListing(dir: File, kind: PickKind): PickListing {
|
||||
val all = dir.listFiles()?.filter { !it.name.startsWith(".") }.orEmpty().sortedBy { it.name.lowercase() }
|
||||
internal fun pickListing(dir: File, kind: PickKind, showHidden: Boolean = false): PickListing {
|
||||
val all = dir.listFiles()?.filter { showHidden || !it.name.startsWith(".") }.orEmpty().sortedBy { it.name.lowercase() }
|
||||
return PickListing(
|
||||
all.filter { it.isDirectory }.map { PickFolder(it, it.canRead() && it.list() != null) },
|
||||
all.filter { it.isFile && it.extension.lowercase() in kind.extensions },
|
||||
@@ -92,11 +94,13 @@ internal fun pickListing(dir: File, kind: PickKind): PickListing {
|
||||
@Composable
|
||||
internal fun ExePickerDialog(
|
||||
title: String, kind: PickKind = PickKind.EXE, start: File? = null,
|
||||
onAddAll: ((File) -> Unit)? = null, onPick: (File) -> Unit, onDismiss: () -> Unit,
|
||||
onAddAll: ((File, Boolean) -> Unit)? = null, onPick: (File) -> Unit, onDismiss: () -> Unit,
|
||||
) {
|
||||
val ctx = LocalContext.current
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val density = LocalDensity.current
|
||||
val prefs = remember(ctx) { ctx.getSharedPreferences("game_picker", Context.MODE_PRIVATE) }
|
||||
var showHidden by remember { mutableStateOf(prefs.getBoolean("show_hidden", false)) }
|
||||
val shown = rememberShown(onDismiss)
|
||||
val close = { shown.targetState = false }
|
||||
val volumes = remember { pickVolumes(ctx) }
|
||||
@@ -107,14 +111,23 @@ internal fun ExePickerDialog(
|
||||
val back = { if (dir == null) close() else up() }
|
||||
val first = remember(dir) { FocusRequester() }
|
||||
LaunchedEffect(dir) { focusWithinFrames({ false }) { first } }
|
||||
val listing = remember(dir) { dir?.let { pickListing(it, kind) } }
|
||||
val listing = remember(dir, showHidden) { dir?.let { pickListing(it, kind, showHidden) } }
|
||||
var locked by remember { mutableStateOf<Dp?>(null) }
|
||||
AppDialog(
|
||||
shown, close, "filePicker", wide = false, maxWidth = 520.dp, width = locked, fitContent = locked == null, back = back,
|
||||
modifier = Modifier.onSizeChanged { if (locked == null && it.width > 0) locked = with(density) { it.width.toDp() } },
|
||||
) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(6.dp), modifier = Modifier.fillMaxWidth()) {
|
||||
DialogTitleRow(title, onClose = close)
|
||||
DialogTitleRow(title, onClose = close, leading = {
|
||||
SmallIconButton(
|
||||
if (showHidden) Icons.Outlined.VisibilityOff else Icons.Outlined.Visibility,
|
||||
stringResource(if (showHidden) R.string.fm_hide_hidden else R.string.fm_show_hidden),
|
||||
if (showHidden) colors.primary else colors.onSurfaceVariant,
|
||||
) {
|
||||
showHidden = !showHidden
|
||||
prefs.edit().putBoolean("show_hidden", showHidden).apply()
|
||||
}
|
||||
})
|
||||
if (dir != null && volume != null) {
|
||||
val crumbs = listOf(volume.label) + dir!!.path.removePrefix(volume.root.path).split('/').filter { it.isNotEmpty() }
|
||||
Text(crumbs.joinToString(" › "), fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
@@ -135,7 +148,7 @@ internal fun ExePickerDialog(
|
||||
val shownListing = listing ?: PickListing(emptyList(), emptyList())
|
||||
PickerRow(Icons.AutoMirrored.Outlined.ArrowBack, "..", null, focus = first, onClick = up)
|
||||
if (onAddAll != null && shownListing.folders.any { it.readable }) {
|
||||
PickerRow(Icons.Filled.Add, stringResource(R.string.games_add_all), null, accent = true) { onAddAll(dir!!); close() }
|
||||
PickerRow(Icons.Filled.Add, stringResource(R.string.games_add_all), null, accent = true) { onAddAll(dir!!, showHidden); close() }
|
||||
}
|
||||
for (f in shownListing.folders) key(f.dir.path) {
|
||||
PickerRow(Icons.Outlined.Folder, f.dir.name, null, enabled = f.readable) { dir = f.dir }
|
||||
|
||||
@@ -424,7 +424,7 @@ private fun GamesDialogs(a: FrontEndActions, games: List<Library.SteamGame>) {
|
||||
val st = GamesDialogState
|
||||
if (st.adding) ExePickerDialog(
|
||||
stringResource(R.string.games_add_title),
|
||||
onAddAll = { dir ->
|
||||
onAddAll = { dir, showHidden ->
|
||||
st.summary = emptyList<com.droiddeck.launcher.frontend.AddedGames.Game>() to 0
|
||||
st.checking = dir.name
|
||||
scope.launch {
|
||||
@@ -433,6 +433,7 @@ private fun GamesDialogs(a: FrontEndActions, games: List<Library.SteamGame>) {
|
||||
ctx.applicationContext, dir,
|
||||
onGame = { g -> scope.launch { st.summary?.let { (list, n) -> st.summary = (list + g) to n } } },
|
||||
onChecking = { name -> scope.launch { st.checking = name } },
|
||||
showHidden = showHidden,
|
||||
)
|
||||
}
|
||||
st.checking = null
|
||||
|
||||
@@ -132,7 +132,7 @@ class FrontEndState(
|
||||
val controller: com.droiddeck.launcher.input.ControllerPrefs.Settings? = null,
|
||||
val phantomProcessStatus: PhantomProcessStatus = PhantomProcessStatus.NOT_APPLICABLE,
|
||||
val showPhantomGate: Boolean = false,
|
||||
val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE,
|
||||
val orientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
|
||||
val launcherFullscreen: Boolean = true,
|
||||
val downloadSource: String = DownloadSource.MODE_AUTO,
|
||||
val downloadMirror: String = "",
|
||||
|
||||
@@ -335,6 +335,11 @@ internal fun SetupPanel(
|
||||
}
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.setup_runtime)) { runtimeCheck(false) }
|
||||
SettingsGroup(stringResource(R.string.lan_title)) {
|
||||
ActionRow(stringResource(R.string.lan_title), stringResource(R.string.lan_setup_hint), stringResource(R.string.setup_manage), onClick = {
|
||||
ctx.startActivity(android.content.Intent(ctx, com.droiddeck.launcher.lan.LocalLanActivity::class.java))
|
||||
})
|
||||
}
|
||||
}
|
||||
1 -> {
|
||||
val controller = s.controller
|
||||
@@ -359,6 +364,7 @@ internal fun SetupPanel(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (s.theme == Themes.INNER_GAMER) RgbSpeedRow()
|
||||
if (s.theme == Themes.GRADIENT) GradientColorRows()
|
||||
ChoiceRow(
|
||||
host, "app-scale", stringResource(R.string.setup_app_scale), stringResource(R.string.setup_app_scale_hint),
|
||||
@@ -792,6 +798,13 @@ private fun LanguageRow(host: MenuHost, chosen: String, onPick: (String) -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
/** How fast Inner Gamer cycles its colours. */
|
||||
@Composable
|
||||
private fun RgbSpeedRow() {
|
||||
val ctx = androidx.compose.ui.platform.LocalContext.current.applicationContext
|
||||
SliderRow(stringResource(R.string.theme_rgb_speed), stringResource(R.string.theme_rgb_speed_hint), Themes.rgbSpeed, 1..Themes.RGB_SPEEDS) { Themes.setRgbSpeed(ctx, it) }
|
||||
}
|
||||
|
||||
/** The two colours of the Gradient theme, each a small square that opens the colour picker. */
|
||||
@Composable
|
||||
private fun GradientColorRows() {
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.compose.ui.platform.LocalClipboardManager
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import com.droiddeck.launcher.gpu.DeviceInfo
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
@@ -128,6 +129,8 @@ class GpuDriversState(
|
||||
val runtime: DriverSlot = DriverSlot(),
|
||||
val canRestart: Boolean = true,
|
||||
val checkedAt: Long = 0L,
|
||||
val tpUbwcMode: String? = null,
|
||||
val tpUbwcRestartRequired: Boolean = false,
|
||||
) {
|
||||
val activePair: PairRow? get() = pairs.firstOrNull { it.active }
|
||||
}
|
||||
@@ -147,6 +150,7 @@ class GpuDriversActions(
|
||||
val onRestoreBundled: () -> Unit = {},
|
||||
val onMode: (String) -> Unit = {},
|
||||
val onRestart: () -> Unit = {},
|
||||
val onTpUbwcMode: (String) -> Unit = {},
|
||||
)
|
||||
|
||||
@Composable
|
||||
@@ -259,6 +263,27 @@ internal fun GpuDriversBody(
|
||||
GPU_MODE_PAIR -> PairBody(gpu, actions)
|
||||
else -> MixBody(single, actions, slotFocus, onOpenSlot)
|
||||
}
|
||||
gpu.tpUbwcMode?.let { selected ->
|
||||
var advanced by rememberSaveable { mutableStateOf(false) }
|
||||
SecondaryButton(stringResource(R.string.gpu_advanced) + if (advanced) " ▴" else " ▾", modifier = Modifier.fillMaxWidth()) { advanced = !advanced }
|
||||
AnimatedVisibility(advanced) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
ChoiceRow(
|
||||
rememberMenuHost(), "tp-ubwc", stringResource(R.string.gpu_ubwc_title),
|
||||
stringResource(R.string.gpu_ubwc_hint),
|
||||
listOf(
|
||||
SessionPrefs.TP_UBWC_AUTO to stringResource(R.string.common_auto),
|
||||
SessionPrefs.TP_UBWC_ON to stringResource(R.string.widgets_on),
|
||||
SessionPrefs.TP_UBWC_OFF to stringResource(R.string.widgets_off),
|
||||
), selected, onPick = actions.onTpUbwcMode,
|
||||
)
|
||||
if (gpu.tpUbwcRestartRequired) {
|
||||
Text(stringResource(R.string.gpu_ubwc_restart), fontSize = 13.sp, color = AttentionAmber)
|
||||
if (gpu.canRestart) SecondaryButton(stringResource(R.string.gpu_restart_now), onClick = actions.onRestart)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.LocalIndication
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.horizontalScroll
|
||||
import androidx.compose.foundation.hoverable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.selection.selectableGroup
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowse
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowseState
|
||||
|
||||
@Composable
|
||||
internal fun ItchBrowseBar() {
|
||||
val ctx = LocalContext.current
|
||||
val query = ItchBrowseState.query
|
||||
var picking by remember { mutableStateOf(false) }
|
||||
Column(Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
ChipRow {
|
||||
for (sort in ItchBrowse.sorts) BrowseChip(sortLabel(sort), query.sort == sort) { ItchBrowseState.choose(ctx, query.copy(sort = sort)) }
|
||||
}
|
||||
ChipRow {
|
||||
for (price in ItchBrowse.prices) BrowseChip(priceLabel(price), query.price == price) { ItchBrowseState.choose(ctx, query.copy(price = price)) }
|
||||
}
|
||||
ChipRow {
|
||||
BrowseChip(stringResource(R.string.stores_itch_platform_any), query.platforms.isEmpty()) { ItchBrowseState.choose(ctx, query.copy(platforms = emptySet())) }
|
||||
for (platform in ItchBrowse.platformNames) {
|
||||
val on = platform in query.platforms
|
||||
BrowseChip(platformLabel(platform), on) { ItchBrowseState.choose(ctx, query.copy(platforms = if (on) query.platforms - platform else query.platforms + platform)) }
|
||||
}
|
||||
}
|
||||
ChipRow {
|
||||
for (tag in query.tags) BrowseChip("$tag ✕", true) { ItchBrowseState.choose(ctx, query.copy(tags = query.tags - tag)) }
|
||||
BrowseChip(stringResource(R.string.stores_itch_tag_add), false) { picking = true }
|
||||
}
|
||||
}
|
||||
if (picking) TextEntryDialog(
|
||||
stringResource(R.string.stores_itch_tag_title), "", number = false, confirm = stringResource(R.string.common_ok),
|
||||
onSubmit = { value -> ItchBrowse.tagSlug(value).takeIf { it.isNotEmpty() }?.let { ItchBrowseState.choose(ctx, query.copy(tags = (query.tags + it).distinct())) } },
|
||||
onDismiss = { picking = false }, id = "itch-tag",
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun ItchLoadMore() {
|
||||
val ctx = LocalContext.current
|
||||
val count = ItchBrowseState.items.size
|
||||
LaunchedEffect(Unit) { ItchBrowseState.more(ctx) }
|
||||
if (ItchBrowseState.loading) LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 12.dp))
|
||||
else if (ItchBrowseState.failed) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
|
||||
BrowseChip(stringResource(R.string.stores_dl_retry), false) { ItchBrowseState.more(ctx, retry = true) }
|
||||
}
|
||||
else if (!ItchBrowseState.ended && count > 0) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
|
||||
BrowseChip(stringResource(R.string.stores_itch_load_more), false) { ItchBrowseState.more(ctx) }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ChipRow(content: @Composable () -> Unit) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp), verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()).selectableGroup(),
|
||||
) { content() }
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun BrowseChip(label: String, selected: Boolean, onClick: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val shape = RoundedCornerShape(8.dp)
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
Text(
|
||||
label, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, maxLines = 1,
|
||||
color = if (selected) pal.onSignal else if (hot) colors.onBackground else colors.onSurfaceVariant,
|
||||
modifier = Modifier.clip(shape).background(if (selected) pal.signal else colors.surfaceVariant)
|
||||
.glideBorder(hot, shape, pal.signal)
|
||||
.hoverable(src).selectable(selected = selected, interactionSource = src, indication = LocalIndication.current, role = Role.Tab, onClick = onClick)
|
||||
.controllerConfirm(onClick = onClick)
|
||||
.padding(horizontal = 12.dp, vertical = 7.dp),
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun sortLabel(sort: String): String = stringResource(
|
||||
when (sort) {
|
||||
ItchBrowse.SORT_NEW_POPULAR -> R.string.stores_itch_sort_new_popular
|
||||
ItchBrowse.SORT_TOP_SELLERS -> R.string.stores_itch_sort_top_sellers
|
||||
ItchBrowse.SORT_TOP_RATED -> R.string.stores_itch_sort_top_rated
|
||||
ItchBrowse.SORT_NEWEST -> R.string.stores_itch_sort_new
|
||||
else -> R.string.stores_itch_sort_popular
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
private fun platformLabel(platform: String): String = stringResource(
|
||||
when (platform) {
|
||||
"windows" -> R.string.stores_itch_platform_windows
|
||||
"osx" -> R.string.stores_itch_platform_macos
|
||||
"linux" -> R.string.stores_itch_platform_linux
|
||||
"android" -> R.string.stores_itch_platform_android
|
||||
"ios" -> R.string.stores_itch_platform_ios
|
||||
"web" -> R.string.stores_itch_platform_web
|
||||
else -> R.string.stores_itch_platform_mobile_web
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
private fun priceLabel(price: String): String = stringResource(
|
||||
when (price) {
|
||||
ItchBrowse.PRICE_FREE -> R.string.stores_itch_price_free
|
||||
ItchBrowse.PRICE_SALE -> R.string.stores_itch_price_sale
|
||||
ItchBrowse.PRICE_PAID -> R.string.stores_itch_price_paid
|
||||
ItchBrowse.PRICE_UNDER_5 -> R.string.stores_itch_price_under_5
|
||||
ItchBrowse.PRICE_UNDER_15 -> R.string.stores_itch_price_under_15
|
||||
else -> R.string.stores_itch_price_any
|
||||
},
|
||||
)
|
||||
@@ -82,6 +82,8 @@ class ModeSettings(
|
||||
val steamClientArch: String? = null,
|
||||
/** Steam only: a game launched from the front end returns there when it closes; null hides the row. */
|
||||
val returnAfterGame: Boolean? = null,
|
||||
/** Steam only: the client's Shader Pre-Caching setting; null hides the row. */
|
||||
val shaderPrecache: Boolean? = null,
|
||||
val steamRepairQueued: Boolean = false,
|
||||
val mangoapp: Boolean = true,
|
||||
val steamController: String? = null,
|
||||
@@ -136,6 +138,7 @@ class ModeSettingsActions(
|
||||
val onSteamClientArch: (String) -> Unit = {},
|
||||
val onMangoapp: (Boolean) -> Unit = {},
|
||||
val onReturnAfterGame: (Boolean) -> Unit = {},
|
||||
val onShaderPrecache: (Boolean) -> Unit = {},
|
||||
val onSteamController: (String) -> Unit = {},
|
||||
val onUnfoldedControls: (Boolean) -> Unit = {},
|
||||
val onUnfoldedControlsWithController: (Boolean) -> Unit = {},
|
||||
@@ -478,6 +481,11 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
stringResource(R.string.mode_return_after_game_hint),
|
||||
s.returnAfterGame, onChange = a.onReturnAfterGame,
|
||||
)
|
||||
if (s.shaderPrecache != null) ToggleRow(
|
||||
host, "shaderprecache", stringResource(R.string.mode_shader_precache),
|
||||
stringResource(R.string.mode_shader_precache_hint),
|
||||
s.shaderPrecache, onChange = a.onShaderPrecache,
|
||||
)
|
||||
SettingsRow(
|
||||
stringResource(R.string.mode_steam_repair),
|
||||
stringResource(if (s.steamRepairQueued) R.string.mode_steam_repair_queued else R.string.mode_steam_repair_hint),
|
||||
|
||||
@@ -46,6 +46,7 @@ fun PerformancePage(
|
||||
gpuClockPin: Boolean,
|
||||
prootNoSeccomp: Boolean,
|
||||
prootFastPath: Boolean,
|
||||
cursorComposite: Boolean,
|
||||
guestHostname: String,
|
||||
phantomWarning: String?,
|
||||
onClientOverride: (Boolean) -> Unit,
|
||||
@@ -61,6 +62,7 @@ fun PerformancePage(
|
||||
onGpuClockPin: (Boolean) -> Unit,
|
||||
onProotNoSeccomp: (Boolean) -> Unit,
|
||||
onProotFastPath: (Boolean) -> Unit,
|
||||
onCursorComposite: (Boolean) -> Unit,
|
||||
onGuestHostname: (String) -> Unit,
|
||||
onClientCore: (Int, Boolean) -> Unit,
|
||||
onGameCore: (Int, Boolean) -> Unit,
|
||||
@@ -158,6 +160,11 @@ fun PerformancePage(
|
||||
else stringResource(R.string.perf_fastpath_hint),
|
||||
prootFastPath && !prootNoSeccomp, enabled = !prootNoSeccomp, onChange = onProotFastPath,
|
||||
)
|
||||
ToggleRow(
|
||||
host, "cursorcomposite", stringResource(R.string.perf_cursor_composite),
|
||||
stringResource(R.string.perf_cursor_composite_hint),
|
||||
cursorComposite, onChange = onCursorComposite,
|
||||
)
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.perf_identity)) {
|
||||
var draft by remember(guestHostname) { mutableStateOf(guestHostname) }
|
||||
|
||||
@@ -24,7 +24,6 @@ import androidx.compose.animation.core.FastOutSlowInEasing
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.material.icons.filled.Pause
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.foundation.Canvas
|
||||
@@ -345,37 +344,3 @@ private fun CancelHint(onCancel: () -> Unit, modifier: Modifier = Modifier) {
|
||||
Text(stringResource(R.string.common_cancel), fontSize = 13.sp, color = colors.onSurfaceVariant)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SessionPausedOverlay(title: String = stringResource(R.string.load_steam_paused), onResume: () -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val resumeFocus = remember { FocusRequester() }
|
||||
LaunchedEffect(Unit) {
|
||||
androidx.compose.runtime.withFrameNanos { }
|
||||
runCatching { resumeFocus.requestFocus() }
|
||||
}
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(pal.background.copy(alpha = 0.94f))
|
||||
.blockTouches(),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.spacedBy(10.dp),
|
||||
modifier = Modifier.widthIn(max = 440.dp).padding(32.dp),
|
||||
) {
|
||||
Box(contentAlignment = Alignment.Center, modifier = Modifier.padding(bottom = 6.dp).size(64.dp).border(2.dp, pal.line2, CircleShape)) {
|
||||
Icon(Icons.Filled.Pause, contentDescription = null, tint = colors.onBackground, modifier = Modifier.size(30.dp))
|
||||
}
|
||||
Text(title, fontSize = 28.sp, fontWeight = FontWeight.Bold, color = colors.onBackground, textAlign = TextAlign.Center)
|
||||
PrimaryButton(
|
||||
stringResource(R.string.resume_session),
|
||||
modifier = Modifier.padding(top = 14.dp).focusRequester(resumeFocus).controllerConfirm(onClick = onResume),
|
||||
onClick = onResume,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.os.Build
|
||||
import androidx.compose.animation.core.Animatable
|
||||
import androidx.compose.animation.core.CubicBezierEasing
|
||||
import androidx.compose.animation.core.FastOutLinearInEasing
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.Spring
|
||||
import androidx.compose.animation.core.animateFloat
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.core.infiniteRepeatable
|
||||
import androidx.compose.animation.core.keyframes
|
||||
import androidx.compose.animation.core.rememberInfiniteTransition
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxScope
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.offset
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.PlayArrow
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.State
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberUpdatedState
|
||||
import androidx.compose.runtime.snapshotFlow
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.withFrameNanos
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.blur
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.draw.drawWithContent
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.graphics.ColorMatrix
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.StrokeCap
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.rotate
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.unit.IntOffset
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.droiddeck.launcher.R
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
|
||||
/** The last game frame, captured as the session left the screen, and where it sat in the overlay. */
|
||||
class PausedFrame(val image: ImageBitmap, val bounds: android.graphics.Rect)
|
||||
|
||||
private const val CARD_SCALE = 0.82f
|
||||
private const val FRAME_WAIT_MS = 600L
|
||||
|
||||
private fun tone(saturation: Float, brightness: Float): ColorMatrix =
|
||||
ColorMatrix().apply {
|
||||
setToSaturation(saturation)
|
||||
timesAssign(ColorMatrix().apply { setToScale(brightness, brightness, brightness, 1f) })
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SessionPausedOverlay(
|
||||
suspended: Boolean,
|
||||
engaged: Boolean,
|
||||
failures: Int,
|
||||
frame: PausedFrame?,
|
||||
title: String,
|
||||
onResume: () -> Unit,
|
||||
onFrameNeeded: () -> Unit,
|
||||
onHidden: () -> Unit,
|
||||
) {
|
||||
val currentFrame by rememberUpdatedState(frame)
|
||||
var shown by remember { mutableStateOf(suspended) }
|
||||
val lift = remember { Animatable(if (suspended) 1f else 0f) }
|
||||
val orb = remember { Animatable(if (suspended) 1f else 0f) }
|
||||
val press = remember { Animatable(1f) }
|
||||
val ring = remember { Animatable(0f) }
|
||||
val shake = remember { Animatable(0f) }
|
||||
|
||||
LaunchedEffect(suspended, engaged) {
|
||||
when {
|
||||
suspended && !engaged -> {
|
||||
if (!shown) {
|
||||
if (currentFrame == null) {
|
||||
onFrameNeeded()
|
||||
withTimeoutOrNull(FRAME_WAIT_MS) { snapshotFlow { currentFrame }.first { it != null } }
|
||||
}
|
||||
// Pausing mostly happens while the screen is off or the app is away, so it appears already settled.
|
||||
press.snapTo(1f)
|
||||
ring.snapTo(0f)
|
||||
lift.snapTo(1f)
|
||||
orb.snapTo(1f)
|
||||
shown = true
|
||||
return@LaunchedEffect
|
||||
}
|
||||
launch { press.animateTo(1f, Motion.sp(0.5f, Spring.StiffnessMedium)) }
|
||||
launch { ring.animateTo(0f, Motion.tw(200)) }
|
||||
orb.animateTo(1f, Motion.tw(200))
|
||||
}
|
||||
suspended -> {
|
||||
if (!shown) return@LaunchedEffect
|
||||
launch { orb.animateTo(1f, Motion.tw(200)) }
|
||||
launch { press.animateTo(0.92f, Motion.tw(140)) }
|
||||
ring.animateTo(0.25f, Motion.tw(140))
|
||||
ring.animateTo(0.8f, Motion.tw(650, easing = CubicBezierEasing(0.1f, 0.6f, 0.3f, 1f)))
|
||||
ring.animateTo(0.92f, Motion.tw(2000, easing = LinearOutSlowInEasing))
|
||||
}
|
||||
shown -> {
|
||||
ring.animateTo(1f, Motion.tw(110))
|
||||
coroutineScope {
|
||||
launch { orb.animateTo(0f, Motion.tw(220, easing = FastOutLinearInEasing)) }
|
||||
lift.animateTo(0f, Motion.sp(0.62f, 380f))
|
||||
}
|
||||
shown = false
|
||||
ring.snapTo(0f)
|
||||
press.snapTo(1f)
|
||||
onHidden()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val seenFailures = remember { mutableIntStateOf(failures) }
|
||||
LaunchedEffect(failures) {
|
||||
if (failures == seenFailures.intValue) return@LaunchedEffect
|
||||
seenFailures.intValue = failures
|
||||
if (!shown || Motion.scale == 0f) return@LaunchedEffect
|
||||
shake.animateTo(0f, keyframes {
|
||||
durationMillis = Motion.ms(360)
|
||||
10f at Motion.ms(60)
|
||||
-8f at Motion.ms(140)
|
||||
5f at Motion.ms(220)
|
||||
-2f at Motion.ms(300)
|
||||
})
|
||||
}
|
||||
|
||||
if (!shown) return
|
||||
|
||||
val presence = lift.value.coerceIn(0f, 1f)
|
||||
val idle = suspended && !engaged
|
||||
val focus = remember { FocusRequester() }
|
||||
LaunchedEffect(Unit) {
|
||||
withFrameNanos { }
|
||||
runCatching { focus.requestFocus() }
|
||||
}
|
||||
val resumeLabel = stringResource(R.string.resume_session)
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.semantics { contentDescription = title }
|
||||
.focusRequester(focus)
|
||||
.controllerConfirm(enabled = idle, onClick = onResume)
|
||||
.clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null,
|
||||
role = Role.Button,
|
||||
onClickLabel = resumeLabel,
|
||||
) { if (idle) onResume() },
|
||||
) {
|
||||
if (frame != null) {
|
||||
PausedCard(frame, lift.value, presence)
|
||||
} else {
|
||||
Box(Modifier.fillMaxSize().graphicsLayer { alpha = presence }.background(Color.Black.copy(alpha = 0.55f)))
|
||||
}
|
||||
ResumeOrb(orb.value, press.value, ring.value, shake.value, idle)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun BoxScope.PausedCard(frame: PausedFrame, lift: Float, presence: Float) {
|
||||
val density = LocalDensity.current
|
||||
val bounds = frame.bounds
|
||||
val ambient = remember { ColorFilter.colorMatrix(tone(0.1f, 0.3f)) }
|
||||
Box(Modifier.fillMaxSize().graphicsLayer { alpha = presence }.background(Color.Black)) {
|
||||
Image(
|
||||
frame.image, contentDescription = null, contentScale = ContentScale.Crop, colorFilter = ambient,
|
||||
modifier = Modifier.fillMaxSize().then(if (Build.VERSION.SDK_INT >= 31) Modifier.blur(32.dp) else Modifier),
|
||||
)
|
||||
}
|
||||
Image(
|
||||
frame.image, contentDescription = null, contentScale = ContentScale.FillBounds,
|
||||
colorFilter = ColorFilter.colorMatrix(tone(1f - 0.92f * presence, 1f - 0.45f * presence)),
|
||||
modifier = Modifier
|
||||
.align(Alignment.TopStart)
|
||||
.offset { IntOffset(bounds.left, bounds.top) }
|
||||
.size(with(density) { bounds.width().toDp() }, with(density) { bounds.height().toDp() })
|
||||
.graphicsLayer {
|
||||
val scale = 1f - (1f - CARD_SCALE) * lift
|
||||
scaleX = scale
|
||||
scaleY = scale
|
||||
shape = RoundedCornerShape((20f * presence).dp)
|
||||
clip = true
|
||||
shadowElevation = 24.dp.toPx() * presence
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ResumeOrb(presence: Float, press: Float, ring: Float, shake: Float, idle: Boolean) {
|
||||
val glintAlpha by animateFloatAsState(if (idle) 1f else 0f, Motion.tw(160), label = "glintAlpha")
|
||||
val glint: State<Float>? = if (Motion.scale > 0f) {
|
||||
rememberInfiniteTransition(label = "glint").animateFloat(
|
||||
0f, 360f, infiniteRepeatable(tween(Motion.ms(3600), easing = LinearEasing)), label = "glintAngle",
|
||||
)
|
||||
} else null
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier
|
||||
.size(96.dp)
|
||||
.graphicsLayer {
|
||||
val scale = press * (0.4f + 0.6f * presence)
|
||||
scaleX = scale
|
||||
scaleY = scale
|
||||
alpha = presence.coerceIn(0f, 1f)
|
||||
translationX = shake.dp.toPx()
|
||||
}
|
||||
.drawBehind {
|
||||
val halo = size.minDimension * 0.8f
|
||||
drawCircle(Brush.radialGradient(0.6f to Color.Black.copy(alpha = 0.35f), 1f to Color.Transparent, radius = halo), radius = halo)
|
||||
}
|
||||
.clip(CircleShape)
|
||||
.background(Color.White.copy(alpha = 0.08f))
|
||||
.drawWithContent {
|
||||
drawContent()
|
||||
val stroke = 2.5.dp.toPx()
|
||||
val radius = size.minDimension / 2f * 0.92f
|
||||
if (glint != null && glintAlpha > 0f) {
|
||||
rotate(glint.value) {
|
||||
drawCircle(
|
||||
Brush.sweepGradient(
|
||||
0f to Color.Transparent,
|
||||
0.083f to Color.White.copy(alpha = 0.4f * glintAlpha),
|
||||
0.166f to Color.Transparent,
|
||||
1f to Color.Transparent,
|
||||
),
|
||||
radius = radius, style = Stroke(stroke),
|
||||
)
|
||||
}
|
||||
}
|
||||
if (ring > 0f) {
|
||||
drawArc(
|
||||
Color.White, startAngle = -90f, sweepAngle = 360f * ring.coerceAtMost(1f), useCenter = false,
|
||||
topLeft = Offset(center.x - radius, center.y - radius), size = Size(radius * 2f, radius * 2f),
|
||||
style = Stroke(stroke, cap = StrokeCap.Round),
|
||||
)
|
||||
}
|
||||
},
|
||||
) {
|
||||
Icon(Icons.Rounded.PlayArrow, contentDescription = null, tint = Color.White, modifier = Modifier.size(48.dp))
|
||||
}
|
||||
}
|
||||
@@ -128,6 +128,7 @@ import androidx.compose.ui.graphics.lerp
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
@@ -145,6 +146,7 @@ import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.stores.CatalogItem
|
||||
import com.droiddeck.launcher.stores.itch.ItchBrowseState
|
||||
import com.droiddeck.launcher.stores.Store
|
||||
import com.droiddeck.launcher.stores.StoreTab
|
||||
import com.droiddeck.launcher.stores.StoresState
|
||||
@@ -172,6 +174,7 @@ private data class PaneKey(val chip: String, val tab: String, val signedIn: Bool
|
||||
@Composable
|
||||
internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier) {
|
||||
val ctx = LocalContext.current
|
||||
val focusManager = LocalFocusManager.current
|
||||
com.droiddeck.launcher.stores.xbox.XboxContent.plan?.let { content ->
|
||||
androidx.compose.material3.AlertDialog(
|
||||
onDismissRequest = { com.droiddeck.launcher.stores.xbox.XboxContent.dismiss() },
|
||||
@@ -279,7 +282,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
val heroFocus = remember { androidx.compose.ui.focus.FocusRequester() }
|
||||
var detailFocused by remember { mutableStateOf(false) }
|
||||
fun move(kind: String) { focusMove = kind to (focusMove?.second ?: 0) + 1 }
|
||||
fun open(key: String) { lastOpened = key; openGame = key; move("detail") }
|
||||
fun open(key: String) { focusManager.clearFocus(force = true); lastOpened = key; openGame = key; move("detail") }
|
||||
fun closeGame() { openGame = null; move("card") }
|
||||
fun switchTab(to: String) { tab = to; move("first") }
|
||||
val pickChip: (String) -> Unit = { id ->
|
||||
@@ -477,7 +480,11 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
androidx.compose.material3.LinearProgressIndicator(Modifier.fillMaxWidth().height(3.dp))
|
||||
}
|
||||
!k.signedIn -> Box(Modifier.fillMaxWidth().verticalScroll(scroll).padding(top = 4.dp, bottom = 16.dp)) { SignInCard(st, viewportH - 20.dp) }
|
||||
else -> Storefront(st, k.tab, query, s, a, grids.getOrPut(k) { LazyGridState() }, onQuery = { query = it }, onOpen = { open(it) }, onTab = { switchTab(it) })
|
||||
else -> Storefront(
|
||||
st, k.tab, query, s, a, grids.getOrPut(k) { LazyGridState() },
|
||||
clearSearchFocus = openGame != null,
|
||||
onQuery = { query = it }, onOpen = { open(it) }, onTab = { switchTab(it) },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -538,7 +545,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
|
||||
seenActive.clear(); seenActive.addAll(activeKeys)
|
||||
if (fresh.isNotEmpty()) StoresMotion.takeInstall()?.let { StoresMotion.fly(it) }
|
||||
}
|
||||
StoresState.pendingInstall?.let { item -> InstallWhere(item) }
|
||||
StoresState.pendingInstall?.let { item -> StoreTheme(item.store) { InstallWhere(item) } }
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -937,6 +944,7 @@ internal fun StoreLogo(store: Store, size: Dp) {
|
||||
private fun Storefront(
|
||||
store: Store, tab: String, query: String, s: FrontEndState, a: FrontEndActions,
|
||||
grid: LazyGridState,
|
||||
clearSearchFocus: Boolean,
|
||||
onQuery: (String) -> Unit, onOpen: (String) -> Unit, onTab: (String) -> Unit,
|
||||
) {
|
||||
val ctx = LocalContext.current
|
||||
@@ -954,7 +962,8 @@ private fun Storefront(
|
||||
val everything = remember(library, shelves, found) { (found + library + (shelves?.all ?: emptyList())).distinctBy { it.id } }
|
||||
LaunchedEffect(store, q) { StoresState.search(ctx, store, q) }
|
||||
val loaded = StoresState.library.containsKey(store)
|
||||
val showGrid = tab != "store" || q.isNotEmpty()
|
||||
val browsing = store == Store.ITCH && tab == "store" && q.isEmpty() && ItchBrowseState.active
|
||||
val showGrid = tab != "store" || q.isNotEmpty() || browsing
|
||||
val sort = s.storesSort
|
||||
val lastPlayedFor = remember(s.steamGames) {
|
||||
val byKey = s.steamGames.associate { "${it.source}:${it.storeId}" to it.lastPlayed }
|
||||
@@ -967,8 +976,13 @@ private fun Storefront(
|
||||
lookup
|
||||
}
|
||||
val isSizeSort = tab == "library" && (sort == "sizeAsc" || sort == "sizeDesc")
|
||||
val candidates = remember(library, everything, tab, q, s.storesShowMature) {
|
||||
if (tab == "library") library.filter(::matches) else everything.filter { matches(it) && shown(it) }
|
||||
val browseItems = if (browsing) ItchBrowseState.items else emptyList()
|
||||
val candidates = remember(library, everything, tab, q, s.storesShowMature, browsing, browseItems) {
|
||||
if (tab == "library") library.filter(::matches)
|
||||
else if (browsing) {
|
||||
val owned = library.associateBy { it.id }
|
||||
browseItems.map { owned[it.id] ?: it }.filter(::shown)
|
||||
} else everything.filter { matches(it) && shown(it) }
|
||||
}
|
||||
val candidateKeys = remember(candidates) { candidates.map { it.key } }
|
||||
var resolvedSizeSortKey by remember(store, tab) { mutableStateOf<List<String>?>(null) }
|
||||
@@ -1006,6 +1020,8 @@ private fun Storefront(
|
||||
}
|
||||
val empty = stringResource(when {
|
||||
tab == "library" && library.isEmpty() && StoresState.status[store] != null -> R.string.stores_library_loading
|
||||
browsing && ItchBrowseState.loading -> R.string.stores_shelves_loading
|
||||
browsing && ItchBrowseState.failed -> R.string.stores_itch_browse_failed
|
||||
else -> R.string.stores_nothing_matches
|
||||
})
|
||||
var firstPlaced = false
|
||||
@@ -1016,8 +1032,9 @@ private fun Storefront(
|
||||
// A bar only where the tab has nothing else on it: shelves, the shelf of owned games, or a grid still loading.
|
||||
val gridEmpty = if (showGrid) visible.isEmpty() else (shelves == null || shelves.isEmpty) && library.isEmpty()
|
||||
val barLine = StoresState.status[store]?.takeIf { gridEmpty && syncCount(it) != null }
|
||||
val itchBar = store == Store.ITCH && tab == "store" && q.isEmpty()
|
||||
val headerItems = 1 + (if (sizeSortPending) 1 else 0) + (if (barLine != null) 1 else 0) +
|
||||
(if (StoresState.problems[store] != null) 1 else 0)
|
||||
(if (StoresState.problems[store] != null) 1 else 0) + (if (itchBar) 1 else 0)
|
||||
val listMode = s.storesView == "list" && tab == "library"
|
||||
val capsules = s.storesView == "capsules" && tab == "library"
|
||||
val tileWidth = if (capsules) CapsuleWidth else CardWidth
|
||||
@@ -1072,6 +1089,7 @@ private fun Storefront(
|
||||
libraryLabel,
|
||||
query, onQuery,
|
||||
placeholder = if (tab == "store") stringResource(R.string.stores_search_catalog, store.label) else stringResource(R.string.stores_search_library),
|
||||
clearSearchFocus = clearSearchFocus,
|
||||
lead = if (tabs.size < 2) null else { {
|
||||
val labels = tabs.map { if (it == "store") stringResource(R.string.stores_tab_store) else libraryLabel }
|
||||
HeaderTabs(labels, tabs.indexOf(tab).coerceAtLeast(0)) { onTab(tabs[it]) }
|
||||
@@ -1102,6 +1120,7 @@ private fun Storefront(
|
||||
}
|
||||
barLine?.let { line -> item(key = "sync", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { SyncBar(line) } } }
|
||||
StoresState.problems[store]?.let { line -> item(key = "problem", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { Box(Modifier.padding(bottom = 8.dp)) { Note(line) } } } }
|
||||
if (itchBar) item(key = "itch-browse-bar", span = { GridItemSpan(maxLineSpan) }) { ItchBrowseBar() }
|
||||
when (tab) {
|
||||
"library" -> if (!loaded) Unit
|
||||
else if (split == 0) storeGrid(visible, empty, card)
|
||||
@@ -1112,8 +1131,10 @@ private fun Storefront(
|
||||
storeGrid(visible.drop(split), empty, card)
|
||||
}
|
||||
else -> {
|
||||
if (q.isNotEmpty()) storeGrid(visible, empty, card)
|
||||
else {
|
||||
if (q.isNotEmpty() || browsing) {
|
||||
storeGrid(visible, empty, card)
|
||||
if (browsing) item(key = "itch-more", span = { GridItemSpan(maxLineSpan) }) { ItchLoadMore() }
|
||||
} else {
|
||||
item(key = "shelves", span = { GridItemSpan(maxLineSpan) }) {
|
||||
Column {
|
||||
Shelf(stringResource(R.string.stores_shelf_new), shelf(shelves?.whatsNew), card)
|
||||
@@ -1172,6 +1193,7 @@ private fun HeaderTabs(labels: List<String>, selected: Int, onSelect: (Int) -> U
|
||||
@Composable
|
||||
internal fun ModeHeader(
|
||||
title: String, query: String, onQuery: (String) -> Unit, placeholder: String,
|
||||
clearSearchFocus: Boolean = false,
|
||||
lead: (@Composable () -> Unit)? = null, trailing: @Composable () -> Unit,
|
||||
) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
@@ -1193,6 +1215,7 @@ internal fun ModeHeader(
|
||||
AdbTextField(
|
||||
value = query, onValueChange = onQuery, label = "", keyboardType = KeyboardType.Text, imeAction = ImeAction.Search,
|
||||
placeholder = placeholder, compact = true, focusOnShow = focusOnOpen,
|
||||
clearFocus = clearSearchFocus,
|
||||
onFocusChange = { focused -> if (!focused && query.isEmpty()) { searching = false; focusOnOpen = false } },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,15 @@ package com.droiddeck.launcher.ui
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.RepeatMode
|
||||
import androidx.compose.animation.core.animateFloat
|
||||
import androidx.compose.animation.core.infiniteRepeatable
|
||||
import androidx.compose.animation.core.rememberInfiniteTransition
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.key
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.runtime.getValue
|
||||
@@ -13,6 +21,7 @@ import android.content.Context
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.luminance
|
||||
import androidx.compose.ui.graphics.toArgb
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import com.droiddeck.launcher.R
|
||||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
@@ -33,6 +42,7 @@ object Themes {
|
||||
const val PAPER = "paper"
|
||||
const val ICON_BLUE = "blue"
|
||||
const val ELECTRIC = "electric"
|
||||
const val INNER_GAMER = "inner_gamer"
|
||||
const val GRADIENT = "gradient"
|
||||
|
||||
const val DEFAULT_PRIMARY = 0xFF8B5CF6.toInt()
|
||||
@@ -42,10 +52,42 @@ object Themes {
|
||||
var gradientColors by mutableStateOf(DEFAULT_PRIMARY to DEFAULT_SECONDARY)
|
||||
private set
|
||||
|
||||
const val RGB_SPEEDS = 10
|
||||
const val DEFAULT_RGB_SPEED = 3
|
||||
const val RGB_HUE_STEP = 3f
|
||||
|
||||
/** How fast Inner Gamer cycles, 1 (slow) to [RGB_SPEEDS] (fast). */
|
||||
var rgbSpeed by mutableStateOf(DEFAULT_RGB_SPEED)
|
||||
private set
|
||||
|
||||
/** Where Inner Gamer is on the colour wheel, in whole [RGB_HUE_STEP] steps so the app restyles only when the colour visibly moves. */
|
||||
var rgbHue by mutableStateOf(0f)
|
||||
private set
|
||||
|
||||
fun moveRgbHue(hue: Float) {
|
||||
rgbHue = hue
|
||||
}
|
||||
|
||||
fun setRgbSpeed(context: Context, speed: Int) {
|
||||
val value = speed.coerceIn(1, RGB_SPEEDS)
|
||||
SessionPrefs.setRgbSpeed(context, value)
|
||||
rgbSpeed = value
|
||||
}
|
||||
|
||||
/** Milliseconds for one trip round the colour wheel. */
|
||||
fun rgbCycleMillis(speed: Int): Int = 30_000 / speed.coerceIn(1, RGB_SPEEDS)
|
||||
|
||||
fun loadGradient(context: Context) {
|
||||
gradientColors = SessionPrefs.gradientColors(context)
|
||||
rgbSpeed = SessionPrefs.rgbSpeed(context)
|
||||
}
|
||||
|
||||
/** The Inner Gamer palette at one point on the colour wheel. */
|
||||
fun innerGamer(hue: Float): Palette = ThemeColors.palette(
|
||||
Color.hsv(hue % 360f, 0.9f, 1f).toArgb(), Color.hsv((hue + 60f) % 360f, 0.9f, 1f).toArgb(),
|
||||
R.string.theme_inner_gamer, R.string.theme_inner_gamer_detail, INNER_GAMER,
|
||||
)
|
||||
|
||||
fun setGradient(context: Context, primary: Int, secondary: Int) {
|
||||
SessionPrefs.setGradientColors(context, primary, secondary)
|
||||
gradientColors = primary to secondary
|
||||
@@ -54,7 +96,7 @@ object Themes {
|
||||
/** The theme the person chose, with the custom colours read first; for code that is not in a composition. */
|
||||
fun current(context: Context): Palette {
|
||||
val id = SessionPrefs.theme(context)
|
||||
if (id == GRADIENT) loadGradient(context)
|
||||
if (id == GRADIENT || id == INNER_GAMER) loadGradient(context)
|
||||
return byId(id)
|
||||
}
|
||||
|
||||
@@ -87,10 +129,12 @@ object Themes {
|
||||
primary = Color(0xFF2E86FF), primary2 = Color(0xFF2684FF), onPrimary = Color(0xFF03111F), signal = Color(0xFF2E86FF),
|
||||
good = Color(0xFF4CD37F),
|
||||
),
|
||||
innerGamer(0f),
|
||||
ThemeColors.palette(DEFAULT_PRIMARY, DEFAULT_SECONDARY, R.string.theme_gradient, R.string.theme_gradient_detail),
|
||||
)
|
||||
|
||||
fun byId(id: String): Palette {
|
||||
if (id == INNER_GAMER) return innerGamer(rgbHue)
|
||||
if (id == GRADIENT) return ThemeColors.palette(gradientColors.first, gradientColors.second, R.string.theme_gradient, R.string.theme_gradient_detail)
|
||||
return all.firstOrNull { it.id == id } ?: all[0]
|
||||
}
|
||||
@@ -103,6 +147,7 @@ val Palette.onSignal: Color get() = if (signal.luminance() > 0.18f) Color(0xFF03
|
||||
@Composable
|
||||
fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCALE, content: @Composable () -> Unit) {
|
||||
val id = theme ?: SessionPrefs.theme(LocalContext.current)
|
||||
if (id == Themes.INNER_GAMER) InnerGamerHue(Themes.rgbSpeed)
|
||||
val p = Themes.byId(id)
|
||||
val scheme = darkColorScheme(
|
||||
primary = p.primary, onPrimary = p.onPrimary, secondary = p.onSurfaceVariant,
|
||||
@@ -121,3 +166,21 @@ fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCA
|
||||
LocalConfiguration provides configuration,
|
||||
) { MaterialTheme(colorScheme = scheme, content = content) }
|
||||
}
|
||||
|
||||
/** Turns the colour wheel on the system's own animation clock; with animations off, in the app or in Android, the colour holds still. */
|
||||
@Composable
|
||||
private fun InnerGamerHue(speed: Int) {
|
||||
if (Motion.scale == 0f) return
|
||||
key(speed) { InnerGamerCycle(speed) }
|
||||
}
|
||||
|
||||
/** One run of the cycle at one speed, picking up from the colour on screen so a new speed takes over at once without a jump. */
|
||||
@Composable
|
||||
private fun InnerGamerCycle(speed: Int) {
|
||||
val start = remember { Themes.rgbHue }
|
||||
val hue by rememberInfiniteTransition(label = "innerGamer").animateFloat(
|
||||
start, start + 360f, infiniteRepeatable(tween(Themes.rgbCycleMillis(speed).coerceAtLeast(1), easing = LinearEasing), RepeatMode.Restart), label = "hue",
|
||||
)
|
||||
val stepped = ((hue % 360f) / Themes.RGB_HUE_STEP).toInt() * Themes.RGB_HUE_STEP
|
||||
SideEffect { Themes.moveRgbHue(stepped) }
|
||||
}
|
||||
@@ -132,7 +132,7 @@ internal object ThemeColors {
|
||||
}
|
||||
}
|
||||
|
||||
fun palette(primary: Int, secondary: Int, label: Int, detail: Int): Palette {
|
||||
fun palette(primary: Int, secondary: Int, label: Int, detail: Int, id: String = Themes.GRADIENT): Palette {
|
||||
val seen = readable(primary)
|
||||
val seenSecond = readable(secondary)
|
||||
val ink = inkFor(seen, seenSecond)
|
||||
@@ -146,7 +146,7 @@ internal object ThemeColors {
|
||||
second = nextSecond
|
||||
}
|
||||
return Palette(
|
||||
Themes.GRADIENT, label, detail,
|
||||
id, label, detail,
|
||||
background = tint(first, 0.50f, 0.045f), surface = tint(first, 0.45f, 0.075f), surfaceVariant = tint(first, 0.42f, 0.115f),
|
||||
line = tint(first, 0.40f, 0.16f), line2 = tint(first, 0.36f, 0.22f),
|
||||
onBackground = tint(first, 0.05f, 0.97f), onSurfaceVariant = tint(first, 0.16f, 0.68f),
|
||||
|
||||
@@ -356,6 +356,7 @@ internal fun AdbTextField(
|
||||
placeholder: String? = null,
|
||||
compact: Boolean = false,
|
||||
onFocusChange: (Boolean) -> Unit = {},
|
||||
clearFocus: Boolean = false,
|
||||
onNext: (() -> Unit)? = null,
|
||||
onDone: (() -> Unit)? = null,
|
||||
focusOnShow: Boolean = false,
|
||||
@@ -444,6 +445,11 @@ internal fun AdbTextField(
|
||||
?.showSoftInput(editText, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
||||
}
|
||||
if (clearFocus && editText.hasFocus()) {
|
||||
editText.clearFocus()
|
||||
(editText.context.getSystemService(android.content.Context.INPUT_METHOD_SERVICE) as? android.view.inputmethod.InputMethodManager)
|
||||
?.hideSoftInputFromWindow(editText.windowToken, 0)
|
||||
}
|
||||
editText.setTextColor(colors.onBackground.toArgb())
|
||||
editText.setHintTextColor(colors.onSurfaceVariant.toArgb())
|
||||
editText.hint = placeholder
|
||||
|
||||
@@ -23,6 +23,7 @@ object CompositorHost {
|
||||
|
||||
@Synchronized
|
||||
fun startOrAttach(
|
||||
context: android.content.Context,
|
||||
surface: Surface,
|
||||
xdgRuntimeDir: String,
|
||||
driverPath: String?,
|
||||
@@ -41,7 +42,7 @@ object CompositorHost {
|
||||
resumeVsync()
|
||||
return false
|
||||
}
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.applyToProcess()
|
||||
com.droiddeck.launcher.gpu.TpUbwcHint.applyToProcess(context)
|
||||
WaylandCompositor.nativeStartWithSurface(
|
||||
surface, xdgRuntimeDir, driverPath, libraryName, nativeLibDir,
|
||||
)
|
||||
|
||||
@@ -549,8 +549,8 @@
|
||||
<string name="perf_sysmem">Turnip: التصيير عبر sysmem</string>
|
||||
<string name="perf_sysmem_hint">أسرع لعميل Steam؛ في الألعاب يختار برنامج التشغيل بين العرض المقسّم إلى مربعات والعرض في ذاكرة النظام لكل مرحلة. مطلوب على Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">تجاوز مساعد xalia في Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (تجريبي)</string>
|
||||
<string name="perf_fastsync_hint">بديل في مساحة المستخدم لبرنامج تشغيل ntsync في Linux، للاختبار. أثناء تفعيله، يستخدمه Proton بدلًا من droiddeck-esync وdroiddeck-fsync. يعمل مع Proton Experimental ARM64 وGE-Proton وproton-cachyos. يُطبَّق في الجلسة التالية.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">بديل في مساحة المستخدم لبرنامج تشغيل ntsync في Linux. أثناء تفعيله، يستخدمه Proton بدلًا من droiddeck-esync وdroiddeck-fsync. يعمل مع Proton Experimental ARM64 وGE-Proton وproton-cachyos. يُطبَّق في الجلسة التالية.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync أولًا</string>
|
||||
<string name="perf_fsync_hint">يشغّل خاصية fsync المدمجة في Proton على ملفات Proton الأصلية، مع توفير futex_waitv في مساحة المستخدم، فلا يحتاج إلى حزمة ويستمر في العمل لحظة تحديث Steam لـ Proton. أثناء تفعيله، تستخدمه الألعاب قبل droiddeck-esync، باستثناء القليل الذي يبقيه Proton معطّلًا لـ fsync. يُطبَّق في الجلسة التالية.</string>
|
||||
@@ -1457,6 +1457,10 @@
|
||||
<string name="theme_icon_blue_detail">خلفية سوداء ونص أبيض، والأزرق لكل عنصر محدَّد أو مُركَّز عليه أو مضغوط.</string>
|
||||
<string name="theme_electric">كحلي كهربائي</string>
|
||||
<string name="theme_electric_detail">أزرق أكثر سطوعًا، على أسطح تميل إلى الكحلي بدلاً من الرمادي.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">ألوان تتدرّج عبر ألوان قوس قزح. تتبع إعدادات الرسوم المتحركة في Android.</string>
|
||||
<string name="theme_rgb_speed">السرعة</string>
|
||||
<string name="theme_rgb_speed_hint">مدى سرعة تغيّر الألوان.</string>
|
||||
<string name="theme_gradient">تدرج لوني</string>
|
||||
<string name="theme_gradient_detail">لونك الأساسي والثانوي، ممزوجان على الأزرار وعناصر التمييز.</string>
|
||||
<string name="theme_gradient_primary">الأساسي</string>
|
||||
@@ -1598,6 +1602,13 @@
|
||||
<string name="fm_conflict_skip">تخطّي</string>
|
||||
<string name="fm_select_this_folder">اختيار هذا المجلد</string>
|
||||
<string name="fm_back">رجوع</string>
|
||||
<string name="fm_exit">خروج</string>
|
||||
<string name="fm_return_to_start">العودة إلى المجلد الأول</string>
|
||||
<string name="fm_start_unavailable">لم يعد المجلد الأول متاحًا</string>
|
||||
<string name="fm_cancel_operation_title">إلغاء العملية؟</string>
|
||||
<string name="fm_cancel_operation_confirmation">سيتم إلغاء العملية. هل أنت متأكد؟</string>
|
||||
<string name="fm_accept">موافق</string>
|
||||
<string name="fm_decline">رفض</string>
|
||||
<string name="fm_drive_not_readable">تم تركيب %1$s لكن تتعذّر قراءته حاليًا</string>
|
||||
<string name="fm_list_view">عرض القائمة</string>
|
||||
<string name="fm_grid_view">عرض الشبكة</string>
|
||||
@@ -2077,6 +2088,23 @@
|
||||
<string name="stores_itch_no_exe">لم يتم العثور على لعبة Windows في التنزيل</string>
|
||||
<string name="stores_itch_extract_failed">تعذر استخراج التنزيل (رمز الخروج %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">لم يستجب itch.io</string>
|
||||
<string name="stores_itch_sort_popular">الأكثر شعبية</string>
|
||||
<string name="stores_itch_sort_new">الأحدث</string>
|
||||
<string name="stores_itch_sort_new_popular">جديد ورائج</string>
|
||||
<string name="stores_itch_price_paid">مدفوع</string>
|
||||
<string name="stores_itch_price_under_5">5 دولارات أو أقل</string>
|
||||
<string name="stores_itch_price_under_15">15 دولارًا أو أقل</string>
|
||||
<string name="stores_itch_sort_top_rated">الأعلى تقييمًا</string>
|
||||
<string name="stores_itch_sort_top_sellers">الأكثر مبيعًا</string>
|
||||
<string name="stores_itch_price_any">أي سعر</string>
|
||||
<string name="stores_itch_price_free">مجاني</string>
|
||||
<string name="stores_itch_price_sale">مخفّض</string>
|
||||
<string name="stores_itch_load_more">تحميل المزيد</string>
|
||||
<string name="stores_itch_platform_any">أي منصة</string>
|
||||
<string name="stores_itch_platform_mobile_web">ويب الجوال</string>
|
||||
<string name="stores_itch_tag_add">إضافة وسم</string>
|
||||
<string name="stores_itch_tag_title">التصفية حسب الوسم</string>
|
||||
<string name="stores_itch_browse_failed">تعذّر تحميل الألعاب من itch.io</string>
|
||||
<string name="stores_itch_archive">أرشيفات %1$s غير مدعومة</string>
|
||||
<string name="stores_itch_download_failed">استجاب itch.io بـ HTTP %1$d</string>
|
||||
<string name="stores_free">مجاني</string>
|
||||
@@ -2231,6 +2259,7 @@
|
||||
<string name="stores_login_close">إغلاق</string>
|
||||
<string name="stores_login_retry">حاوِل مرة أخرى</string>
|
||||
<string name="stores_login_finishing">جارٍ إنهاء تسجيل الدخول…</string>
|
||||
<string name="stores_xbox_sign_in_again">رفضت Microsoft تسجيل الدخول إلى Xbox. سجّل الخروج من Xbox في المتاجر، ثم سجّل الدخول مجددًا، ثم استأنف.</string>
|
||||
<string name="stores_login_error_network">تعذّر تحميل صفحة تسجيل الدخول: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">يرفض هذا المزوّد تسجيل الدخول من صفحة مضمَّنة. سجِّل الدخول باستخدام كلمة مرور المتجر بدلاً من ذلك.</string>
|
||||
<string name="stores_login_error_http">استجابت صفحة تسجيل الدخول بخطأ (HTTP %1$d).</string>
|
||||
|
||||
@@ -536,8 +536,8 @@
|
||||
<string name="perf_sysmem">Turnip: renderizado sysmem</string>
|
||||
<string name="perf_sysmem_hint">Más rápido para el cliente de Steam; en los juegos, el controlador elige entre renderizado por mosaicos o en memoria del sistema en cada pasada. Obligatorio en Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Omitir el asistente xalia de Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (experimental)</string>
|
||||
<string name="perf_fastsync_hint">Un sustituto en espacio de usuario del controlador ntsync de Linux, para pruebas. Mientras está activado, Proton lo usa en lugar de droiddeck-esync y droiddeck-fsync. Funciona con Proton Experimental ARM64, GE-Proton y proton-cachyos. Se aplica en la próxima sesión.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Un sustituto en espacio de usuario del controlador ntsync de Linux. Mientras está activado, Proton lo usa en lugar de droiddeck-esync y droiddeck-fsync. Funciona con Proton Experimental ARM64, GE-Proton y proton-cachyos. Se aplica en la próxima sesión.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync primero</string>
|
||||
<string name="perf_fsync_hint">Usa el fsync propio de Proton con los archivos originales de Proton, con futex_waitv proporcionado en espacio de usuario, así que no necesita paquete y sigue funcionando en cuanto Steam actualiza Proton. Mientras está activado, los juegos lo usan antes que droiddeck-esync, salvo los pocos que Proton mantiene sin fsync. Se aplica en la próxima sesión.</string>
|
||||
@@ -1466,6 +1466,10 @@
|
||||
<string name="theme_icon_blue_detail">Fondo negro, texto blanco y el azul para todo lo seleccionado, enfocado o presionado.</string>
|
||||
<string name="theme_electric">Azul marino eléctrico</string>
|
||||
<string name="theme_electric_detail">Un azul más vivo, sobre superficies que tiran a azul marino en vez de gris.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Colores que recorren el arcoíris. Respeta los ajustes de animación de Android.</string>
|
||||
<string name="theme_rgb_speed">Velocidad</string>
|
||||
<string name="theme_rgb_speed_hint">Qué tan rápido cambian los colores.</string>
|
||||
<string name="theme_gradient">Degradado</string>
|
||||
<string name="theme_gradient_detail">Tus propios colores primario y secundario, combinados en botones y resaltados.</string>
|
||||
<string name="theme_gradient_primary">Primario</string>
|
||||
@@ -1592,6 +1596,13 @@
|
||||
<string name="fm_conflict_skip">Omitir</string>
|
||||
<string name="fm_select_this_folder">Seleccionar esta carpeta</string>
|
||||
<string name="fm_back">Atrás</string>
|
||||
<string name="fm_exit">Salir</string>
|
||||
<string name="fm_return_to_start">Volver a la carpeta inicial</string>
|
||||
<string name="fm_start_unavailable">La carpeta inicial ya no está disponible</string>
|
||||
<string name="fm_cancel_operation_title">¿Cancelar la operación?</string>
|
||||
<string name="fm_cancel_operation_confirmation">La operación se cancelará. ¿Estás seguro?</string>
|
||||
<string name="fm_accept">Aceptar</string>
|
||||
<string name="fm_decline">Rechazar</string>
|
||||
<string name="fm_drive_not_readable">%1$s está montado, pero ahora mismo no se puede leer</string>
|
||||
<string name="fm_list_view">Vista de lista</string>
|
||||
<string name="fm_grid_view">Vista de cuadrícula</string>
|
||||
@@ -2183,6 +2194,7 @@
|
||||
<string name="stores_login_close">Cerrar</string>
|
||||
<string name="stores_login_retry">Reintentar</string>
|
||||
<string name="stores_login_finishing">Terminando de iniciar sesión…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft rechazó el inicio de sesión de Xbox. Cierra sesión de Xbox en Tiendas, vuelve a iniciar sesión y luego reanuda.</string>
|
||||
<string name="stores_login_error_network">No se pudo cargar la página de inicio de sesión: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este proveedor no permite iniciar sesión desde una página integrada. Inicia sesión con la contraseña de la tienda.</string>
|
||||
<string name="stores_login_error_http">La página de inicio de sesión respondió con un error (HTTP %1$d).</string>
|
||||
@@ -2760,6 +2772,23 @@
|
||||
<string name="stores_itch_no_exe">No se encontró un juego de Windows en la descarga</string>
|
||||
<string name="stores_itch_extract_failed">No se pudo extraer la descarga (salida %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io no respondió</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Más recientes</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuevos y populares</string>
|
||||
<string name="stores_itch_price_paid">De pago</string>
|
||||
<string name="stores_itch_price_under_5">$5 o menos</string>
|
||||
<string name="stores_itch_price_under_15">$15 o menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mejor valorados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Más vendidos</string>
|
||||
<string name="stores_itch_price_any">Cualquier precio</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">En oferta</string>
|
||||
<string name="stores_itch_load_more">Cargar más</string>
|
||||
<string name="stores_itch_platform_any">Cualquier plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web móvil</string>
|
||||
<string name="stores_itch_tag_add">Agregar una etiqueta</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por etiqueta</string>
|
||||
<string name="stores_itch_browse_failed">No se pudieron cargar los juegos de itch.io</string>
|
||||
<string name="stores_itch_archive">Los archivos %1$s no son compatibles</string>
|
||||
<string name="stores_itch_download_failed">itch.io respondió HTTP %1$d</string>
|
||||
<string name="glasses_experimental">Cámaras Luma Ultra — Experimental</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: рендиране sysmem</string>
|
||||
<string name="perf_sysmem_hint">По-бързо за клиента на Steam; в игрите драйверът избира за всеки проход между рендериране на плочки и в системната памет. Задължително на Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Пропускане на помощника xalia на Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (експериментално)</string>
|
||||
<string name="perf_fastsync_hint">Заместител на потребителско ниво за драйвера ntsync на Linux, за тестване. Докато е включен, Proton го използва вместо droiddeck-esync и droiddeck-fsync. Работи с Proton Experimental ARM64, GE-Proton и proton-cachyos. Прилага се от следващата сесия.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Заместител на потребителско ниво за драйвера ntsync на Linux. Докато е включен, Proton го използва вместо droiddeck-esync и droiddeck-fsync. Работи с Proton Experimental ARM64, GE-Proton и proton-cachyos. Прилага се от следващата сесия.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync първо</string>
|
||||
<string name="perf_fsync_hint">Стартира собствения fsync на Proton върху оригиналните файлове на Proton, с futex_waitv, подаден от потребителско ниво, затова не изисква пакет и продължава да работи веднага след актуализация на Proton от Steam. Докато е включен, игрите го използват преди droiddeck-esync, освен малкото, които Proton държи извън fsync. Прилага се от следващата сесия.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Черен фон, бял текст, синьото за всичко избрано, на фокус или натиснато.</string>
|
||||
<string name="theme_electric">Яркосиньо</string>
|
||||
<string name="theme_electric_detail">По-яркото синьо, върху повърхности, по-близки до тъмносиньо, вместо сиво.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Цветове, които преминават през дъгата. Следва настройките за анимации на Android.</string>
|
||||
<string name="theme_rgb_speed">Скорост</string>
|
||||
<string name="theme_rgb_speed_hint">Колко бързо се сменят цветовете.</string>
|
||||
<string name="theme_gradient">Градиент</string>
|
||||
<string name="theme_gradient_detail">Вашите основен и вторичен цвят, смесени в бутоните и акцентите.</string>
|
||||
<string name="theme_gradient_primary">Основен</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Пропускане</string>
|
||||
<string name="fm_select_this_folder">Избор на тази папка</string>
|
||||
<string name="fm_back">Назад</string>
|
||||
<string name="fm_exit">Изход</string>
|
||||
<string name="fm_return_to_start">Връщане в началната папка</string>
|
||||
<string name="fm_start_unavailable">Началната папка вече не е достъпна</string>
|
||||
<string name="fm_cancel_operation_title">Отмяна на операцията?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Операцията ще бъде отменена. Сигурни ли сте?</string>
|
||||
<string name="fm_accept">Приемам</string>
|
||||
<string name="fm_decline">Отказвам</string>
|
||||
<string name="fm_drive_not_readable">%1$s е монтирано, но в момента не може да се прочете</string>
|
||||
<string name="fm_list_view">Изглед като списък</string>
|
||||
<string name="fm_grid_view">Изглед като мрежа</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">В изтеглянето не е намерена игра за Windows</string>
|
||||
<string name="stores_itch_extract_failed">Изтеглянето не можа да бъде разархивирано (код %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io не отговори</string>
|
||||
<string name="stores_itch_sort_popular">Популярни</string>
|
||||
<string name="stores_itch_sort_new">Най-нови</string>
|
||||
<string name="stores_itch_sort_new_popular">Нови и популярни</string>
|
||||
<string name="stores_itch_price_paid">Платени</string>
|
||||
<string name="stores_itch_price_under_5">До $5</string>
|
||||
<string name="stores_itch_price_under_15">До $15</string>
|
||||
<string name="stores_itch_sort_top_rated">Най-високо оценени</string>
|
||||
<string name="stores_itch_sort_top_sellers">Най-продавани</string>
|
||||
<string name="stores_itch_price_any">Всякаква цена</string>
|
||||
<string name="stores_itch_price_free">Безплатни</string>
|
||||
<string name="stores_itch_price_sale">С намаление</string>
|
||||
<string name="stores_itch_load_more">Зареди още</string>
|
||||
<string name="stores_itch_platform_any">Всяка платформа</string>
|
||||
<string name="stores_itch_platform_mobile_web">Мобилен уеб</string>
|
||||
<string name="stores_itch_tag_add">Добавяне на таг</string>
|
||||
<string name="stores_itch_tag_title">Филтриране по таг</string>
|
||||
<string name="stores_itch_browse_failed">Игрите от itch.io не можаха да се заредят</string>
|
||||
<string name="stores_itch_archive">Архивите %1$s не се поддържат</string>
|
||||
<string name="stores_itch_download_failed">itch.io отговори HTTP %1$d</string>
|
||||
<string name="stores_free">Безплатна</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Затвори</string>
|
||||
<string name="stores_login_retry">Опитай отново</string>
|
||||
<string name="stores_login_finishing">Завършване на входа…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft отхвърли входа в Xbox. Излезте от Xbox в Магазини, влезте отново и след това продължете.</string>
|
||||
<string name="stores_login_error_network">Страницата за вход не можа да се зареди: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Този доставчик отказва вход от вградена страница. Впиши се с паролата си за магазина.</string>
|
||||
<string name="stores_login_error_http">Страницата за вход отговори с грешка (HTTP %1$d).</string>
|
||||
|
||||
@@ -545,8 +545,8 @@
|
||||
<string name="perf_sysmem">Turnip: vykreslování sysmem</string>
|
||||
<string name="perf_sysmem_hint">Rychlejší pro klienta Steam; ve hrách ovladač pro každý průchod volí dlaždicové vykreslování, nebo vykreslování v systémové paměti. Vyžadováno na Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Vynechat Steamova pomocníka xalia</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (experimentální)</string>
|
||||
<string name="perf_fastsync_hint">Uživatelská náhrada linuxového ovladače ntsync, pro testování. Když je zapnuto, Proton ho používá místo droiddeck-esync a droiddeck-fsync. Funguje s Proton Experimental ARM64, GE-Proton a proton-cachyos. Použije se od příští relace.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Uživatelská náhrada linuxového ovladače ntsync. Když je zapnuto, Proton ho používá místo droiddeck-esync a droiddeck-fsync. Funguje s Proton Experimental ARM64, GE-Proton a proton-cachyos. Použije se od příští relace.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync jako první</string>
|
||||
<string name="perf_fsync_hint">Spouští vlastní fsync Protonu na původních souborech Protonu, s futex_waitv dodaným v uživatelském prostoru, takže nepotřebuje balíček a funguje i hned po aktualizaci Protonu Steamem. Když je zapnuto, hry ho používají před droiddeck-esync, kromě těch pár, které Proton u fsync nechává vypnuté. Použije se od příští relace.</string>
|
||||
@@ -1429,6 +1429,10 @@
|
||||
<string name="theme_icon_blue_detail">Černé pozadí, bílé písmo, modrá pro vše vybrané, zaměřené nebo stisknuté.</string>
|
||||
<string name="theme_electric">Elektrická modř</string>
|
||||
<string name="theme_electric_detail">Jasnější modrá na povrchách, které jsou spíše tmavomodré než šedé.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Barvy, které procházejí celou duhu. Respektuje nastavení animací v Androidu.</string>
|
||||
<string name="theme_rgb_speed">Rychlost</string>
|
||||
<string name="theme_rgb_speed_hint">Jak rychle se barvy střídají.</string>
|
||||
<string name="theme_gradient">Přechod</string>
|
||||
<string name="theme_gradient_detail">Vaše vlastní primární a sekundární barva, prolnuté na tlačítkách a zvýrazněních.</string>
|
||||
<string name="theme_gradient_primary">Primární</string>
|
||||
@@ -1560,6 +1564,13 @@
|
||||
<string name="fm_conflict_skip">Přeskočit</string>
|
||||
<string name="fm_select_this_folder">Vybrat tuto složku</string>
|
||||
<string name="fm_back">Zpět</string>
|
||||
<string name="fm_exit">Ukončit</string>
|
||||
<string name="fm_return_to_start">Zpět do výchozí složky</string>
|
||||
<string name="fm_start_unavailable">Výchozí složka již není dostupná</string>
|
||||
<string name="fm_cancel_operation_title">Zrušit operaci?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Operace bude zrušena. Opravdu chcete pokračovat?</string>
|
||||
<string name="fm_accept">Přijmout</string>
|
||||
<string name="fm_decline">Odmítnout</string>
|
||||
<string name="fm_drive_not_readable">%1$s je připojeno, ale momentálně není čitelné</string>
|
||||
<string name="fm_list_view">Zobrazení seznamu</string>
|
||||
<string name="fm_grid_view">Zobrazení mřížky</string>
|
||||
@@ -2035,6 +2046,23 @@
|
||||
<string name="stores_itch_no_exe">Ve stahování nebyla nalezena hra pro Windows</string>
|
||||
<string name="stores_itch_extract_failed">Stažený soubor nelze rozbalit (kód %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io neodpovědělo</string>
|
||||
<string name="stores_itch_sort_popular">Populární</string>
|
||||
<string name="stores_itch_sort_new">Nejnovější</string>
|
||||
<string name="stores_itch_sort_new_popular">Nové a populární</string>
|
||||
<string name="stores_itch_price_paid">Placené</string>
|
||||
<string name="stores_itch_price_under_5">Do $5</string>
|
||||
<string name="stores_itch_price_under_15">Do $15</string>
|
||||
<string name="stores_itch_sort_top_rated">Nejlépe hodnocené</string>
|
||||
<string name="stores_itch_sort_top_sellers">Nejprodávanější</string>
|
||||
<string name="stores_itch_price_any">Jakákoli cena</string>
|
||||
<string name="stores_itch_price_free">Zdarma</string>
|
||||
<string name="stores_itch_price_sale">Ve slevě</string>
|
||||
<string name="stores_itch_load_more">Načíst další</string>
|
||||
<string name="stores_itch_platform_any">Libovolná platforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilní web</string>
|
||||
<string name="stores_itch_tag_add">Přidat štítek</string>
|
||||
<string name="stores_itch_tag_title">Filtrovat podle štítku</string>
|
||||
<string name="stores_itch_browse_failed">Hry z itch.io se nepodařilo načíst</string>
|
||||
<string name="stores_itch_archive">Archivy %1$s nejsou podporovány</string>
|
||||
<string name="stores_itch_download_failed">itch.io odpovědělo HTTP %1$d</string>
|
||||
<string name="stores_free">Zdarma</string>
|
||||
@@ -2189,6 +2217,7 @@
|
||||
<string name="stores_login_close">Zavřít</string>
|
||||
<string name="stores_login_retry">Zkusit znovu</string>
|
||||
<string name="stores_login_finishing">Dokončování přihlášení…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft odmítl přihlášení k Xboxu. V Obchodech se z Xboxu odhlaste, znovu se přihlaste a pak pokračujte.</string>
|
||||
<string name="stores_login_error_network">Přihlašovací stránku se nepodařilo načíst: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Tento poskytovatel odmítá přihlášení ze vložené stránky. Přihlaste se místo toho heslem k obchodu.</string>
|
||||
<string name="stores_login_error_http">Přihlašovací stránka odpověděla chybou (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem-rendering</string>
|
||||
<string name="perf_sysmem_hint">Hurtigere til Steam-klienten; i spil vælger driveren flise- eller systemhukommelses-rendering for hvert pass. Påkrævet på Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Spring Steams xalia-hjælper over</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (eksperimentel)</string>
|
||||
<string name="perf_fastsync_hint">En stand-in til ntsync-driveren i Linux-kernen, i brugerrum, til test. Mens den er til, bruger Proton den i stedet for droiddeck-esync og droiddeck-fsync. Fungerer med Proton Experimental ARM64, GE-Proton og proton-cachyos. Gælder fra næste session.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">En stand-in til ntsync-driveren i Linux-kernen, i brugerrum. Mens den er til, bruger Proton den i stedet for droiddeck-esync og droiddeck-fsync. Fungerer med Proton Experimental ARM64, GE-Proton og proton-cachyos. Gælder fra næste session.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync først</string>
|
||||
<string name="perf_fsync_hint">Kører Protons egen fsync på de uændrede Proton-filer, med futex_waitv leveret i brugerrum, så det kræver ingen pack og fortsætter med at virke, lige så snart Steam opdaterer Proton. Mens den er til, bruger spil den før droiddeck-esync, undtagen de få, Proton holder uden for fsync. Gælder fra næste session.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Sort baggrund, hvid skrift, blå til alt, der er valgt, fokuseret eller trykket.</string>
|
||||
<string name="theme_electric">Elektrisk marineblå</string>
|
||||
<string name="theme_electric_detail">Den blå er klarere, på overflader der trækker mod marineblåt i stedet for gråt.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Farver, der skifter gennem regnbuen. Følger Androids animationsindstillinger.</string>
|
||||
<string name="theme_rgb_speed">Hastighed</string>
|
||||
<string name="theme_rgb_speed_hint">Hvor hurtigt farverne skifter.</string>
|
||||
<string name="theme_gradient">Gradient</string>
|
||||
<string name="theme_gradient_detail">Dine egne primære og sekundære farver, blandet på knapper og fremhævninger.</string>
|
||||
<string name="theme_gradient_primary">Primær</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Spring over</string>
|
||||
<string name="fm_select_this_folder">Vælg denne mappe</string>
|
||||
<string name="fm_back">Tilbage</string>
|
||||
<string name="fm_exit">Afslut</string>
|
||||
<string name="fm_return_to_start">Tilbage til startmappen</string>
|
||||
<string name="fm_start_unavailable">Startmappen er ikke længere tilgængelig</string>
|
||||
<string name="fm_cancel_operation_title">Annuller handlingen?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Handlingen bliver annulleret. Er du sikker?</string>
|
||||
<string name="fm_accept">Accepter</string>
|
||||
<string name="fm_decline">Afvis</string>
|
||||
<string name="fm_drive_not_readable">%1$s er monteret, men kan ikke læses lige nu</string>
|
||||
<string name="fm_list_view">Listevisning</string>
|
||||
<string name="fm_grid_view">Gittervisning</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">Der blev ikke fundet et Windows-spil i downloaden</string>
|
||||
<string name="stores_itch_extract_failed">Downloaden kunne ikke udpakkes (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io svarede ikke</string>
|
||||
<string name="stores_itch_sort_popular">Populære</string>
|
||||
<string name="stores_itch_sort_new">Seneste</string>
|
||||
<string name="stores_itch_sort_new_popular">Nye og populære</string>
|
||||
<string name="stores_itch_price_paid">Betalt</string>
|
||||
<string name="stores_itch_price_under_5">$5 eller mindre</string>
|
||||
<string name="stores_itch_price_under_15">$15 eller mindre</string>
|
||||
<string name="stores_itch_sort_top_rated">Bedst bedømte</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mest solgte</string>
|
||||
<string name="stores_itch_price_any">Alle priser</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">På tilbud</string>
|
||||
<string name="stores_itch_load_more">Indlæs flere</string>
|
||||
<string name="stores_itch_platform_any">Alle platforme</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilweb</string>
|
||||
<string name="stores_itch_tag_add">Tilføj et tag</string>
|
||||
<string name="stores_itch_tag_title">Filtrer efter tag</string>
|
||||
<string name="stores_itch_browse_failed">Kunne ikke hente spil fra itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s-arkiver understøttes ikke</string>
|
||||
<string name="stores_itch_download_failed">itch.io svarede HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Luk</string>
|
||||
<string name="stores_login_retry">Forsøg igen</string>
|
||||
<string name="stores_login_finishing">Afslutter login…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft afviste Xbox-login. Log ud af Xbox under Butikker, log ind igen, og genoptag derefter.</string>
|
||||
<string name="stores_login_error_network">Loginsiden kunne ikke indlæses: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Denne udbyder afviser login fra en indlejret side. Log i stedet ind med din butikskodeord.</string>
|
||||
<string name="stores_login_error_http">Loginsiden svarede med en fejl (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: Sysmem-Rendering</string>
|
||||
<string name="perf_sysmem_hint">Schneller für den Steam-Client; in Spielen wählt der Treiber pro Durchgang zwischen Kachel- und Systemspeicher-Rendering. Erforderlich bei Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Steams xalia-Helfer überspringen</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (experimentell)</string>
|
||||
<string name="perf_fastsync_hint">Ein Userspace-Ersatz für den Linux-Treiber ntsync, zum Testen. Solange er aktiv ist, nutzt Proton ihn statt droiddeck-esync und droiddeck-fsync. Funktioniert mit Proton Experimental ARM64, GE-Proton und proton-cachyos. Gilt ab der nächsten Sitzung.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Ein Userspace-Ersatz für den Linux-Treiber ntsync. Solange er aktiv ist, nutzt Proton ihn statt droiddeck-esync und droiddeck-fsync. Funktioniert mit Proton Experimental ARM64, GE-Proton und proton-cachyos. Gilt ab der nächsten Sitzung.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync bevorzugen</string>
|
||||
<string name="perf_fsync_hint">Führt Protons eigenes fsync mit den unveränderten Proton-Dateien aus, wobei futex_waitv im Userspace bereitgestellt wird. Es braucht daher kein Pack und funktioniert weiter, sobald Steam Proton aktualisiert. Solange es aktiv ist, nutzen Spiele es vor droiddeck-esync, außer den wenigen, die Proton von fsync fernhält. Gilt ab der nächsten Sitzung.</string>
|
||||
@@ -1393,6 +1393,10 @@
|
||||
<string name="theme_icon_blue_detail">Schwarzer Grund, weiße Schrift, das Blau für alles Ausgewählte, Fokussierte oder Gedrückte.</string>
|
||||
<string name="theme_electric">Elektrisches Marineblau</string>
|
||||
<string name="theme_electric_detail">Das Blau heller, auf Flächen, die eher zu Marineblau als zu Grau tendieren.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Farben, die durch den Regenbogen wechseln. Folgt den Animationseinstellungen von Android.</string>
|
||||
<string name="theme_rgb_speed">Geschwindigkeit</string>
|
||||
<string name="theme_rgb_speed_hint">Wie schnell die Farben wechseln.</string>
|
||||
<string name="theme_gradient">Farbverlauf</string>
|
||||
<string name="theme_gradient_detail">Eigene Primär- und Sekundärfarbe, als Verlauf auf Schaltflächen und Hervorhebungen.</string>
|
||||
<string name="theme_gradient_primary">Primär</string>
|
||||
@@ -1514,6 +1518,13 @@
|
||||
<string name="fm_conflict_skip">Überspringen</string>
|
||||
<string name="fm_select_this_folder">Diesen Ordner auswählen</string>
|
||||
<string name="fm_back">Zurück</string>
|
||||
<string name="fm_exit">Beenden</string>
|
||||
<string name="fm_return_to_start">Zurück zum Startordner</string>
|
||||
<string name="fm_start_unavailable">Startordner ist nicht mehr verfügbar</string>
|
||||
<string name="fm_cancel_operation_title">Vorgang abbrechen?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Der Vorgang wird abgebrochen. Bist du sicher?</string>
|
||||
<string name="fm_accept">Akzeptieren</string>
|
||||
<string name="fm_decline">Ablehnen</string>
|
||||
<string name="fm_drive_not_readable">%1$s ist eingebunden, aber derzeit nicht lesbar</string>
|
||||
<string name="fm_list_view">Listenansicht</string>
|
||||
<string name="fm_grid_view">Rasteransicht</string>
|
||||
@@ -1985,6 +1996,23 @@
|
||||
<string name="stores_itch_no_exe">Im Download wurde kein Windows-Spiel gefunden</string>
|
||||
<string name="stores_itch_extract_failed">Download konnte nicht entpackt werden (Code %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io hat nicht geantwortet</string>
|
||||
<string name="stores_itch_sort_popular">Beliebt</string>
|
||||
<string name="stores_itch_sort_new">Neueste</string>
|
||||
<string name="stores_itch_sort_new_popular">Neu und beliebt</string>
|
||||
<string name="stores_itch_price_paid">Kostenpflichtig</string>
|
||||
<string name="stores_itch_price_under_5">5 $ oder weniger</string>
|
||||
<string name="stores_itch_price_under_15">15 $ oder weniger</string>
|
||||
<string name="stores_itch_sort_top_rated">Bestbewertet</string>
|
||||
<string name="stores_itch_sort_top_sellers">Meistverkauft</string>
|
||||
<string name="stores_itch_price_any">Beliebiger Preis</string>
|
||||
<string name="stores_itch_price_free">Kostenlos</string>
|
||||
<string name="stores_itch_price_sale">Im Angebot</string>
|
||||
<string name="stores_itch_load_more">Mehr laden</string>
|
||||
<string name="stores_itch_platform_any">Beliebige Plattform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobiles Web</string>
|
||||
<string name="stores_itch_tag_add">Tag hinzufügen</string>
|
||||
<string name="stores_itch_tag_title">Nach Tag filtern</string>
|
||||
<string name="stores_itch_browse_failed">Spiele von itch.io konnten nicht geladen werden</string>
|
||||
<string name="stores_itch_archive">%1$s-Archive werden nicht unterstützt</string>
|
||||
<string name="stores_itch_download_failed">itch.io antwortete mit HTTP %1$d</string>
|
||||
<string name="stores_free">Kostenlos</string>
|
||||
@@ -2136,6 +2164,7 @@
|
||||
<string name="stores_login_close">Schließen</string>
|
||||
<string name="stores_login_retry">Erneut versuchen</string>
|
||||
<string name="stores_login_finishing">Anmeldung wird abgeschlossen…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft hat die Xbox-Anmeldung abgelehnt. Melde dich unter Stores von Xbox ab, melde dich erneut an und setze dann fort.</string>
|
||||
<string name="stores_login_error_network">Die Anmeldeseite konnte nicht geladen werden: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Dieser Anbieter lässt keine Anmeldung über eine eingebettete Seite zu. Melde dich stattdessen mit deinem Store-Passwort an.</string>
|
||||
<string name="stores_login_error_http">Die Anmeldeseite antwortete mit einem Fehler (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: απόδοση sysmem</string>
|
||||
<string name="perf_sysmem_hint">Ταχύτερο για το πρόγραμμα-πελάτη Steam· στα παιχνίδια ο οδηγός επιλέγει σε κάθε πέρασμα απόδοση με πλακίδια ή στη μνήμη συστήματος. Απαιτείται σε Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Παράβλεψη του βοηθού xalia του Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (πειραματικό)</string>
|
||||
<string name="perf_fastsync_hint">Ένα υποκατάστατο σε επίπεδο χρήστη για το πρόγραμμα οδήγησης ntsync του Linux, για δοκιμές. Όσο είναι ενεργό, το Proton το χρησιμοποιεί αντί για το droiddeck-esync και το droiddeck-fsync. Λειτουργεί με Proton Experimental ARM64, GE-Proton και proton-cachyos. Εφαρμόζεται στην επόμενη συνεδρία.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Ένα υποκατάστατο σε επίπεδο χρήστη για το πρόγραμμα οδήγησης ntsync του Linux. Όσο είναι ενεργό, το Proton το χρησιμοποιεί αντί για το droiddeck-esync και το droiddeck-fsync. Λειτουργεί με Proton Experimental ARM64, GE-Proton και proton-cachyos. Εφαρμόζεται στην επόμενη συνεδρία.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync πρώτα</string>
|
||||
<string name="perf_fsync_hint">Εκτελεί το δικό του fsync του Proton στα απλά αρχεία Proton, με το futex_waitv παρεχόμενο σε επίπεδο χρήστη, οπότε δεν χρειάζεται πακέτο και συνεχίζει να λειτουργεί τη στιγμή που το Steam ενημερώνει το Proton. Όσο είναι ενεργό, τα παιχνίδια το χρησιμοποιούν πριν από το droiddeck-esync, εκτός από τα λίγα που το Proton κρατά εκτός fsync. Εφαρμόζεται στην επόμενη συνεδρία.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Μαύρο φόντο, λευκά γράμματα, το μπλε για ό,τι είναι επιλεγμένο, εστιασμένο ή πατημένο.</string>
|
||||
<string name="theme_electric">Ηλεκτρικό ναυτικό μπλε</string>
|
||||
<string name="theme_electric_detail">Το μπλε πιο έντονο, σε επιφάνειες που τείνουν προς το ναυτικό μπλε αντί για γκρι.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Χρώματα που διατρέχουν το ουράνιο τόξο. Ακολουθεί τις ρυθμίσεις animation του Android.</string>
|
||||
<string name="theme_rgb_speed">Ταχύτητα</string>
|
||||
<string name="theme_rgb_speed_hint">Πόσο γρήγορα αλλάζουν τα χρώματα.</string>
|
||||
<string name="theme_gradient">Διαβάθμιση</string>
|
||||
<string name="theme_gradient_detail">Δικά σας πρωτεύον και δευτερεύον χρώμα, σε μίξη στα κουμπιά και τις επισημάνσεις.</string>
|
||||
<string name="theme_gradient_primary">Πρωτεύον</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Παράλειψη</string>
|
||||
<string name="fm_select_this_folder">Επιλογή αυτού του φακέλου</string>
|
||||
<string name="fm_back">Πίσω</string>
|
||||
<string name="fm_exit">Έξοδος</string>
|
||||
<string name="fm_return_to_start">Επιστροφή στον αρχικό φάκελο</string>
|
||||
<string name="fm_start_unavailable">Ο αρχικός φάκελος δεν είναι πλέον διαθέσιμος</string>
|
||||
<string name="fm_cancel_operation_title">Ακύρωση ενέργειας;</string>
|
||||
<string name="fm_cancel_operation_confirmation">Η ενέργεια θα ακυρωθεί. Είστε σίγουροι;</string>
|
||||
<string name="fm_accept">Αποδοχή</string>
|
||||
<string name="fm_decline">Απόρριψη</string>
|
||||
<string name="fm_drive_not_readable">Το %1$s είναι προσαρτημένο αλλά δεν είναι αναγνώσιμο αυτή τη στιγμή</string>
|
||||
<string name="fm_list_view">Προβολή λίστας</string>
|
||||
<string name="fm_grid_view">Προβολή πλέγματος</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">Δεν βρέθηκε παιχνίδι Windows στη λήψη</string>
|
||||
<string name="stores_itch_extract_failed">Δεν ήταν δυνατή η αποσυμπίεση της λήψης (κωδικός %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">Το itch.io δεν απάντησε</string>
|
||||
<string name="stores_itch_sort_popular">Δημοφιλή</string>
|
||||
<string name="stores_itch_sort_new">Πιο πρόσφατα</string>
|
||||
<string name="stores_itch_sort_new_popular">Νέα και δημοφιλή</string>
|
||||
<string name="stores_itch_price_paid">Επί πληρωμή</string>
|
||||
<string name="stores_itch_price_under_5">$5 ή λιγότερο</string>
|
||||
<string name="stores_itch_price_under_15">$15 ή λιγότερο</string>
|
||||
<string name="stores_itch_sort_top_rated">Κορυφαία βαθμολογία</string>
|
||||
<string name="stores_itch_sort_top_sellers">Μπεστ σέλερ</string>
|
||||
<string name="stores_itch_price_any">Οποιαδήποτε τιμή</string>
|
||||
<string name="stores_itch_price_free">Δωρεάν</string>
|
||||
<string name="stores_itch_price_sale">Σε προσφορά</string>
|
||||
<string name="stores_itch_load_more">Φόρτωση περισσότερων</string>
|
||||
<string name="stores_itch_platform_any">Οποιαδήποτε πλατφόρμα</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobile web</string>
|
||||
<string name="stores_itch_tag_add">Προσθήκη ετικέτας</string>
|
||||
<string name="stores_itch_tag_title">Φιλτράρισμα ανά ετικέτα</string>
|
||||
<string name="stores_itch_browse_failed">Δεν ήταν δυνατή η φόρτωση παιχνιδιών από το itch.io</string>
|
||||
<string name="stores_itch_archive">Τα αρχεία %1$s δεν υποστηρίζονται</string>
|
||||
<string name="stores_itch_download_failed">Το itch.io απάντησε HTTP %1$d</string>
|
||||
<string name="stores_free">Δωρεάν</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Κλείσιμο</string>
|
||||
<string name="stores_login_retry">Δοκιμάστε ξανά</string>
|
||||
<string name="stores_login_finishing">Ολοκλήρωση σύνδεσης…</string>
|
||||
<string name="stores_xbox_sign_in_again">Η Microsoft απέρριψε τη σύνδεση στο Xbox. Αποσυνδεθείτε από το Xbox στα Καταστήματα, συνδεθείτε ξανά και μετά συνεχίστε.</string>
|
||||
<string name="stores_login_error_network">Δεν ήταν δυνατή η φόρτωση της σελίδας σύνδεσης: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Αυτός ο πάροχος αρνείται να συνδεθεί από μια ενσωματωμένη σελίδα. Συνδεθείτε με τον κωδικό πρόσβασης του καταστήματός σας αντ\' αυτού.</string>
|
||||
<string name="stores_login_error_http">Η σελίδα σύνδεσης απάντησε με σφάλμα (HTTP %1$d).</string>
|
||||
|
||||
@@ -545,8 +545,8 @@
|
||||
<string name="perf_sysmem">Turnip: renderizado sysmem</string>
|
||||
<string name="perf_sysmem_hint">Más rápido para el cliente de Steam; en los juegos, el controlador elige entre renderizado por mosaicos o en memoria del sistema en cada pasada. Obligatorio en Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Omitir el asistente xalia de Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (experimental)</string>
|
||||
<string name="perf_fastsync_hint">Un sustituto en espacio de usuario del controlador ntsync de Linux, para pruebas. Mientras está activado, Proton lo usa en lugar de droiddeck-esync y droiddeck-fsync. Funciona con Proton Experimental ARM64, GE-Proton y proton-cachyos. Se aplica en la próxima sesión.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Un sustituto en espacio de usuario del controlador ntsync de Linux. Mientras está activado, Proton lo usa en lugar de droiddeck-esync y droiddeck-fsync. Funciona con Proton Experimental ARM64, GE-Proton y proton-cachyos. Se aplica en la próxima sesión.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync primero</string>
|
||||
<string name="perf_fsync_hint">Usa el fsync propio de Proton con los archivos originales de Proton, con futex_waitv proporcionado en espacio de usuario, así que no necesita paquete y sigue funcionando en cuanto Steam actualiza Proton. Mientras está activado, los juegos lo usan antes que droiddeck-esync, salvo los pocos que Proton mantiene sin fsync. Se aplica en la próxima sesión.</string>
|
||||
@@ -1417,6 +1417,10 @@
|
||||
<string name="theme_icon_blue_detail">Fondo negro, texto blanco y el azul para todo lo seleccionado, enfocado o pulsado.</string>
|
||||
<string name="theme_electric">Azul marino eléctrico</string>
|
||||
<string name="theme_electric_detail">Un azul más vivo, sobre superficies que tiran a azul marino en vez de gris.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Colores que recorren el arcoíris. Respeta los ajustes de animación de Android.</string>
|
||||
<string name="theme_rgb_speed">Velocidad</string>
|
||||
<string name="theme_rgb_speed_hint">Con qué rapidez cambian los colores.</string>
|
||||
<string name="theme_gradient">Degradado</string>
|
||||
<string name="theme_gradient_detail">Tus propios colores primario y secundario, combinados en botones y resaltados.</string>
|
||||
<string name="theme_gradient_primary">Primario</string>
|
||||
@@ -1543,6 +1547,13 @@
|
||||
<string name="fm_conflict_skip">Omitir</string>
|
||||
<string name="fm_select_this_folder">Seleccionar esta carpeta</string>
|
||||
<string name="fm_back">Atrás</string>
|
||||
<string name="fm_exit">Salir</string>
|
||||
<string name="fm_return_to_start">Volver a la carpeta inicial</string>
|
||||
<string name="fm_start_unavailable">La carpeta inicial ya no está disponible</string>
|
||||
<string name="fm_cancel_operation_title">¿Cancelar la operación?</string>
|
||||
<string name="fm_cancel_operation_confirmation">La operación se cancelará. ¿Estás seguro?</string>
|
||||
<string name="fm_accept">Aceptar</string>
|
||||
<string name="fm_decline">Rechazar</string>
|
||||
<string name="fm_drive_not_readable">%1$s está montado, pero ahora mismo no se puede leer</string>
|
||||
<string name="fm_list_view">Vista de lista</string>
|
||||
<string name="fm_grid_view">Vista de cuadrícula</string>
|
||||
@@ -2016,6 +2027,23 @@
|
||||
<string name="stores_itch_no_exe">No se ha encontrado un juego de Windows en la descarga</string>
|
||||
<string name="stores_itch_extract_failed">No se ha podido extraer la descarga (código %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io no respondió</string>
|
||||
<string name="stores_itch_sort_popular">Populares</string>
|
||||
<string name="stores_itch_sort_new">Más recientes</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuevos y populares</string>
|
||||
<string name="stores_itch_price_paid">De pago</string>
|
||||
<string name="stores_itch_price_under_5">5 $ o menos</string>
|
||||
<string name="stores_itch_price_under_15">15 $ o menos</string>
|
||||
<string name="stores_itch_sort_top_rated">Mejor valorados</string>
|
||||
<string name="stores_itch_sort_top_sellers">Más vendidos</string>
|
||||
<string name="stores_itch_price_any">Cualquier precio</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">En oferta</string>
|
||||
<string name="stores_itch_load_more">Cargar más</string>
|
||||
<string name="stores_itch_platform_any">Cualquier plataforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web móvil</string>
|
||||
<string name="stores_itch_tag_add">Añadir una etiqueta</string>
|
||||
<string name="stores_itch_tag_title">Filtrar por etiqueta</string>
|
||||
<string name="stores_itch_browse_failed">No se pudieron cargar los juegos de itch.io</string>
|
||||
<string name="stores_itch_archive">Los archivos %1$s no son compatibles</string>
|
||||
<string name="stores_itch_download_failed">itch.io respondió HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2167,6 +2195,7 @@
|
||||
<string name="stores_login_close">Cerrar</string>
|
||||
<string name="stores_login_retry">Reintentar</string>
|
||||
<string name="stores_login_finishing">Terminando de iniciar sesión…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ha rechazado el inicio de sesión de Xbox. Cierra sesión de Xbox en Tiendas, vuelve a iniciar sesión y reanuda.</string>
|
||||
<string name="stores_login_error_network">No se pudo cargar la página de inicio de sesión: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Este proveedor no permite iniciar sesión desde una página integrada. Inicia sesión con la contraseña de la tienda.</string>
|
||||
<string name="stores_login_error_http">La página de inicio de sesión respondió con un error (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem-renderöinti</string>
|
||||
<string name="perf_sysmem_hint">Nopeampi Steam-asiakasohjelmalle; peleissä ajuri valitsee jokaiselle vaiheelle ruuduittaisen tai järjestelmämuistiin tehtävän renderöinnin. Pakollinen Adreno 710/720/722:lla.</string>
|
||||
<string name="perf_xalia">Ohita Steamin xalia-avustaja</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (kokeellinen)</string>
|
||||
<string name="perf_fastsync_hint">Käyttäjätilainen korvike Linuxin ntsync-ajurille, testausta varten. Kun se on päällä, Proton käyttää sitä droiddeck-esyncin ja droiddeck-fsyncin sijaan. Toimii Proton Experimental ARM64:n, GE-Protonin ja proton-cachyosin kanssa. Tulee voimaan seuraavassa istunnossa.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Käyttäjätilainen korvike Linuxin ntsync-ajurille. Kun se on päällä, Proton käyttää sitä droiddeck-esyncin ja droiddeck-fsyncin sijaan. Toimii Proton Experimental ARM64:n, GE-Protonin ja proton-cachyosin kanssa. Tulee voimaan seuraavassa istunnossa.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync etusijalle</string>
|
||||
<string name="perf_fsync_hint">Käynnistää Protonin omaa fsynciä vakiotiedostoilla, futex_waitv tarjottuna käyttäjätilassa, niin se ei tarvitse pakettia ja toimii edelleen heti kun Steam päivittää Protonin. Kun se on päällä, pelit käyttävät sitä droiddeck-esyncin edellä, paitsi harvat, jotka Proton pitää pois fsyncistä. Tulee voimaan seuraavassa istunnossa.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Musta pohja, valkoinen teksti, sininen kaikessa valitussa, kohdistetussa tai painetussa.</string>
|
||||
<string name="theme_electric">Sähköinen laivastonsininen</string>
|
||||
<string name="theme_electric_detail">Sininen kirkkaampana pinnoilla, jotka taittuvat harmaan sijaan laivastonsiniseen.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Värit, jotka kiertävät sateenkaaren läpi. Noudattaa Androidin animaatioasetuksia.</string>
|
||||
<string name="theme_rgb_speed">Nopeus</string>
|
||||
<string name="theme_rgb_speed_hint">Kuinka nopeasti värit vaihtuvat.</string>
|
||||
<string name="theme_gradient">Liukuväri</string>
|
||||
<string name="theme_gradient_detail">Omat ensisijainen ja toissijainen värisi, sulautettuina painikkeisiin ja korostuksiin.</string>
|
||||
<string name="theme_gradient_primary">Ensisijainen</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Ohita</string>
|
||||
<string name="fm_select_this_folder">Valitse tämä kansio</string>
|
||||
<string name="fm_back">Takaisin</string>
|
||||
<string name="fm_exit">Poistu</string>
|
||||
<string name="fm_return_to_start">Palaa aloituskansioon</string>
|
||||
<string name="fm_start_unavailable">Aloituskansio ei ole enää käytettävissä</string>
|
||||
<string name="fm_cancel_operation_title">Peruutetaanko toiminto?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Toiminto peruutetaan. Oletko varma?</string>
|
||||
<string name="fm_accept">Hyväksy</string>
|
||||
<string name="fm_decline">Hylkää</string>
|
||||
<string name="fm_drive_not_readable">%1$s on liitetty, mutta ei ole luettavissa juuri nyt</string>
|
||||
<string name="fm_list_view">Luettelonäkymä</string>
|
||||
<string name="fm_grid_view">Ruudukkonäkymä</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">Latauksesta ei löytynyt Windows-peliä</string>
|
||||
<string name="stores_itch_extract_failed">Latausta ei voitu purkaa (koodi %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io ei vastannut</string>
|
||||
<string name="stores_itch_sort_popular">Suositut</string>
|
||||
<string name="stores_itch_sort_new">Uusimmat</string>
|
||||
<string name="stores_itch_sort_new_popular">Uudet ja suositut</string>
|
||||
<string name="stores_itch_price_paid">Maksulliset</string>
|
||||
<string name="stores_itch_price_under_5">Enintään 5 $</string>
|
||||
<string name="stores_itch_price_under_15">Enintään 15 $</string>
|
||||
<string name="stores_itch_sort_top_rated">Parhaiten arvioidut</string>
|
||||
<string name="stores_itch_sort_top_sellers">Myydyimmät</string>
|
||||
<string name="stores_itch_price_any">Mikä tahansa hinta</string>
|
||||
<string name="stores_itch_price_free">Ilmaiset</string>
|
||||
<string name="stores_itch_price_sale">Alennuksessa</string>
|
||||
<string name="stores_itch_load_more">Lataa lisää</string>
|
||||
<string name="stores_itch_platform_any">Mikä tahansa alusta</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobiiliweb</string>
|
||||
<string name="stores_itch_tag_add">Lisää tunniste</string>
|
||||
<string name="stores_itch_tag_title">Suodata tunnisteella</string>
|
||||
<string name="stores_itch_browse_failed">Pelien lataaminen itch.io:sta epäonnistui</string>
|
||||
<string name="stores_itch_archive">%1$s-arkistot eivät ole tuettuja</string>
|
||||
<string name="stores_itch_download_failed">itch.io vastasi HTTP %1$d</string>
|
||||
<string name="stores_free">Ilmainen</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Sulje</string>
|
||||
<string name="stores_login_retry">Yritä uudelleen</string>
|
||||
<string name="stores_login_finishing">Viimeistellään kirjautumista…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft hylkäsi Xbox-kirjautumisen. Kirjaudu ulos Xboxista Kaupoissa, kirjaudu uudelleen sisään ja jatka sitten.</string>
|
||||
<string name="stores_login_error_network">Kirjautumissivua ei voitu latata: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Tämä palveluntarjoaja ei salli kirjautumista upotetulta sivulta. Kirjaudu sisään kaupan salasanalla sen sijaan.</string>
|
||||
<string name="stores_login_error_http">Kirjautumissivu vastasi virheellä (HTTP %1$d).</string>
|
||||
|
||||
@@ -545,8 +545,8 @@
|
||||
<string name="perf_sysmem">Turnip : rendu sysmem</string>
|
||||
<string name="perf_sysmem_hint">Le client Steam sera plus rapide ; en jeu, le pilote choisit à chaque passe entre rendu par tuiles et rendu en mémoire système. Requis pour Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Ignorer l\'assistant xalia de Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (expérimental)</string>
|
||||
<string name="perf_fastsync_hint">Un substitut en espace utilisateur du pilote Linux ntsync, pour les tests. Lorsqu\'il est activé, Proton l\'utilise à la place de droiddeck-esync et de droiddeck-fsync. Fonctionne avec Proton Experimental ARM64, GE-Proton et proton-cachyos. Prendra effet à la prochaine session.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Un substitut en espace utilisateur du pilote Linux ntsync. Lorsqu\'il est activé, Proton l\'utilise à la place de droiddeck-esync et de droiddeck-fsync. Fonctionne avec Proton Experimental ARM64, GE-Proton et proton-cachyos. Prendra effet à la prochaine session.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync en priorité</string>
|
||||
<string name="perf_fsync_hint">Exécute le fsync propre à Proton sur les fichiers Proton d\'origine, avec futex_waitv fourni en espace utilisateur : aucun pack n\'est nécessaire et il continue de fonctionner dès que Steam met à jour Proton. Lorsqu\'il est activé, les jeux l\'utilisent avant droiddeck-esync, sauf les quelques-uns que Proton exclut de fsync. Prendra effet à la prochaine session.</string>
|
||||
@@ -1417,6 +1417,10 @@
|
||||
<string name="theme_icon_blue_detail">Fond noir, texte blanc, et le bleu pour tout élément sélectionné, ciblé ou pressé.</string>
|
||||
<string name="theme_electric">Marine électrique</string>
|
||||
<string name="theme_electric_detail">Un bleu plus vif, sur des surfaces qui tirent vers le marine plutôt que vers le gris.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Des couleurs qui parcourent l\'arc-en-ciel. Respecte les réglages d\'animation d\'Android.</string>
|
||||
<string name="theme_rgb_speed">Vitesse</string>
|
||||
<string name="theme_rgb_speed_hint">La vitesse de défilement des couleurs.</string>
|
||||
<string name="theme_gradient">Dégradé</string>
|
||||
<string name="theme_gradient_detail">Vos propres couleurs primaire et secondaire, fondues sur les boutons et les éléments en surbrillance.</string>
|
||||
<string name="theme_gradient_primary">Primaire</string>
|
||||
@@ -1543,6 +1547,13 @@
|
||||
<string name="fm_conflict_skip">Ignorer</string>
|
||||
<string name="fm_select_this_folder">Sélectionner ce dossier</string>
|
||||
<string name="fm_back">Retour</string>
|
||||
<string name="fm_exit">Quitter</string>
|
||||
<string name="fm_return_to_start">Revenir au dossier de départ</string>
|
||||
<string name="fm_start_unavailable">Le dossier de départ est indisponible</string>
|
||||
<string name="fm_cancel_operation_title">Annuler l’opération ?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Cette opération sera annulée. Confirmez-vous ?</string>
|
||||
<string name="fm_accept">Accepter</string>
|
||||
<string name="fm_decline">Refuser</string>
|
||||
<string name="fm_drive_not_readable">%1$s est monté, mais illisible pour le moment</string>
|
||||
<string name="fm_list_view">Vue en liste</string>
|
||||
<string name="fm_grid_view">Vue en grille</string>
|
||||
@@ -2016,6 +2027,23 @@
|
||||
<string name="stores_itch_no_exe">Aucun jeu Windows trouvé dans le téléchargement</string>
|
||||
<string name="stores_itch_extract_failed">Impossible d\'extraire le téléchargement (code %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io n\'a pas répondu</string>
|
||||
<string name="stores_itch_sort_popular">Populaires</string>
|
||||
<string name="stores_itch_sort_new">Plus récents</string>
|
||||
<string name="stores_itch_sort_new_popular">Nouveautés populaires</string>
|
||||
<string name="stores_itch_price_paid">Payants</string>
|
||||
<string name="stores_itch_price_under_5">5 $ ou moins</string>
|
||||
<string name="stores_itch_price_under_15">15 $ ou moins</string>
|
||||
<string name="stores_itch_sort_top_rated">Les mieux notés</string>
|
||||
<string name="stores_itch_sort_top_sellers">Meilleures ventes</string>
|
||||
<string name="stores_itch_price_any">Tous les prix</string>
|
||||
<string name="stores_itch_price_free">Gratuits</string>
|
||||
<string name="stores_itch_price_sale">En promotion</string>
|
||||
<string name="stores_itch_load_more">Charger plus</string>
|
||||
<string name="stores_itch_platform_any">Toute plateforme</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobile</string>
|
||||
<string name="stores_itch_tag_add">Ajouter un tag</string>
|
||||
<string name="stores_itch_tag_title">Filtrer par tag</string>
|
||||
<string name="stores_itch_browse_failed">Impossible de charger les jeux d\'itch.io</string>
|
||||
<string name="stores_itch_archive">Les archives %1$s ne sont pas prises en charge</string>
|
||||
<string name="stores_itch_download_failed">itch.io a répondu HTTP %1$d</string>
|
||||
<string name="stores_free">Gratuit</string>
|
||||
@@ -2167,6 +2195,7 @@
|
||||
<string name="stores_login_close">Fermer</string>
|
||||
<string name="stores_login_retry">Réessayer</string>
|
||||
<string name="stores_login_finishing">Finalisation de la connexion…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft a refusé la connexion Xbox. Déconnectez-vous de Xbox dans Boutiques, reconnectez-vous, puis reprenez.</string>
|
||||
<string name="stores_login_error_network">Impossible de charger la page de connexion : %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Ce fournisseur refuse la connexion depuis une page intégrée. Connectez-vous plutôt avec le mot de passe de la boutique.</string>
|
||||
<string name="stores_login_error_http">La page de connexion a renvoyé une erreur (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem रेंडरिंग</string>
|
||||
<string name="perf_sysmem_hint">Steam क्लाइंट के लिए तेज़; गेम में ड्राइवर हर पास के लिए टाइल या सिस्टम मेमोरी रेंडरिंग चुनता है। Adreno 710/720/722 पर ज़रूरी।</string>
|
||||
<string name="perf_xalia">Steam के xalia हेल्पर को छोड़ें</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (एक्सपेरिमेंटल)</string>
|
||||
<string name="perf_fastsync_hint">जांच के लिए Linux ntsync ड्राइवर की यूज़रस्पेस जगह लेने वाली चीज़। चालू रहते हुए, Proton इसे droiddeck-esync और droiddeck-fsync के बदले इस्तेमाल करता है। यह Proton Experimental ARM64, GE-Proton और proton-cachyos के साथ काम करता है। अगले सेशन से लागू होता है।</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Linux ntsync ड्राइवर की यूज़रस्पेस जगह लेने वाली चीज़। चालू रहते हुए, Proton इसे droiddeck-esync और droiddeck-fsync के बदले इस्तेमाल करता है। यह Proton Experimental ARM64, GE-Proton और proton-cachyos के साथ काम करता है। अगले सेशन से लागू होता है।</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync पहले</string>
|
||||
<string name="perf_fsync_hint">स्टॉक Proton फ़ाइलों पर Proton का अपना fsync चलाता है, futex_waitv यूज़रस्पेस में दिया जाता है, इसलिए इसे किसी पैक की ज़रूरत नहीं और Steam के Proton अपडेट करते ही यह काम करता रहता है। चालू रहते हुए, गेम इसे droiddeck-esync से पहले इस्तेमाल करते हैं, सिवाय उन कुछ के जिन्हें Proton fsync से दूर रखता है। अगले सेशन से लागू होता है।</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">काली ज़मीन, सफ़ेद टाइप, चुने, फ़ोकस या दबाए गए हर चीज़ के लिए ब्लू रंग।</string>
|
||||
<string name="theme_electric">इलेक्ट्रिक नेवी</string>
|
||||
<string name="theme_electric_detail">ब्लू रंग ज़्यादा चमकीला, उन सतहों पर जो ग्रे के बजाय नेवी की ओर झुकती हैं।</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">इंद्रधनुष के रंगों में बदलते रंग। Android की एनिमेशन सेटिंग का पालन करती है।</string>
|
||||
<string name="theme_rgb_speed">गति</string>
|
||||
<string name="theme_rgb_speed_hint">रंग कितनी तेज़ी से बदलें।</string>
|
||||
<string name="theme_gradient">ग्रेडिएंट</string>
|
||||
<string name="theme_gradient_detail">आपके अपने प्राथमिक और द्वितीयक रंग, बटनों और हाइलाइट पर मिश्रित।</string>
|
||||
<string name="theme_gradient_primary">प्राथमिक</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">छोड़ें</string>
|
||||
<string name="fm_select_this_folder">यह फ़ोल्डर चुनें</string>
|
||||
<string name="fm_back">बैक</string>
|
||||
<string name="fm_exit">बाहर निकलें</string>
|
||||
<string name="fm_return_to_start">शुरुआती फ़ोल्डर पर लौटें</string>
|
||||
<string name="fm_start_unavailable">शुरुआती फ़ोल्डर अब उपलब्ध नहीं है</string>
|
||||
<string name="fm_cancel_operation_title">कार्रवाई रद्द करें?</string>
|
||||
<string name="fm_cancel_operation_confirmation">कार्रवाई रद्द कर दी जाएगी। क्या आप सुनिश्चित हैं?</string>
|
||||
<string name="fm_accept">स्वीकार करें</string>
|
||||
<string name="fm_decline">अस्वीकार करें</string>
|
||||
<string name="fm_drive_not_readable">%1$s माउंट है लेकिन अभी पढ़ा नहीं जा सकता</string>
|
||||
<string name="fm_list_view">लिस्ट व्यू</string>
|
||||
<string name="fm_grid_view">ग्रिड व्यू</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">डाउनलोड में कोई Windows गेम नहीं मिला</string>
|
||||
<string name="stores_itch_extract_failed">डाउनलोड एक्सट्रैक्ट नहीं हो सका (कोड %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io ने जवाब नहीं दिया</string>
|
||||
<string name="stores_itch_sort_popular">लोकप्रिय</string>
|
||||
<string name="stores_itch_sort_new">सबसे हाल के</string>
|
||||
<string name="stores_itch_sort_new_popular">नए और लोकप्रिय</string>
|
||||
<string name="stores_itch_price_paid">सशुल्क</string>
|
||||
<string name="stores_itch_price_under_5">$5 या कम</string>
|
||||
<string name="stores_itch_price_under_15">$15 या कम</string>
|
||||
<string name="stores_itch_sort_top_rated">सबसे ऊँची रेटिंग</string>
|
||||
<string name="stores_itch_sort_top_sellers">सबसे ज़्यादा बिकने वाले</string>
|
||||
<string name="stores_itch_price_any">कोई भी कीमत</string>
|
||||
<string name="stores_itch_price_free">मुफ़्त</string>
|
||||
<string name="stores_itch_price_sale">सेल में</string>
|
||||
<string name="stores_itch_load_more">और लोड करें</string>
|
||||
<string name="stores_itch_platform_any">कोई भी प्लेटफ़ॉर्म</string>
|
||||
<string name="stores_itch_platform_mobile_web">मोबाइल वेब</string>
|
||||
<string name="stores_itch_tag_add">टैग जोड़ें</string>
|
||||
<string name="stores_itch_tag_title">टैग के अनुसार फ़िल्टर करें</string>
|
||||
<string name="stores_itch_browse_failed">itch.io से गेम लोड नहीं हो सके</string>
|
||||
<string name="stores_itch_archive">%1$s आर्काइव समर्थित नहीं हैं</string>
|
||||
<string name="stores_itch_download_failed">itch.io ने HTTP %1$d लौटाया</string>
|
||||
<string name="stores_free">फ़्री</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">बंद करें</string>
|
||||
<string name="stores_login_retry">फिर कोशिश करें</string>
|
||||
<string name="stores_login_finishing">साइन-इन पूरा हो रहा है…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ने Xbox साइन-इन अस्वीकार कर दिया। स्टोर्स में Xbox से साइन आउट करें, फिर से साइन इन करें, फिर जारी रखें।</string>
|
||||
<string name="stores_login_error_network">साइन-इन पेज लोड नहीं हो सका: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">यह प्रोवाइडर एम्बेडेड पेज से साइन इन करने से मना करता है। इसके बदले अपने स्टोर पासवर्ड से साइन इन करें।</string>
|
||||
<string name="stores_login_error_http">साइन-इन पेज ने एक एरर के साथ जवाब दिया (HTTP %1$d)।</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem renderelés</string>
|
||||
<string name="perf_sysmem_hint">Gyorsabb a Steam kliensnek; játékokban a meghajtó menetenként választ a csempés és a rendszermemóriás renderelés között. Adreno 710/720/722-n szükséges.</string>
|
||||
<string name="perf_xalia">A Steam xalia segítőjének kihagyása</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (kísérleti)</string>
|
||||
<string name="perf_fastsync_hint">A Linux ntsync illesztőprogram felhasználói szintű helyettesítője, teszteléshez. Amíg be van kapcsolva, a Proton ezt használja a droiddeck-esync és a droiddeck-fsync helyett. A Proton Experimental ARM64-gyel, a GE-Protonnal és a proton-cachyosszal működik. A következő munkamenettől érvényes.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">A Linux ntsync illesztőprogram felhasználói szintű helyettesítője. Amíg be van kapcsolva, a Proton ezt használja a droiddeck-esync és a droiddeck-fsync helyett. A Proton Experimental ARM64-gyel, a GE-Protonnal és a proton-cachyosszal működik. A következő munkamenettől érvényes.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync előre</string>
|
||||
<string name="perf_fsync_hint">A Proton saját fsyncjét futtatja az eredeti Proton-fájlokon, felhasználói szinten biztosított futex_waitv-vel, így nincs szükség csomagra, és azonnal működik, amint a Steam frissíti a Protont. Amíg be van kapcsolva, a játékok ezt használják a droiddeck-esync előtt, kivéve azt a néhányat, amelyet a Proton kizár az fsyncből. A következő munkamenettől érvényes.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Fekete alap, fehér betűk, a kék minden kijelölt, fókuszált vagy lenyomott elemhez.</string>
|
||||
<string name="theme_electric">Elektromos tengerészkék</string>
|
||||
<string name="theme_electric_detail">Fényesebb kék, szürke helyett tengerészkék felületeken.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">A szivárvány színein végigfutó színek. Követi az Android animációs beállításait.</string>
|
||||
<string name="theme_rgb_speed">Sebesség</string>
|
||||
<string name="theme_rgb_speed_hint">Milyen gyorsan váltanak a színek.</string>
|
||||
<string name="theme_gradient">Színátmenet</string>
|
||||
<string name="theme_gradient_detail">Saját elsődleges és másodlagos színed, átmenettel a gombokon és a kiemeléseken.</string>
|
||||
<string name="theme_gradient_primary">Elsődleges</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Kihagyás</string>
|
||||
<string name="fm_select_this_folder">Ennek a mappának a kiválasztása</string>
|
||||
<string name="fm_back">Vissza</string>
|
||||
<string name="fm_exit">Kilépés</string>
|
||||
<string name="fm_return_to_start">Vissza a kezdőmappába</string>
|
||||
<string name="fm_start_unavailable">A kezdőmappa már nem érhető el</string>
|
||||
<string name="fm_cancel_operation_title">Művelet megszakítása?</string>
|
||||
<string name="fm_cancel_operation_confirmation">A művelet megszakad. Biztos benne?</string>
|
||||
<string name="fm_accept">Elfogadom</string>
|
||||
<string name="fm_decline">Elutasítom</string>
|
||||
<string name="fm_drive_not_readable">A %1$s csatolva van, de jelenleg nem olvasható</string>
|
||||
<string name="fm_list_view">Listanézet</string>
|
||||
<string name="fm_grid_view">Rácsnézet</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">A letöltésben nem található Windows-játék</string>
|
||||
<string name="stores_itch_extract_failed">A letöltés nem bontható ki (kód: %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">Az itch.io nem válaszolt</string>
|
||||
<string name="stores_itch_sort_popular">Népszerű</string>
|
||||
<string name="stores_itch_sort_new">Legfrissebb</string>
|
||||
<string name="stores_itch_sort_new_popular">Új és népszerű</string>
|
||||
<string name="stores_itch_price_paid">Fizetős</string>
|
||||
<string name="stores_itch_price_under_5">Legfeljebb 5 $</string>
|
||||
<string name="stores_itch_price_under_15">Legfeljebb 15 $</string>
|
||||
<string name="stores_itch_sort_top_rated">Legjobbra értékelt</string>
|
||||
<string name="stores_itch_sort_top_sellers">Legkelendőbb</string>
|
||||
<string name="stores_itch_price_any">Bármilyen ár</string>
|
||||
<string name="stores_itch_price_free">Ingyenes</string>
|
||||
<string name="stores_itch_price_sale">Akciós</string>
|
||||
<string name="stores_itch_load_more">Továbbiak betöltése</string>
|
||||
<string name="stores_itch_platform_any">Bármely platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Mobilweb</string>
|
||||
<string name="stores_itch_tag_add">Címke hozzáadása</string>
|
||||
<string name="stores_itch_tag_title">Szűrés címke szerint</string>
|
||||
<string name="stores_itch_browse_failed">Nem sikerült betölteni a játékokat az itch.io-ról</string>
|
||||
<string name="stores_itch_archive">A(z) %1$s archívumok nem támogatottak</string>
|
||||
<string name="stores_itch_download_failed">Az itch.io HTTP %1$d választ adott</string>
|
||||
<string name="stores_free">Ingyenes</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Bezárás</string>
|
||||
<string name="stores_login_retry">Próbálja újra</string>
|
||||
<string name="stores_login_finishing">A bejelentkezés befejezése…</string>
|
||||
<string name="stores_xbox_sign_in_again">A Microsoft elutasította az Xbox-bejelentkezést. Az Áruházakban jelentkezz ki az Xboxból, jelentkezz be újra, majd folytasd.</string>
|
||||
<string name="stores_login_error_network">Nem sikerült betölteni a bejelentkezési oldalt: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Ez a szolgáltató nem engedi a bejelentkezést egy beágyazott oldalról. Jelentkezzen be helyette az áruház jelszavával.</string>
|
||||
<string name="stores_login_error_http">A bejelentkezési oldal hibával válaszolt (HTTP %1$d).</string>
|
||||
|
||||
@@ -539,8 +539,8 @@
|
||||
<string name="perf_sysmem">Turnip: rendering sysmem</string>
|
||||
<string name="perf_sysmem_hint">Lebih cepat untuk klien Steam; di gim, driver memilih rendering ubin atau memori sistem untuk setiap pass. Diperlukan pada Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Lewati bantuan xalia milik Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (eksperimental)</string>
|
||||
<string name="perf_fastsync_hint">Pengganti userspace untuk driver ntsync Linux, untuk pengujian. Saat aktif, Proton menggunakannya sebagai pengganti droiddeck-esync dan droiddeck-fsync. Berfungsi dengan Proton Experimental ARM64, GE-Proton, dan proton-cachyos. Berlaku pada sesi berikutnya.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Pengganti userspace untuk driver ntsync Linux. Saat aktif, Proton menggunakannya sebagai pengganti droiddeck-esync dan droiddeck-fsync. Berfungsi dengan Proton Experimental ARM64, GE-Proton, dan proton-cachyos. Berlaku pada sesi berikutnya.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync lebih dulu</string>
|
||||
<string name="perf_fsync_hint">Menjalankan fsync milik Proton sendiri pada file Proton standar, dengan futex_waitv yang disediakan di userspace, sehingga tidak memerlukan paket dan tetap berfungsi begitu Steam memperbarui Proton. Saat aktif, gim menggunakannya sebelum droiddeck-esync, kecuali beberapa gim yang oleh Proton dijaga tetap di luar fsync. Berlaku pada sesi berikutnya.</string>
|
||||
@@ -1387,6 +1387,10 @@
|
||||
<string name="theme_icon_blue_detail">Dasar hitam, tipe putih, biru untuk semua yang dipilih, difokuskan, atau ditekan.</string>
|
||||
<string name="theme_electric">Navy elektrik</string>
|
||||
<string name="theme_electric_detail">Biru yang lebih cerah, pada permukaan yang condong ke navy, bukan abu-abu.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Warna yang berganti menyusuri pelangi. Mengikuti pengaturan animasi Android.</string>
|
||||
<string name="theme_rgb_speed">Kecepatan</string>
|
||||
<string name="theme_rgb_speed_hint">Seberapa cepat warna berganti.</string>
|
||||
<string name="theme_gradient">Gradasi</string>
|
||||
<string name="theme_gradient_detail">Warna primer dan sekunder pilihan Anda, dipadukan pada tombol dan sorotan.</string>
|
||||
<string name="theme_gradient_primary">Primer</string>
|
||||
@@ -1503,6 +1507,13 @@
|
||||
<string name="fm_conflict_skip">Lewati</string>
|
||||
<string name="fm_select_this_folder">Pilih folder ini</string>
|
||||
<string name="fm_back">Kembali</string>
|
||||
<string name="fm_exit">Keluar</string>
|
||||
<string name="fm_return_to_start">Kembali ke folder awal</string>
|
||||
<string name="fm_start_unavailable">Folder awal tidak lagi tersedia</string>
|
||||
<string name="fm_cancel_operation_title">Batalkan operasi?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Operasi akan dibatalkan. Anda yakin?</string>
|
||||
<string name="fm_accept">Terima</string>
|
||||
<string name="fm_decline">Tolak</string>
|
||||
<string name="fm_drive_not_readable">%1$s terpasang tetapi tidak dapat dibaca saat ini</string>
|
||||
<string name="fm_list_view">Tampilan daftar</string>
|
||||
<string name="fm_grid_view">Tampilan kisi</string>
|
||||
@@ -1972,6 +1983,23 @@
|
||||
<string name="stores_itch_no_exe">Tidak ada game Windows di unduhan</string>
|
||||
<string name="stores_itch_extract_failed">Tidak dapat mengekstrak unduhan (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io tidak menjawab</string>
|
||||
<string name="stores_itch_sort_popular">Populer</string>
|
||||
<string name="stores_itch_sort_new">Terbaru</string>
|
||||
<string name="stores_itch_sort_new_popular">Baru dan populer</string>
|
||||
<string name="stores_itch_price_paid">Berbayar</string>
|
||||
<string name="stores_itch_price_under_5">$5 atau kurang</string>
|
||||
<string name="stores_itch_price_under_15">$15 atau kurang</string>
|
||||
<string name="stores_itch_sort_top_rated">Rating tertinggi</string>
|
||||
<string name="stores_itch_sort_top_sellers">Terlaris</string>
|
||||
<string name="stores_itch_price_any">Harga apa saja</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">Diskon</string>
|
||||
<string name="stores_itch_load_more">Muat lebih banyak</string>
|
||||
<string name="stores_itch_platform_any">Platform apa saja</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web seluler</string>
|
||||
<string name="stores_itch_tag_add">Tambah tag</string>
|
||||
<string name="stores_itch_tag_title">Filter berdasarkan tag</string>
|
||||
<string name="stores_itch_browse_failed">Tidak dapat memuat game dari itch.io</string>
|
||||
<string name="stores_itch_archive">Arsip %1$s tidak didukung</string>
|
||||
<string name="stores_itch_download_failed">itch.io menjawab HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2126,6 +2154,7 @@
|
||||
<string name="stores_login_close">Tutup</string>
|
||||
<string name="stores_login_retry">Coba lagi</string>
|
||||
<string name="stores_login_finishing">Menyelesaikan proses masuk…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft menolak masuk Xbox. Keluar dari Xbox di Toko, masuk lagi, lalu lanjutkan.</string>
|
||||
<string name="stores_login_error_network">Halaman masuk tidak dapat dimuat: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Penyedia ini menolak proses masuk dari halaman tersemat. Masuk dengan kata sandi toko Anda sebagai gantinya.</string>
|
||||
<string name="stores_login_error_http">Halaman masuk merespons dengan kesalahan (HTTP %1$d).</string>
|
||||
|
||||
@@ -543,8 +543,8 @@
|
||||
<string name="perf_sysmem">Turnip: rendering sysmem</string>
|
||||
<string name="perf_sysmem_hint">Più veloce per il client di Steam; nei giochi il driver sceglie per ogni passata tra rendering a tile e in memoria di sistema. Necessario su Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Salta l\'assistente xalia di Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (sperimentale)</string>
|
||||
<string name="perf_fastsync_hint">Un sostituto in userspace del driver ntsync di Linux, per i test. Quando è attivo, Proton lo usa al posto di droiddeck-esync e droiddeck-fsync. Funziona con Proton Experimental ARM64, GE-Proton e proton-cachyos. Si applica dalla prossima sessione.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Un sostituto in userspace del driver ntsync di Linux. Quando è attivo, Proton lo usa al posto di droiddeck-esync e droiddeck-fsync. Funziona con Proton Experimental ARM64, GE-Proton e proton-cachyos. Si applica dalla prossima sessione.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">Prima droiddeck-fsync</string>
|
||||
<string name="perf_fsync_hint">Esegue il fsync di Proton sui file Proton originali, con futex_waitv fornito in userspace, quindi non richiede pacchetti e continua a funzionare appena Steam aggiorna Proton. Quando è attivo, i giochi lo usano prima di droiddeck-esync, tranne i pochi che Proton esclude da fsync. Si applica dalla prossima sessione.</string>
|
||||
@@ -1407,6 +1407,10 @@
|
||||
<string name="theme_icon_blue_detail">Fondo nero, testo bianco, il blu per tutto ciò che è selezionato, attivo o premuto.</string>
|
||||
<string name="theme_electric">Blu elettrico</string>
|
||||
<string name="theme_electric_detail">Il blu più brillante, su superfici che tendono al blu navy invece che al grigio.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Colori che scorrono lungo l\'arcobaleno. Rispetta le impostazioni di animazione di Android.</string>
|
||||
<string name="theme_rgb_speed">Velocità</string>
|
||||
<string name="theme_rgb_speed_hint">Quanto velocemente cambiano i colori.</string>
|
||||
<string name="theme_gradient">Gradiente</string>
|
||||
<string name="theme_gradient_detail">I tuoi colori primario e secondario, sfumati su pulsanti ed evidenziazioni.</string>
|
||||
<string name="theme_gradient_primary">Primario</string>
|
||||
@@ -1533,6 +1537,13 @@
|
||||
<string name="fm_conflict_skip">Salta</string>
|
||||
<string name="fm_select_this_folder">Seleziona questa cartella</string>
|
||||
<string name="fm_back">Indietro</string>
|
||||
<string name="fm_exit">Esci</string>
|
||||
<string name="fm_return_to_start">Torna alla cartella iniziale</string>
|
||||
<string name="fm_start_unavailable">La cartella iniziale non è più disponibile</string>
|
||||
<string name="fm_cancel_operation_title">Annullare operazione?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Questa operazione verrà annullata. Confermi?</string>
|
||||
<string name="fm_accept">Accetta</string>
|
||||
<string name="fm_decline">Rifiuta</string>
|
||||
<string name="fm_drive_not_readable">%1$s: montata ma al momento non leggibile</string>
|
||||
<string name="fm_list_view">Visualizzazione elenco</string>
|
||||
<string name="fm_grid_view">Visualizzazione griglia</string>
|
||||
@@ -2006,6 +2017,23 @@
|
||||
<string name="stores_itch_no_exe">Nessun gioco Windows trovato nel download</string>
|
||||
<string name="stores_itch_extract_failed">Impossibile estrarre il download (codice %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io non ha risposto</string>
|
||||
<string name="stores_itch_sort_popular">Popolari</string>
|
||||
<string name="stores_itch_sort_new">Più recenti</string>
|
||||
<string name="stores_itch_sort_new_popular">Nuovi e popolari</string>
|
||||
<string name="stores_itch_price_paid">A pagamento</string>
|
||||
<string name="stores_itch_price_under_5">5 $ o meno</string>
|
||||
<string name="stores_itch_price_under_15">15 $ o meno</string>
|
||||
<string name="stores_itch_sort_top_rated">I più votati</string>
|
||||
<string name="stores_itch_sort_top_sellers">I più venduti</string>
|
||||
<string name="stores_itch_price_any">Qualsiasi prezzo</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">In offerta</string>
|
||||
<string name="stores_itch_load_more">Carica altri</string>
|
||||
<string name="stores_itch_platform_any">Qualsiasi piattaforma</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mobile</string>
|
||||
<string name="stores_itch_tag_add">Aggiungi un tag</string>
|
||||
<string name="stores_itch_tag_title">Filtra per tag</string>
|
||||
<string name="stores_itch_browse_failed">Impossibile caricare i giochi da itch.io</string>
|
||||
<string name="stores_itch_archive">Gli archivi %1$s non sono supportati</string>
|
||||
<string name="stores_itch_download_failed">itch.io ha risposto HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2157,6 +2185,7 @@
|
||||
<string name="stores_login_close">Chiudi</string>
|
||||
<string name="stores_login_retry">Riprova</string>
|
||||
<string name="stores_login_finishing">Completamento dell\'accesso…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft ha rifiutato l\'accesso a Xbox. Esci da Xbox in Negozi, accedi di nuovo, poi riprendi.</string>
|
||||
<string name="stores_login_error_network">Impossibile caricare la pagina di accesso: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Questo provider non consente l\'accesso da una pagina incorporata. Accedi invece con la password del negozio.</string>
|
||||
<string name="stores_login_error_http">La pagina di accesso ha risposto con un errore (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip:sysmemレンダリング</string>
|
||||
<string name="perf_sysmem_hint">Steamクライアントが高速になります。ゲームではドライバーがパスごとにタイルレンダリングとシステムメモリレンダリングを選びます。Adreno 710/720/722では必須です。</string>
|
||||
<string name="perf_xalia">Steamのxalia補助をスキップ</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync(実験的)</string>
|
||||
<string name="perf_fastsync_hint">Linuxのntsyncドライバーをユーザー空間で代替するテスト用機能です。オンの間、Protonはdroiddeck-esyncとdroiddeck-fsyncの代わりにこれを使用します。Proton Experimental ARM64、GE-Proton、proton-cachyosで動作します。次回のセッションで有効になります。</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Linuxのntsyncドライバーをユーザー空間で代替する機能です。オンの間、Protonはdroiddeck-esyncとdroiddeck-fsyncの代わりにこれを使用します。Proton Experimental ARM64、GE-Proton、proton-cachyosで動作します。次回のセッションで有効になります。</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsyncを優先</string>
|
||||
<string name="perf_fsync_hint">futex_waitvをユーザー空間で提供し、標準のProtonファイルのままProton自身のfsyncを実行します。パックが不要なため、SteamがProtonを更新してもすぐに動作し続けます。オンの間、Protonがfsyncを使わない一部のゲームを除き、ゲームはdroiddeck-esyncよりこちらを優先します。次回のセッションで有効になります。</string>
|
||||
@@ -1389,6 +1389,10 @@
|
||||
<string name="theme_icon_blue_detail">黒の背景に白の文字、選択・フォーカス・押下時には青を使用します。</string>
|
||||
<string name="theme_electric">エレクトリックネイビー</string>
|
||||
<string name="theme_electric_detail">より明るい青を、グレーではなくネイビー寄りの画面に使用します。</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">虹色に変化し続けるカラー。Android のアニメーション設定に従います。</string>
|
||||
<string name="theme_rgb_speed">速度</string>
|
||||
<string name="theme_rgb_speed_hint">色が切り替わる速さ。</string>
|
||||
<string name="theme_gradient">グラデーション</string>
|
||||
<string name="theme_gradient_detail">自分で選んだプライマリとセカンダリの色を、ボタンやハイライトにグラデーションで使います。</string>
|
||||
<string name="theme_gradient_primary">プライマリ</string>
|
||||
@@ -1505,6 +1509,13 @@
|
||||
<string name="fm_conflict_skip">スキップ</string>
|
||||
<string name="fm_select_this_folder">このフォルダを選択</string>
|
||||
<string name="fm_back">戻る</string>
|
||||
<string name="fm_exit">終了</string>
|
||||
<string name="fm_return_to_start">開始フォルダーに戻る</string>
|
||||
<string name="fm_start_unavailable">開始フォルダーは利用できなくなりました</string>
|
||||
<string name="fm_cancel_operation_title">操作をキャンセルしますか?</string>
|
||||
<string name="fm_cancel_operation_confirmation">操作がキャンセルされます。よろしいですか?</string>
|
||||
<string name="fm_accept">承諾</string>
|
||||
<string name="fm_decline">拒否</string>
|
||||
<string name="fm_drive_not_readable">%1$sはマウントされていますが、現在読み取れません</string>
|
||||
<string name="fm_list_view">リスト表示</string>
|
||||
<string name="fm_grid_view">グリッド表示</string>
|
||||
@@ -1974,6 +1985,23 @@
|
||||
<string name="stores_itch_no_exe">ダウンロードに Windows 版のゲームが見つかりません</string>
|
||||
<string name="stores_itch_extract_failed">ダウンロードを展開できませんでした (終了コード %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io から応答がありません</string>
|
||||
<string name="stores_itch_sort_popular">人気</string>
|
||||
<string name="stores_itch_sort_new">新着順</string>
|
||||
<string name="stores_itch_sort_new_popular">新着&人気</string>
|
||||
<string name="stores_itch_price_paid">有料</string>
|
||||
<string name="stores_itch_price_under_5">5ドル以下</string>
|
||||
<string name="stores_itch_price_under_15">15ドル以下</string>
|
||||
<string name="stores_itch_sort_top_rated">高評価</string>
|
||||
<string name="stores_itch_sort_top_sellers">売れ筋</string>
|
||||
<string name="stores_itch_price_any">すべての価格</string>
|
||||
<string name="stores_itch_price_free">無料</string>
|
||||
<string name="stores_itch_price_sale">セール中</string>
|
||||
<string name="stores_itch_load_more">さらに読み込む</string>
|
||||
<string name="stores_itch_platform_any">すべてのプラットフォーム</string>
|
||||
<string name="stores_itch_platform_mobile_web">モバイルWeb</string>
|
||||
<string name="stores_itch_tag_add">タグを追加</string>
|
||||
<string name="stores_itch_tag_title">タグで絞り込む</string>
|
||||
<string name="stores_itch_browse_failed">itch.io のゲームを読み込めませんでした</string>
|
||||
<string name="stores_itch_archive">%1$s 形式のアーカイブには対応していません</string>
|
||||
<string name="stores_itch_download_failed">itch.io が HTTP %1$d を返しました</string>
|
||||
<string name="stores_free">無料</string>
|
||||
@@ -2128,6 +2156,7 @@
|
||||
<string name="stores_login_close">閉じる</string>
|
||||
<string name="stores_login_retry">再試行</string>
|
||||
<string name="stores_login_finishing">ログインを完了しています…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft が Xbox のサインインを拒否しました。ストアで Xbox からサインアウトし、もう一度サインインしてから再開してください。</string>
|
||||
<string name="stores_login_error_network">ログインページを読み込めませんでした:%1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">このプロバイダーは埋め込みページからのログインを拒否しています。代わりにストアのパスワードでログインしてください。</string>
|
||||
<string name="stores_login_error_http">ログインページがエラーを返しました(HTTP %1$d)。</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem 렌더링</string>
|
||||
<string name="perf_sysmem_hint">Steam 클라이언트가 빨라집니다. 게임에서는 드라이버가 패스마다 타일 렌더링과 시스템 메모리 렌더링 중 하나를 고릅니다. Adreno 710/720/722에 필수입니다.</string>
|
||||
<string name="perf_xalia">Steam의 xalia 도우미 건너뛰기</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync(실험적)</string>
|
||||
<string name="perf_fastsync_hint">테스트용으로 Linux ntsync 드라이버를 사용자 공간에서 대신하는 기능입니다. 켜져 있으면 Proton이 droiddeck-esync와 droiddeck-fsync 대신 이 기능을 사용합니다. Proton Experimental ARM64, GE-Proton 및 proton-cachyos에서 작동합니다. 다음 세션에 적용됩니다.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Linux ntsync 드라이버를 사용자 공간에서 대신하는 기능입니다. 켜져 있으면 Proton이 droiddeck-esync와 droiddeck-fsync 대신 이 기능을 사용합니다. Proton Experimental ARM64, GE-Proton 및 proton-cachyos에서 작동합니다. 다음 세션에 적용됩니다.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync 우선</string>
|
||||
<string name="perf_fsync_hint">futex_waitv를 사용자 공간에서 제공하여 기본 Proton 파일로 Proton 자체의 fsync를 실행하므로, 팩이 필요 없고 Steam이 Proton을 업데이트해도 바로 작동합니다. 켜져 있으면 게임이 droiddeck-esync보다 이 기능을 우선 사용합니다. 단, Proton이 fsync를 끄는 일부 게임은 예외입니다. 다음 세션에 적용됩니다.</string>
|
||||
@@ -1389,6 +1389,10 @@
|
||||
<string name="theme_icon_blue_detail">검은색 배경에 흰색 글자, 선택·포커스·누름 상태에는 파란색을 사용합니다.</string>
|
||||
<string name="theme_electric">일렉트릭 네이비</string>
|
||||
<string name="theme_electric_detail">회색 대신 네이비 톤의 화면에 더 밝은 파란색을 사용합니다.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">무지개 색으로 계속 바뀌는 색상입니다. Android의 애니메이션 설정을 따릅니다.</string>
|
||||
<string name="theme_rgb_speed">속도</string>
|
||||
<string name="theme_rgb_speed_hint">색상이 바뀌는 속도입니다.</string>
|
||||
<string name="theme_gradient">그라데이션</string>
|
||||
<string name="theme_gradient_detail">직접 고른 기본색과 보조색이 버튼과 강조 표시에 섞여 적용됩니다.</string>
|
||||
<string name="theme_gradient_primary">기본색</string>
|
||||
@@ -1505,6 +1509,13 @@
|
||||
<string name="fm_conflict_skip">건너뛰기</string>
|
||||
<string name="fm_select_this_folder">이 폴더 선택</string>
|
||||
<string name="fm_back">뒤로</string>
|
||||
<string name="fm_exit">종료</string>
|
||||
<string name="fm_return_to_start">시작 폴더로 돌아가기</string>
|
||||
<string name="fm_start_unavailable">시작 폴더를 더 이상 사용할 수 없습니다</string>
|
||||
<string name="fm_cancel_operation_title">작업을 취소할까요?</string>
|
||||
<string name="fm_cancel_operation_confirmation">작업이 취소됩니다. 계속하시겠습니까?</string>
|
||||
<string name="fm_accept">수락</string>
|
||||
<string name="fm_decline">거절</string>
|
||||
<string name="fm_drive_not_readable">%1$s이(가) 마운트되었지만 지금은 읽을 수 없습니다</string>
|
||||
<string name="fm_list_view">목록 보기</string>
|
||||
<string name="fm_grid_view">격자 보기</string>
|
||||
@@ -1974,6 +1985,23 @@
|
||||
<string name="stores_itch_no_exe">다운로드에서 Windows 게임을 찾을 수 없습니다</string>
|
||||
<string name="stores_itch_extract_failed">다운로드한 파일의 압축을 풀 수 없습니다(코드 %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io가 응답하지 않았습니다</string>
|
||||
<string name="stores_itch_sort_popular">인기</string>
|
||||
<string name="stores_itch_sort_new">최신순</string>
|
||||
<string name="stores_itch_sort_new_popular">신규 및 인기</string>
|
||||
<string name="stores_itch_price_paid">유료</string>
|
||||
<string name="stores_itch_price_under_5">$5 이하</string>
|
||||
<string name="stores_itch_price_under_15">$15 이하</string>
|
||||
<string name="stores_itch_sort_top_rated">평점 높은 순</string>
|
||||
<string name="stores_itch_sort_top_sellers">베스트셀러</string>
|
||||
<string name="stores_itch_price_any">모든 가격</string>
|
||||
<string name="stores_itch_price_free">무료</string>
|
||||
<string name="stores_itch_price_sale">할인 중</string>
|
||||
<string name="stores_itch_load_more">더 불러오기</string>
|
||||
<string name="stores_itch_platform_any">모든 플랫폼</string>
|
||||
<string name="stores_itch_platform_mobile_web">모바일 웹</string>
|
||||
<string name="stores_itch_tag_add">태그 추가</string>
|
||||
<string name="stores_itch_tag_title">태그로 필터링</string>
|
||||
<string name="stores_itch_browse_failed">itch.io에서 게임을 불러오지 못했습니다</string>
|
||||
<string name="stores_itch_archive">%1$s 압축 파일은 지원하지 않습니다</string>
|
||||
<string name="stores_itch_download_failed">itch.io가 HTTP %1$d을(를) 반환했습니다</string>
|
||||
<string name="stores_free">무료</string>
|
||||
@@ -2128,6 +2156,7 @@
|
||||
<string name="stores_login_close">닫기</string>
|
||||
<string name="stores_login_retry">다시 시도</string>
|
||||
<string name="stores_login_finishing">로그인 완료 중…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft에서 Xbox 로그인을 거부했습니다. 스토어에서 Xbox 로그아웃 후 다시 로그인한 다음 재개하세요.</string>
|
||||
<string name="stores_login_error_network">로그인 페이지를 불러올 수 없습니다: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">이 제공업체는 앱에 포함된 페이지에서 로그인을 허용하지 않습니다. 대신 스토어 비밀번호로 로그인하세요.</string>
|
||||
<string name="stores_login_error_http">로그인 페이지에서 오류를 반환했습니다(HTTP %1$d).</string>
|
||||
|
||||
@@ -539,8 +539,8 @@
|
||||
<string name="perf_sysmem">Turnip: rendering sysmem</string>
|
||||
<string name="perf_sysmem_hint">Lebih pantas untuk klien Steam; dalam permainan, pemacu memilih pemaparan jubin atau memori sistem bagi setiap laluan. Diperlukan pada Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Langkau pembantu xalia Steam</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (eksperimen)</string>
|
||||
<string name="perf_fastsync_hint">Pengganti ruang pengguna untuk pemacu ntsync Linux, untuk pengujian. Semasa ia hidup, Proton menggunakannya sebagai ganti droiddeck-esync dan droiddeck-fsync. Berfungsi dengan Proton Experimental ARM64, GE-Proton dan proton-cachyos. Berkuat kuasa pada sesi seterusnya.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">Pengganti ruang pengguna untuk pemacu ntsync Linux. Semasa ia hidup, Proton menggunakannya sebagai ganti droiddeck-esync dan droiddeck-fsync. Berfungsi dengan Proton Experimental ARM64, GE-Proton dan proton-cachyos. Berkuat kuasa pada sesi seterusnya.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync dahulu</string>
|
||||
<string name="perf_fsync_hint">Menjalankan fsync Proton sendiri pada fail Proton standard, dengan futex_waitv dibekalkan dalam ruang pengguna, jadi ia tidak memerlukan pek dan terus berfungsi sebaik sahaja Steam mengemas kini Proton. Semasa ia hidup, permainan menggunakannya mendahului droiddeck-esync, kecuali beberapa Proton yang mematikan fsync. Berkuat kuasa pada sesi seterusnya.</string>
|
||||
@@ -1387,6 +1387,10 @@
|
||||
<string name="theme_icon_blue_detail">Latar hitam, teks putih, biru untuk semua yang dipilih, difokus atau ditekan.</string>
|
||||
<string name="theme_electric">Navy elektrik</string>
|
||||
<string name="theme_electric_detail">Biru lebih cerah, pada permukaan yang lebih cenderung navy daripada kelabu.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Warna yang bertukar merentasi pelangi. Mengikut tetapan animasi Android.</string>
|
||||
<string name="theme_rgb_speed">Kelajuan</string>
|
||||
<string name="theme_rgb_speed_hint">Seberapa pantas warna bertukar.</string>
|
||||
<string name="theme_gradient">Kecerunan</string>
|
||||
<string name="theme_gradient_detail">Warna utama dan sekunder pilihan anda, diadun pada butang dan sorotan.</string>
|
||||
<string name="theme_gradient_primary">Utama</string>
|
||||
@@ -1503,6 +1507,13 @@
|
||||
<string name="fm_conflict_skip">Langkau</string>
|
||||
<string name="fm_select_this_folder">Pilih folder ini</string>
|
||||
<string name="fm_back">Kembali</string>
|
||||
<string name="fm_exit">Keluar</string>
|
||||
<string name="fm_return_to_start">Kembali ke folder asal</string>
|
||||
<string name="fm_start_unavailable">Folder asal tidak lagi tersedia</string>
|
||||
<string name="fm_cancel_operation_title">Batalkan operasi?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Operasi akan dibatalkan. Adakah anda pasti?</string>
|
||||
<string name="fm_accept">Terima</string>
|
||||
<string name="fm_decline">Tolak</string>
|
||||
<string name="fm_drive_not_readable">%1$s dilekapkan tetapi tidak dapat dibaca sekarang</string>
|
||||
<string name="fm_list_view">Paparan senarai</string>
|
||||
<string name="fm_grid_view">Paparan grid</string>
|
||||
@@ -1972,6 +1983,23 @@
|
||||
<string name="stores_itch_no_exe">Tiada permainan Windows ditemui dalam muat turun</string>
|
||||
<string name="stores_itch_extract_failed">Tidak dapat mengekstrak muat turun (kod %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io tidak menjawab</string>
|
||||
<string name="stores_itch_sort_popular">Popular</string>
|
||||
<string name="stores_itch_sort_new">Terkini</string>
|
||||
<string name="stores_itch_sort_new_popular">Baharu dan popular</string>
|
||||
<string name="stores_itch_price_paid">Berbayar</string>
|
||||
<string name="stores_itch_price_under_5">$5 atau kurang</string>
|
||||
<string name="stores_itch_price_under_15">$15 atau kurang</string>
|
||||
<string name="stores_itch_sort_top_rated">Penilaian tertinggi</string>
|
||||
<string name="stores_itch_sort_top_sellers">Terlaris</string>
|
||||
<string name="stores_itch_price_any">Sebarang harga</string>
|
||||
<string name="stores_itch_price_free">Percuma</string>
|
||||
<string name="stores_itch_price_sale">Diskaun</string>
|
||||
<string name="stores_itch_load_more">Muat lagi</string>
|
||||
<string name="stores_itch_platform_any">Mana-mana platform</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web mudah alih</string>
|
||||
<string name="stores_itch_tag_add">Tambah tag</string>
|
||||
<string name="stores_itch_tag_title">Tapis mengikut tag</string>
|
||||
<string name="stores_itch_browse_failed">Tidak dapat memuatkan permainan daripada itch.io</string>
|
||||
<string name="stores_itch_archive">Arkib %1$s tidak disokong</string>
|
||||
<string name="stores_itch_download_failed">itch.io menjawab HTTP %1$d</string>
|
||||
<string name="stores_free">Percuma</string>
|
||||
@@ -2126,6 +2154,7 @@
|
||||
<string name="stores_login_close">Tutup</string>
|
||||
<string name="stores_login_retry">Cuba lagi</string>
|
||||
<string name="stores_login_finishing">Menyelesaikan log masuk…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft menolak log masuk Xbox. Log keluar daripada Xbox di Kedai, log masuk semula, kemudian sambung.</string>
|
||||
<string name="stores_login_error_network">Halaman log masuk tidak dapat dimuatkan: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Penyedia ini menolak log masuk daripada halaman terbenam. Log masuk dengan kata laluan kedai anda sebaliknya.</string>
|
||||
<string name="stores_login_error_http">Halaman log masuk menjawab dengan ralat (HTTP %1$d).</string>
|
||||
|
||||
@@ -541,8 +541,8 @@
|
||||
<string name="perf_sysmem">Turnip: sysmem-rendering</string>
|
||||
<string name="perf_sysmem_hint">Raskere for Steam-klienten; i spill velger driveren flis- eller systemminnerendering for hvert pass. Påkrevd på Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Hopp over Steams xalia-hjelper</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync (eksperimentell)</string>
|
||||
<string name="perf_fastsync_hint">En erstatning i brukerrom for Linux-driveren ntsync, for testing. Mens dette er på, bruker Proton den i stedet for droiddeck-esync og droiddeck-fsync. Fungerer med Proton Experimental ARM64, GE-Proton og proton-cachyos. Gjelder fra neste sesjon.</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync</string>
|
||||
<string name="perf_fastsync_hint">En erstatning i brukerrom for Linux-driveren ntsync. Mens dette er på, bruker Proton den i stedet for droiddeck-esync og droiddeck-fsync. Fungerer med Proton Experimental ARM64, GE-Proton og proton-cachyos. Gjelder fra neste sesjon.</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync først</string>
|
||||
<string name="perf_fsync_hint">Kjører Protons egen fsync på de uendrede Proton-filene, med futex_waitv levert i brukerrom, så den trenger ingen pakke og fortsetter å fungere i det Steam oppdaterer Proton. Mens dette er på, bruker spill den foran droiddeck-esync, med unntak av de få Proton holder utenfor fsync. Gjelder fra neste sesjon.</string>
|
||||
@@ -1401,6 +1401,10 @@
|
||||
<string name="theme_icon_blue_detail">Svart bakgrunn, hvit skrift, det blå for alt som er valgt, fokusert eller trykket.</string>
|
||||
<string name="theme_electric">Elektrisk marineblå</string>
|
||||
<string name="theme_electric_detail">Det blå lysere, på flater som lener mer mot marineblått enn grått.</string>
|
||||
<string name="theme_inner_gamer">Inner Gamer</string>
|
||||
<string name="theme_inner_gamer_detail">Farger som går gjennom regnbuen. Følger Androids animasjonsinnstillinger.</string>
|
||||
<string name="theme_rgb_speed">Hastighet</string>
|
||||
<string name="theme_rgb_speed_hint">Hvor raskt fargene skifter.</string>
|
||||
<string name="theme_gradient">Gradient</string>
|
||||
<string name="theme_gradient_detail">Dine egne primær- og sekundærfarger, blandet på knapper og uthevinger.</string>
|
||||
<string name="theme_gradient_primary">Primær</string>
|
||||
@@ -1522,6 +1526,13 @@
|
||||
<string name="fm_conflict_skip">Hopp over</string>
|
||||
<string name="fm_select_this_folder">Velg denne mappen</string>
|
||||
<string name="fm_back">Tilbake</string>
|
||||
<string name="fm_exit">Avslutt</string>
|
||||
<string name="fm_return_to_start">Tilbake til startmappen</string>
|
||||
<string name="fm_start_unavailable">Startmappen er ikke lenger tilgjengelig</string>
|
||||
<string name="fm_cancel_operation_title">Avbryt operasjonen?</string>
|
||||
<string name="fm_cancel_operation_confirmation">Operasjonen blir avbrutt. Er du sikker?</string>
|
||||
<string name="fm_accept">Godta</string>
|
||||
<string name="fm_decline">Avslå</string>
|
||||
<string name="fm_drive_not_readable">%1$s er montert, men ikke lesbar akkurat nå</string>
|
||||
<string name="fm_list_view">Listevisning</string>
|
||||
<string name="fm_grid_view">Rutenettvisning</string>
|
||||
@@ -1993,6 +2004,23 @@
|
||||
<string name="stores_itch_no_exe">Fant ikke noe Windows-spill i nedlastingen</string>
|
||||
<string name="stores_itch_extract_failed">Kunne ikke pakke ut nedlastingen (kode %1$d)</string>
|
||||
<string name="stores_itch_no_catalog">itch.io svarte ikke</string>
|
||||
<string name="stores_itch_sort_popular">Populære</string>
|
||||
<string name="stores_itch_sort_new">Nyeste</string>
|
||||
<string name="stores_itch_sort_new_popular">Nye og populære</string>
|
||||
<string name="stores_itch_price_paid">Betalt</string>
|
||||
<string name="stores_itch_price_under_5">$5 eller mindre</string>
|
||||
<string name="stores_itch_price_under_15">$15 eller mindre</string>
|
||||
<string name="stores_itch_sort_top_rated">Best vurdert</string>
|
||||
<string name="stores_itch_sort_top_sellers">Mest solgt</string>
|
||||
<string name="stores_itch_price_any">Alle priser</string>
|
||||
<string name="stores_itch_price_free">Gratis</string>
|
||||
<string name="stores_itch_price_sale">På salg</string>
|
||||
<string name="stores_itch_load_more">Last inn flere</string>
|
||||
<string name="stores_itch_platform_any">Alle plattformer</string>
|
||||
<string name="stores_itch_platform_mobile_web">Web på mobil</string>
|
||||
<string name="stores_itch_tag_add">Legg til en tagg</string>
|
||||
<string name="stores_itch_tag_title">Filtrer etter tagg</string>
|
||||
<string name="stores_itch_browse_failed">Kunne ikke laste spill fra itch.io</string>
|
||||
<string name="stores_itch_archive">%1$s-arkiver støttes ikke</string>
|
||||
<string name="stores_itch_download_failed">itch.io svarte HTTP %1$d</string>
|
||||
<string name="stores_free">Gratis</string>
|
||||
@@ -2147,6 +2175,7 @@
|
||||
<string name="stores_login_close">Lukk</string>
|
||||
<string name="stores_login_retry">Prøv igjen</string>
|
||||
<string name="stores_login_finishing">Fullfører innlogging…</string>
|
||||
<string name="stores_xbox_sign_in_again">Microsoft avviste Xbox-påloggingen. Logg ut av Xbox under Butikker, logg på igjen, og fortsett deretter.</string>
|
||||
<string name="stores_login_error_network">Innloggingssiden kunne ikke lastes: %1$s</string>
|
||||
<string name="stores_login_error_idp_blocked">Denne leverandøren tillater ikke innlogging fra en innebygd side. Logg inn med butikkpassordet ditt i stedet.</string>
|
||||
<string name="stores_login_error_http">Innloggingssiden svarte med en feil (HTTP %1$d).</string>
|
||||
|
||||
Loaded 100 of 248 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user